Commit Graph

290 Commits

Author SHA1 Message Date
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
7d132c6225
Fix webassembly workflow. 2021-04-25 17:37:11 +02:00
ArthurSonzogni
f062634226
Fix compilation errors on WebAssembly and Windows. 2021-04-25 17:28:16 +02:00
Arthur Sonzogni
176848e3f6
Update README.md 2021-04-25 17:08:54 +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
a27c878a3f
Mouse support. Fix & verify Webassembly support.
There was some undefined behavior to be fixed in the terminal input
parser.

The behavior of flush seems to have change. The fix was to invert '\0'
and std::flush.
2021-04-25 16:58:16 +02:00
ArthurSonzogni
0b9b6c692a
Improve mouse support 2021-04-25 15:22:38 +02:00
Arthur Sonzogni
4bc299aa3f
Update README.md 2021-04-25 13:56:26 +02:00
ArthurSonzogni
8037a5fa5f
Improve mouse support for menu and toggle. 2021-04-24 18:16:13 +02:00
Arthur Sonzogni
c8c0857ce8
Add todoman in "Project using FTXUI" 2021-04-23 14:09:12 +02:00
ArthurSonzogni
890a41a64c
Add mouse implementation of most components. 2021-04-18 22:33:41 +02:00
ArthurSonzogni
d685a8655e
Parse mouse middle 2021-04-18 18:42:42 +02:00
ArthurSonzogni
cbd13499ae
Parse mouse events. 2021-04-18 18:32:38 +02:00
柚木鉉
e54d4643f5 Update terminal.cpp 2021-04-10 22:35:51 +02:00
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