Allow Container::Vertical and Container::Horizontal to have an
external selector, similar to Container::Tab.
This is useful for implementing a menu of menu.
Co-authored-by: ArthurSonzogni <sonzogniarthur@gmail.com>
Modify the ftxui::Pixel. Instead of storing a wchar, store a
std::wstring. Now a single pixel can store multiple codepoints.
If a codepoint is of size <=0, it will be appended to the previous
pixel.
Only ftxui::text() is supported. ftxui::vtext support still needs to be
added.
This causes the following CPU and memory regression:
- Memory: Pixel size increases by 200% (16 byte => 48byte).
- CPU: Draw/Second decrease by 62.5% (16k draw/s => 6k draw/s on 80x80)
Both regressions are acceptable. There are still two orders of magnitude
(100x) before the levels where performance/memory concerns begins.
This fixes: https://github.com/ArthurSonzogni/FTXUI/issues/109
When switching from raw pointers toward shared_ptr, the destructor
wasn't updated correctly.
This patch:
- Fixes the issue.
- Add two regression tests.
- Use address sanitizer for the tests.
This fixes: https://github.com/ArthurSonzogni/FTXUI/issues/115
Make sure code points parsed are always valid UTF8. Don't assume stdin
is filled with valid data. Check for overlong UTF8 and add some tests.
The fuzzer has reached the following coverage:
- cov : 204
- ft : 754
- corp : 62/12257b
- lim : 2798
- exec/s : 1748
- rss : 445Mb
- L : 155/1946
- MS : 3
Fixed:https://github.com/ArthurSonzogni/FTXUI/issues/118
Current state: the fuzzer find interesting input immediately...
```
terminate called after throwing an instance of 'std::range_error'
what(): wstring_convert::from_bytes
```
See: https://github.com/ArthurSonzogni/FTXUI/issues/118
If we download the FTXUI source archive from the GitHub website, then the `.git` folder will be missing.
In such case, CMake configuration will fail:
> git found
> fatal: not a git repository (or any of the parent directories): .git
> CMake Error at CMakeLists.txt:21 (project):
> VERSION "0.6." format invalid.
For some reason, ResetPosition() was also clearing the content. On very
slow terminal emulator like the one on Windows, flickering was visible.
This fixes:
https://github.com/ArthurSonzogni/FTXUI/issues/86