Commit Graph

200 Commits

Author SHA1 Message Date
James
3c9fa60d28
Feature: Dropdown options with callback (#826)
Co-authored-by: ArthurSonzogni <sonzogniarthur@gmail.com>
2024-04-06 17:45:10 +02:00
Arthur Sonzogni
a7b6785420
Restore cursor shape on exit. (#793) (#794)
Fixed: https://github.com/ArthurSonzogni/FTXUI/issues/792
2023-12-17 10:35:21 +01:00
Arthur Sonzogni
348c3853d4
Restore cursor shape on exit. (#793)
Fixed: https://github.com/ArthurSonzogni/FTXUI/issues/792
2023-12-17 10:24:33 +01:00
Arthur Sonzogni
b970cb6ea8
feature: allow fullscreen without alternative screen (#777)
This should solve #766

The original PR was:
#767

Co-authored-by: rbrugo <brugo.riccardo@gmail.com>
Co-authored-by: ArthurSonzogni <sonzogniarthur@gmail.com>
2023-11-11 17:57:07 +01:00
Clément Roblot
c31aecf2ed
Checkbox button debounce (#774)
This fixes: https://github.com/ArthurSonzogni/FTXUI/issues/773

Dragging the mouse with the left button pressed now avoids activating multiple
checkboxes.

Add support for detecting mouse press transition. Added:
```cpp
// The previous mouse event.
Mouse Mouse::previous;

// Return whether the mouse transitionned from:
// released to pressed => IsPressed()
// pressed to pressed => IsHeld()
// pressed to released => IsReleased()
bool Mouse::IsPressed(Button button) const;
bool Mouse::IsHeld(Button button) const;
bool Mouse::IsReleased(Button button) const;
```
A couple of components are now activated when the mouse is pressed,
as opposed to released.

Co-authored-by: ArthurSonzogni <sonzogniarthur@gmail.com>
2023-11-11 17:33:50 +01:00
benoitdudu
f499d34f7e
fix the doxygen documentation by moving comments at the right place (#768) 2023-10-19 16:58:02 -04:00
Arthur Sonzogni
c24a274292
Feature: hscroll_indicator (#753)
This is the symetrical of `vscroll_indicator`.

Requested by @ibrahimnasson.

Fixed:https://github.com/ArthurSonzogni/FTXUI/issues/752
2023-09-26 23:08:42 +02:00
MingSheng
05c7bee6dd
Feature: input can now use overwrite mode when toggled with insert key (#735)
Co-authored-by: ArthurSonzogni <sonzogniarthur@gmail.com>
2023-08-28 21:07:26 +02:00
ArthurSonzogni
5724f8483b
Move copyright to the top of files. 2023-08-19 13:57:01 +02:00
mr-mocap
1e6df78ec2
Tidy up some ConstRef<T> and Ref<T> constructor cases (#730)
Co-authored-by: ArthurSonzogni <sonzogniarthur@gmail.com>
2023-08-19 11:10:29 +02:00
Stefan Ravn van Overeem
b3f1edc385
Add a TrackMouse(false) on ScreenInteractive to disable mouse events (#726)
When mouse events are enabled, it is not possible to select text in the
terminal and copy it somewhere else. This could be usefull for some
applications if they don't need to handle mouse events.

Add a function on the ScreenInteractive class to disable grabbing of
mouse events so that it is e.g. possible to select text in the user
interface. The function needs to be called on the screen object before
starting the application loop if such a behaviour is desired.
2023-08-19 10:57:50 +02:00
ArthurSonzogni
8058e1af6c
Cleanup. (IWYU, clang-tidy, etc...) 2023-08-13 08:20:16 +02:00
mr-mocap
06ba1c10b9
Possible clarification and reimplementation of Ref<T> classes (#719)
Co-authored-by: ArthurSonzogni <sonzogniarthur@gmail.com>
2023-08-12 21:18:33 +02:00
Clément Roblot
e2a205ed0d
Performance improvement by refactoring pixel styles (#704)
Co-authored-by: ArthurSonzogni <sonzogniarthur@gmail.com>
2023-08-08 00:46:51 +02:00
Igor Bogoslavskyi
b50f1fffc8
Improve const correctness in the Screen class (#701)
- Add a const variant to the accessor functions
- Make Print and ToString functions const

This fixes: https://github.com/ArthurSonzogni/FTXUI/issues/700
2023-07-26 00:41:16 +02:00
ArthurSonzogni
43240a5fd4
Add missing includes for gcc
Bug:https://github.com/ArthurSonzogni/FTXUI/issues/695
2023-07-15 16:40:20 +02:00
Arthur Sonzogni
e19550ae69
Feature: Windows. (#690)
Into ftxui/component/, add:
```
Container::Stacked(...)
Window(...);
```

Together, they can be used to display draggable/resizable windows.

Bug:https://github.com/ArthurSonzogni/FTXUI/issues/682

* Fix typo.
2023-07-15 16:29:48 +02:00
Arthur Sonzogni
455998d759
Remove Ref<XxxOption> and add new interfaces. (#686)
1. Stop taking Ref<XxxOption> in Component constructors. Instead, use
   the XxxOption directly. Passing by copy avoid problems developers had
   where one was shared in between multiple component, causing issues.

2. Add variants of most component constructors taking a struct only.

This replaces:
https://github.com/ArthurSonzogni/FTXUI/pull/670

This fixes:
https://github.com/ArthurSonzogni/FTXUI/issues/426
2023-06-25 17:22:05 +02:00
ArthurSonzogni
98b31ff1fe
Remove ButtonOption::Arthur()
It was added by mistacke previously.
2023-06-11 13:39:33 +02:00
Avighna
c3c3a2b11f
Fixed small typo in screen.hpp (#668) 2023-06-06 00:13:36 +02:00
Arthur Sonzogni
7b7177b59c
Feature: hyperlink support. (#665)
See the [OSC 8 page](https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda).
FTXUI support proposed by @aaleino in [#662](https://github.com/ArthurSonzogni/FTXUI/issues/662).

API:
```cpp
auto link = text("Click here") | hyperlink("https://github.com/FTXUI")
```

Fixed:https://github.com/ArthurSonzogni/FTXUI/issues/662
2023-06-04 21:06:19 +02:00
Nick Fistere
9bfa241627
Delete copy constructor and copy operator (#638)
Co-authored-by: ArthurSonzogni <sonzogniarthur@gmail.com>
2023-05-16 18:33:41 +02:00
Arthur Sonzogni
7de4f8683d
Feature: Add multi-line input. (#630) 2023-05-02 13:32:37 +02:00
Arthur Sonzogni
1397c10234
Remove string combining character list. (#616)
It was possible to access it from the WordBreakProperty list
2023-04-10 17:00:02 +02:00
Marc
eed7e2ea70
Multiple fixes: signed/unsigned, etc... (#600)
Co-authored-by: ArthurSonzogni <sonzogniarthur@gmail.com>
2023-03-26 20:20:02 +02:00
Arthur Sonzogni
e177409bd3
Update float style in animation.cpp (#607)
Partially taken out of:
https://github.com/ArthurSonzogni/FTXUI/pull/600

Co-authored-by: LostInCompilation <12819635+LostInCompilation@users.noreply.github.com>
2023-03-26 16:42:08 +02:00
Vinicius Moura Longaray
e83e90ced2
Feature: LinearGradient color decorator. (#592)
Based on the existing color decorators, create new ones to apply a gradient effect on the DOM.

Co-authored-by: ArthurSonzogni <sonzogniarthur@gmail.com>
2023-03-22 13:59:02 +01:00
Arthur Sonzogni
2991b0389e
Add colored border. (#595)
This resolves:
https://github.com/ArthurSonzogni/FTXUI/issues/564
2023-03-16 13:15:14 +01:00
Arthur Sonzogni
9efa0f7874
Feature: Add the dashed style. (#594) 2023-03-15 22:50:27 +01:00
Arthur Sonzogni
9b074d1e27
Feature resizable spilt with custom separator (#583)
* Feature: ResizableSplit with custom separator

This resolves:
    https://github.com/ArthurSonzogni/FTXUI/issues/580

Co-authored-by: Pin Loon Lee <pinloon_0428@hotmail.com>
2023-03-09 20:21:23 +01:00
ArthurSonzogni
d301fab1f4
Release v4.0.0 2023-02-12 18:02:40 +01:00
Arthur Sonzogni
3e35f45830
Execute clang-tidy and IWYU. (#576) 2023-02-12 14:07:28 +01:00
Arthur Sonzogni
6fe8310321
Feature: strikethrough and underlinedDouble decorator. (#561)
This resolves:
https://github.com/ArthurSonzogni/FTXUI/issues/560
2023-01-22 11:02:27 +01:00
Arthur Sonzogni
b56afce48c
Fix blinking cursor shape. (#539) 2022-12-28 13:17:56 +01:00
Arthur Sonzogni
60b9e491db
Add all the Slider implementations. (#532)
This resolves:
https://github.com/ArthurSonzogni/FTXUI/issues/524
2022-12-22 21:15:54 +01:00
Arthur Sonzogni
0542227ba7
Execute clang tidy and IWYU (#528) 2022-12-19 19:44:43 +01:00
Arthur Sonzogni (slow/sick)
0d54285e19
Add the Hoverable wrapper. (#522)
This will make it easier for developers. For instance:
https://github.com/ArthurSonzogni/FTXUI/issues/521
2022-12-04 11:54:49 +01:00
mr-mocap
f21ca3aa14
Improve UNIX signal handling (#518)
There was a dead lock caused by the reentrancy of the post method.

Co-authored-by: ArthurSonzogni <sonzogniarthur@gmail.com>
2022-12-01 22:56:35 +01:00
Arthur Sonzogni (slow/sick)
1689802349
Support multiple kind of cursor shapes. (#505)
https://github.com/ArthurSonzogni/FTXUI/issues/424
2022-11-11 14:09:53 +01:00
Arthur Sonzogni
0acfd8f255
Introduce Loop. (#476)
It can be used to give developers a better control on the loop. Users
can use it not to take full control of the thread, and poll FTXUI from
time to time as part of an external loop.

This resolves: https://github.com/ArthurSonzogni/FTXUI/issues/474
2022-10-18 21:29:27 +02:00
Arthur Sonzogni
f4b47333be
Featre: Support ctrl+arrow in input. (#494)
CTRL+LEFT: Move the cursor to the beginning of the word.
CTRL+RIGHT: Move the cursor to the beginning of the word.

This was requested by:
https://github.com/ArthurSonzogni/FTXUI/issues/490
2022-10-06 21:16:55 +02:00
Arthur Sonzogni
c8ec151154
Bring back C++17 minimal requirement. (#475) 2022-09-03 13:03:04 +02:00
Arthur Sonzogni
b3ba747d82
Feature: Slider in any directions. (#468)
Add the `SliderOption` option supporting:
```cpp
{
  Ref<T> value;
  ConstRef<T> min = T(0);
  ConstRef<T> max = T(100);
  ConstRef<T> increment = (max() - min()) / 20;
  GaugeDirection direction = GaugeDirection::Right;
  Color color_active = Color::White;
  Color color_inactive = Color::GrayDark;
};
```

In particular, this supports multiple direction. This resolves:
https://github.com/ArthurSonzogni/FTXUI/issues/467

This one do not support adding a label. The old constructors can still
be used to have a label.
2022-08-30 18:52:33 +02:00
Jan Sende
d04e04adc6
Fixed typo (#465) 2022-08-24 12:00:54 +02:00
Arthur Sonzogni
d755356481
Add ref for sliders. (#457)
This resolves:
https://github.com/ArthurSonzogni/FTXUI/issues/456
2022-08-13 16:26:53 +02:00
Arthur Sonzogni
925a7578d4
Feature: the Modal component. (#418) 2022-06-12 17:08:22 +02:00
Arthur Sonzogni
11519ef1c6
Fix focus vs flexbox interaction. (#405)
- Fix focus in flexbox. This required resetting the focus state at the
  beginning of the ComputeRequirement(), because it can now run several
  times.

  This resolves:https://github.com/ArthurSonzogni/FTXUI/issues/399

- Add Box::Union.

- Add a preliminary implementation of forwarding selected_box from
  within the flexbox.
2022-05-22 21:41:29 +02:00
Arthur Sonzogni
c033ca61ae
Remove NXXM. Execute IWYU. (#397) 2022-05-08 08:44:38 +02:00
SColibri
09a2c077eb
windows.h defines DrawText and shadows the function Canvas.DrawText, fix based on the solution #70 (#394)
Co-authored-by: Sebastian Carrion Ständer <sebastian.carrion@tum.de>
2022-05-04 23:39:03 +02:00
ArthurSonzogni
c2e1920449 Execute IWYU. 2022-04-28 10:43:31 +02:00