Commit Graph

675 Commits

Author SHA1 Message Date
ArthurSonzogni
476b9deaf8
Enable mouse tracking.
Request terminal to send mouse position.

See:
https://github.com/ArthurSonzogni/FTXUI/issues/7
2021-04-05 22:03:37 +02:00
ArthurSonzogni
386a0f9eac Add tests for the input component. 2021-03-28 18:25:16 +02:00
d
160b1c8bbc Added Home, End, PageUp, PageDown events.
Added handling for Home and End for 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
a4c6daae53
Update README.md 2021-03-22 00:28:56 +01:00
Arthur Sonzogni
430c805dfd
Update README.md 2021-03-22 00:28:19 +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
Arthur Sonzogni
65c0297789
Update windows-msvc.yaml 2021-03-21 21:53:25 +01:00
Arthur Sonzogni
83fe939332
Improve workflow and badges. (#78) 2021-03-21 14:08:09 +01:00
Arthur Sonzogni
3a0b2520eb
Split workflows by OS (#77) 2021-03-21 13:42:12 +01:00
Arthur Sonzogni
add8082cd9
Update the continuous-integration badge. 2021-03-20 23:04:23 +01:00
Arthur Sonzogni
a6a7f0a354
Add CI on github action. (#76) 2021-03-20 22:45:21 +01:00
jdfa
af4bf379bc
Swapped order of hidding cursor and setting alternative screen (#75)
On some terminal, going to the alternative screen disable cursor hiding.
 Swap of those commands fixed that issue.

Co-authored-by: d <d>
2021-03-16 09:46:02 +01:00
jdfa
9cc3779145
[Win] Fixed usage of ReadConsoleInput (#74)
ReadConsoleInput params: |nLength| is the size in array elements, not in byte.

Co-authored-by: d <d>
2021-03-13 21:02:01 +01:00
Arthur Sonzogni
d48e3decfc
Update README.md 2021-02-14 19:39:22 +01:00
Arthur Sonzogni
6ed5051cfc
Add documentation about ./example/util/print_key_press (#73)
Fixed: https://github.com/ArthurSonzogni/FTXUI/issues/72
2021-02-13 20:00:00 +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
Robin Lindén
0a9a72cbaa
Workaround Windows.h breaking the Color::RGB function (#70)
wingdi.h (included via Windows.h) defines an RGB macro that breaks
things. If a user really wants that macro in the same file as FTXUI they
can move the Windows.h include to after the inclusion of FTXUI's
headers.
2021-02-09 14:18:29 +01:00
robobuggy
d0eab41344
Fixed infinite loop in Screen::ToString() for non-printable chars (#69) 2021-02-04 09:32:05 +01:00
Arthur Sonzogni
92ec5ab4ca
Support for color fallback. (#66)
On terminal not supporting some color palette, fallback toward the
closest one.
2020-12-23 14:45:57 +01:00
Arthur Sonzogni
305346542a
Fix terminal color detection support. (#65)
There was many obvious bugs, discovered here:
ad2a085469/Open-Source-Project-Anatomy/FTXUI.md
2020-12-23 12:20:01 +01:00
ArthurSonzogni
3a3ec13eb0
Add nxxm suport. 2020-12-21 15:36:04 +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
Mike Wallio
c13621d1f9
Make cursor position public state (#57) 2020-10-24 16:48:59 +02:00
Mike Wallio
1cb08fd606
Fix event const correctness (#56) 2020-10-24 16:47:03 +02:00
Arthur Sonzogni
d969c74341
Improve color handling. (#49) 2020-10-16 22:31:24 +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
Stephan Roslen
cfd0981a58
reset pixel style for newline (#54) 2020-10-16 21:26:59 +02:00
Stephan Roslen
5d140845ee
Fix indices for screen code example and create call (#53)
PixelAt(10,10) was outside of the Screen and there is no c'tor for
Dimensions but a static Create method.
2020-10-16 18:37:52 +02:00
Stephan Roslen
e34dc1606e Fix crash on unset environment variable. 2020-10-15 21:57:14 +02:00
ArthurSonzogni
606e0efdfe Implement Input::on_change. 2020-09-20 11:47:06 +02:00
ArthurSonzogni
5291f660ca Automatically fix style. 2020-09-07 11:25:50 +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
Arthur Sonzogni
49941b6403
Update README.md 2020-09-06 13:53:33 +02:00
ArthurSonzogni
6b70967c6d Add <algorithm> to border.cpp.
This fies an issue with Windows.
2020-08-28 23:54:25 +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
114ab4ae2a Add more documentation. 2020-08-28 23:54:25 +02:00
ArthurSonzogni
f2dc080a35 Variou details:
- Put the MIT copyright at the end.
- Move the directory /other -> tools
- Various improvements.
2020-08-28 23:54:25 +02:00
ArthurSonzogni
5a4afba66f Improve the documentation. 2020-08-28 23:54:25 +02:00
Arthur Sonzogni
37ddb1eceb
Update README.md 2020-08-19 11:20:55 +02:00
Arthur Sonzogni
4f25510beb
Update README.md 2020-08-19 11:19:10 +02:00
Arthur Sonzogni
720838ad74
Update README.md 2020-08-19 11:19:02 +02:00
ArthurSonzogni
20b9a0f0f5 Add a doxygen documentation. 2020-08-15 10:38:14 +02:00
Arthur Sonzogni
5f15b2881e
Update README.md 2020-08-12 22:18:59 +02:00