Based on the existing color decorators, create new ones to apply a gradient effect on the DOM.
Co-authored-by: ArthurSonzogni <sonzogniarthur@gmail.com>
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
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.
This addresses and fix:
https://github.com/ArthurSonzogni/FTXUI/issues/430
This patchs makes |shift| to be read and written on the same thread. We
request the update to be made via a task posted on the main thread.
This patch has no real consequence, the previous behavior was fine.
I hope it will help users not to have thread safety issue and better
understand they can post tasks this way.
Add decorator variants for decorator components
Add the "pipe" operator for components, similar to what was done for Elements.
We are able to put something like:
```
Button(...) | Maybe(&show_button)
```
Add decorators for:
- `Maybe`
- `CatchEvent`
- `Renderer`
Signed-off-by: Kefu Chai <tchaikov@gmail.com>
Co-authored-by: ArthurSonzogni <sonzogniarthur@gmail.com>
- Add support for SIGTSTP:
https://github.com/ArthurSonzogni/FTXUI/issues/330
This
- Add support for task posting.
This allows folks to defer function execution, and execute it directly
below the main loop. The task are executed in a FIFO order.
This implement the flexbox elements, following the HTML one.
Built from them, there is also the following elements:
- `paragraph`
- `paragraphAlignLeft`
- `paragraphAlignRight`
- `paragraphAlignCenter`
- `paragraphAlignJustify`
This is a breaking change.
Dom
- `vscroll_indicator`. Show a scrollback indicator on the right.
Component
- `Maybe`: Display an component conditionnally based on a boolean.
- `Dropdown`: A dropdown select list.
This address:
https://github.com/ArthurSonzogni/FTXUI/issues/204
In the past, FTXUI switched from std::string to std::wstring to support
fullwidth characters. The reasons was that fullwidth characters can be
stored inside a single wchar_t.
Then FTXUI added support for combining characters. A single glygh
doesn't even fit a wchar_t. Instead, a glyph can be arbitrary large.
The usage of wstring doesn't really fit the new model and have several
drawbacks:
1. It doesn't simplify the implementation of FTXUI, because of combining
characters.
2. It reduces drawing performance by 2x.
3. It increase Screen's memory allocation by 2x.
This patch converts FTXUI to use std::string internally. It now exposes
std::string based API. The std::wstring API remains, but is now
deprecated.
Tests and examples haven't been update to show the breakage is limited.
They will be updated in a second set of patches.
Bug: https://github.com/ArthurSonzogni/FTXUI/issues/153
Co-authored-by: Tushar Maheshwari <tushar27192@gmail.com>
* Reorganize ContainerBase
- Reduce Container overloads using default arguments
- Extract member function pointers to virtual functions
- Separate classes for Vertical, Horizontal and Tab containers
* Collect unpack from NodeDecorator subclasses
* Reduce redundant expansion for aliases
The target_compile_features command allows setting PUBLIC compile features for the library, making it implicit for the applications linking it. This reduces the CMake boilerplate required to set up a dependent project (eg. ftxui-starter).