This upgrades the version of google benchmark used. The main reason for this upgrade is that the old version doesn't display the OVERALL_GEOMEAN when comparing two benchmarks.
Co-authored-by: ArthurSonzogni <sonzogniarthur@gmail.com>
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
- Add `FTXUI_QUIET` to stop displaying FTXUI configuration messages.
- Turn `FTXUI_BUILD_DOC` and `FTXUI_BUILD_EXAMPLE` OFF by default
- Display the list of options.
Modify the `ftxui-config.cmake.in` file so that it includes
`ftxui-targets.cmake`. This causes cmake to check the version is
compatible with what the user requested.
This patch also includes additional minor changes.
Co-authored-by: ArthurSonzogni <sonzogniarthur@gmail.com>
This file describes the include and lib location and makes
it possible to use the library in build systems other than
CMake, e.g. in basic Makefiles.
Signed-off-by: Henner Zeller <h.zeller@acm.org>
Based on the existing color decorators, create new ones to apply a gradient effect on the DOM.
Co-authored-by: ArthurSonzogni <sonzogniarthur@gmail.com>
Some developers would be happier with the gtest version provided from
their package manager. Use it if it is installed the package provide
cmake support.
Fixed: https://github.com/ArthurSonzogni/FTXUI/issues/551
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.
PREFIX is by default "lib", which most of the libraries use.
this changes makes the library files libftxui-foo.a
as ArthurSonzogni/FTXUI#140 intended originally
fix: https://github.com/ArthurSonzogni/FTXUI/issues/296#issue-1092343846
When the list in Radiobox/Menu/Toggle is resized, clamp the |selected_| values so that it stays within bounds.
Clamping is executed in Render() and in OnEvent()
Co-authored-by: ArthurSonzogni <sonzogniarthur@gmail.com>
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.
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>
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).