Commit Graph

71 Commits

Author SHA1 Message Date
Arthur Sonzogni
a2e7ff852e
Cleanup. (#132)
- Split the large CMakeList.
- Remove travis
- Remove gitlab-ci.yml
2021-06-26 15:14:27 +02:00
Arthur Sonzogni
93922f102f
Do not throw SIGINT after catching SIGINT signal (#128)
This fixes:
https://github.com/ArthurSonzogni/FTXUI/issues/117
2021-06-26 00:42:08 +02:00
Arthur Sonzogni
1fc86d31db
Add benchmark. (#127) 2021-06-26 00:08:21 +02:00
ArthurSonzogni
91c5954fe2 Fix component ownership.
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
2021-06-21 22:58:49 +02:00
ArthurSonzogni
986ea2b37e Add fuzzer for termin_input_parser
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
2021-06-19 11:09:52 +02:00
myd7349
3d5e4eb6ca
Set git_version when .git folder is missing (#116)
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.
2021-06-17 12:54:26 +02:00
ArthurSonzogni
462664520a Increase version to 0.6
Two new compoents:
- CatchEvent
- ResizableSplit{Left,Top,Right,Bottom}
2021-05-28 15:07:08 +02:00
ArthurSonzogni
bba2abbb60 Introduce ResizableSplit 2021-05-28 15:07:08 +02:00
Arthur Sonzogni
aacb677e84
Introduce CatchEvent (#104) 2021-05-23 12:53:20 +02:00
Arthur Sonzogni
e520ac59f9
Switch to -Wshadow (#98) 2021-05-16 22:42:22 +02:00
Arthur Sonzogni
a574a6c3ee
Pass -Wshadow (#97)
Requested from:
https://github.com/robinlinden/hastur/pull/12
2021-05-16 17:18:11 +02:00
Arthur Sonzogni
cf4fdf257e
Build the libraries statically. (#96)
This may resolve:
https://github.com/ArthurSonzogni/FTXUI/issues/89
2021-05-16 11:59:20 +02:00
Arthur Sonzogni
ca0d74ac01
Warn for deprecated. (#94) 2021-05-16 09:57:55 +02:00
Arthur Sonzogni
69047ac1e4
Add warning for sign comparison. (#93) 2021-05-16 09:38:24 +02:00
ArthurSonzogni
8b67e722b4
Increase version. 2021-05-15 00:29:39 +02:00
ArthurSonzogni
c9aa1805eb
Add the Renderer component. 2021-05-13 11:44:47 +02:00
ArthurSonzogni
6d75cb2748
Make component more functionnal 2021-05-09 22:35:34 +02:00
ArthurSonzogni
be219633e3
Merge remote-tracking branch 'origin' into feature/mouse-support 2021-05-01 23:45:13 +02:00
ArthurSonzogni
155758c073
Use IWYU. 2021-05-01 23:19:07 +02:00
ArthurSonzogni
eb399d20c5
Capture mouse for the slider component. 2021-05-01 18:13:56 +02:00
ArthurSonzogni
0af8201023
Add the slider component. 2021-04-29 00:18:58 +02:00
ArthurSonzogni
f062634226
Fix compilation errors on WebAssembly and Windows. 2021-04-25 17:28:16 +02:00
ArthurSonzogni
5322e5a683
Increase version to 0.4.x
Version 0.4 bring mouse support.
See https://github.com/ArthurSonzogni/FTXUI/issues/7
2021-04-25 17:04:26 +02:00
ArthurSonzogni
0b9b6c692a
Improve mouse support 2021-04-25 15:22:38 +02:00
ArthurSonzogni
890a41a64c
Add mouse implementation of most components. 2021-04-18 22:33:41 +02:00
ArthurSonzogni
386a0f9eac Add tests for the input component. 2021-03-28 18:25:16 +02:00
柚木鉉
a6c692edcf
Fix MSVC Warning D9025 (#80) 2021-03-22 10:31:35 +01:00
Arthur Sonzogni
373b016ca9
Add webassembly support (#79) 2021-03-22 00:26:52 +01:00
ArthurSonzogni
cac94439ff
Add webassembly support 2021-03-21 23:30:46 +01:00
Robin Lindén
73a3c24394
Build with -Wmissing-declarations (#71)
This flag is used to find global functions defined without a previous
declaration. Usually it spots accidental globals, but in this case it
was just missing headers.
2021-02-11 00:45:42 +01:00
Arthur Sonzogni
977f13967f
Fix CMake when git is not found. (#64)
Fix: https://github.com/ArthurSonzogni/FTXUI/issues/62
2020-11-22 13:23:01 +01:00
Vedant Paranjape
afd53e0508
Compilation failed if ftxui was used in projects that were not git repositories. Since, in CMakeLists.txt working directory to execute command was (#61)
set as the parent directory and not the FTXUI project directory.

* Changed the working directory variable to ${CMAKE_CURRENT_SOURCE_DIR}, so as to get the version of FTXUI and not that of parent project
2020-11-14 15:00:38 +01:00
Arthur Sonzogni
406355df8c
Fix parsing of keys that are prefix of others. (#58)
The ESC key generates sequences that are prefix of others. For instance:
- ESC => [27]
- F1 =>  [27, 79, 8]

As a result, we can't generate the ESC event when receiving [27],
because it might be the start of the [27, 79, 8] sequence (or not).

Application usually applies a timeout to help detecting the ESC key.
This patch introduce a timeout. It is set to 50ms.

Bug: https://github.com/ArthurSonzogni/FTXUI/issues/55
2020-10-25 01:57:56 +02:00
Stephan Roslen
6a35efa3b7
add dependency to Threads into generated cmake config (#52)
* add dependency to Threads into generated cmake config

* fix formatting
2020-10-16 22:07:30 +02:00
ArthurSonzogni
d09996a6c7 Add more example for colors. 2020-09-07 11:25:50 +02:00
Damien D
dc8c090753 Add support for full RGB colors.
FTXUI supported only the 16 colors palette.
This patch adds support for the 256 palette and the TrueColor(8×8×8)
mode.

This was made by kerdelos@ and fixes issue:
https://github.com/ArthurSonzogni/FTXUI/issues/45

Co-authored-by: Damien D <kerdelos@gmail.com>
Co-authored-by: Arthur Sonzogni <sonzogniarthur@gmail.com>
2020-09-07 11:25:50 +02:00
ArthurSonzogni
4ad4946de3 Add the modal dialog example.
New component: clear_under.
2020-08-28 23:54:25 +02:00
ArthurSonzogni
5a8ed208da Add the Button component. 2020-08-28 23:54:25 +02:00
ArthurSonzogni
81d79d311d Add TakeFocus and SetActiveChild.
This allows developers to set child children component must be the
currently active/focused one.

This can be used to "control" where the focus is, without user
interactions.
2020-08-28 23:54:25 +02:00
ArthurSonzogni
20b9a0f0f5 Add a doxygen documentation. 2020-08-15 10:38:14 +02:00
ArthurSonzogni
75c424cea9 Update document WIP. 2020-08-09 10:49:06 +02:00
ArthurSonzogni
8f87fc96ac Add regression test for issue 31.
See https://github.com/ArthurSonzogni/FTXUI/issues/31

Due to a bug fixed by:
https://github.com/ArthurSonzogni/FTXUI/pull/32
the character 'P' was not correctly converted into event.
2020-07-23 21:05:21 +02:00
ArthurSonzogni
454b14c5c6 Improve support to mingw 2020-07-16 23:40:15 +02:00
ArthurSonzogni
e1782cf9b9 Fix travis on Windows with gtests. 2020-04-17 00:59:05 +02:00
ArthurSonzogni
76b216dd5e Run test on travis. 2020-04-16 23:21:06 +02:00
ArthurSonzogni
6e7b4526a0 Add ReceiverTest.
And fix a small bug with the Receiver not eating all the input.
2020-03-27 01:01:37 +01:00
ArthurSonzogni
e8ed0fbc6d Add ContainerTest 2020-03-27 01:01:37 +01:00
ArthurSonzogni
2cef695216 Add RadioboxTest 2020-03-27 01:01:37 +01:00
ArthurSonzogni
6600e4fc03 Add ToggleTest. 2020-03-27 01:01:37 +01:00
ArthurSonzogni
f48bfcff10 Move tests next to their implementations. 2020-03-27 01:01:37 +01:00