Commit Graph

612 Commits

Author SHA1 Message Date
Stefan Ravn van Overeem
eb9a701fd7
Add -Wuseless-cast to FTXUI_DEV_WARNINGS (#728)
Add the -Wuseless-cast to the FTXUI_DEV_WARNINGS and
fix the compiler complaints about useless casts
2023-08-19 11:20:04 +02:00
mr-mocap
1e6df78ec2
Tidy up some ConstRef<T> and Ref<T> constructor cases (#730)
Co-authored-by: ArthurSonzogni <sonzogniarthur@gmail.com>
2023-08-19 11:10:29 +02:00
Stefan Ravn van Overeem
b3f1edc385
Add a TrackMouse(false) on ScreenInteractive to disable mouse events (#726)
When mouse events are enabled, it is not possible to select text in the
terminal and copy it somewhere else. This could be usefull for some
applications if they don't need to handle mouse events.

Add a function on the ScreenInteractive class to disable grabbing of
mouse events so that it is e.g. possible to select text in the user
interface. The function needs to be called on the screen object before
starting the application loop if such a behaviour is desired.
2023-08-19 10:57:50 +02:00
Stefan Ravn van Overeem
f7304c28c3
Fix Wshadow warning in Color::Interpolate (#727)
Co-authored-by: ArthurSonzogni <sonzogniarthur@gmail.com>
2023-08-17 22:18:33 +02:00
lexika979
acbdb50747
Fix typo in link (#724) 2023-08-15 18:47:14 +02:00
Arthur Sonzogni
8ae1c95d18
Update CHANGELOG.md 2023-08-13 17:36:41 +02:00
ArthurSonzogni
8058e1af6c
Cleanup. (IWYU, clang-tidy, etc...) 2023-08-13 08:20:16 +02:00
mr-mocap
06ba1c10b9
Possible clarification and reimplementation of Ref<T> classes (#719)
Co-authored-by: ArthurSonzogni <sonzogniarthur@gmail.com>
2023-08-12 21:18:33 +02:00
ArthurSonzogni
461d557674
Apply clang-tidy 2023-08-08 02:17:40 +02:00
Clément Roblot
e2a205ed0d
Performance improvement by refactoring pixel styles (#704)
Co-authored-by: ArthurSonzogni <sonzogniarthur@gmail.com>
2023-08-08 00:46:51 +02:00
ArthurSonzogni
00e63993ce
Run IWYU and clang-format 2023-08-06 13:25:42 +02:00
Stefan Ravn van Overeem
b0a7f88f07
Change WordBreakProperty underlying type to int8_t (#715)
This yields a ~1% performance improvements, likely
because the smaller types causes less load on memory
when bisearching the WordBreakProperty interval table

Co-authored-by: ArthurSonzogni <sonzogniarthur@gmail.com>
2023-08-03 17:41:54 +02:00
Clément Roblot
cebe49dd23
Added some true colors in the benchmark (#717) 2023-08-01 15:13:04 +02:00
Stefan Ravn van Overeem
4debd4f3de
Extract extend codepoints out in seperate array (#713)
IsCombining() is a hotpath when rendering the screen.
Most of the time is spent doing bisearch on the word break interval list
to check it characters has the extend property.

Create a seperate table for intervals with the extend property,
so they can just be searched in isCombining().

Also some of the intervals in the word break interval list
were consecutive and could be combined to reduce the
size of the list.

This gives a ~25% performance improvement when running the benchmark
2023-08-01 09:39:14 +02:00
KyuHyuk Lee
bb43ce1875
Added rw-tui to the list of projects that are using FTXUI (#712) 2023-07-31 18:26:45 +02:00
Clément Roblot
0930142597
Added the print stage to the benchmarks (#708) 2023-07-29 11:04:24 +02:00
Clément Roblot
21fe59dee8
Upgrade the version of google benchmark (#709)
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>
2023-07-29 11:00:48 +02:00
ArthurSonzogni
5094b5f3fb
Add style targetted benchmark. 2023-07-28 20:54:30 +02:00
ArthurSonzogni
e5eb822d44
Start using c++20 in examples. 2023-07-26 01:02:37 +02:00
Igor Bogoslavskyi
b50f1fffc8
Improve const correctness in the Screen class (#701)
- Add a const variant to the accessor functions
- Make Print and ToString functions const

This fixes: https://github.com/ArthurSonzogni/FTXUI/issues/700
2023-07-26 00:41:16 +02:00
ArthurSonzogni
43240a5fd4
Add missing includes for gcc
Bug:https://github.com/ArthurSonzogni/FTXUI/issues/695
2023-07-15 16:40:20 +02:00
Arthur Sonzogni
e19550ae69
Feature: Windows. (#690)
Into ftxui/component/, add:
```
Container::Stacked(...)
Window(...);
```

Together, they can be used to display draggable/resizable windows.

Bug:https://github.com/ArthurSonzogni/FTXUI/issues/682

* Fix typo.
2023-07-15 16:29:48 +02:00
ArthurSonzogni
79f8293a0d
Fix Canvas documentation.
The braille characters can fit 2x4 dots per cells, not 2x8.

Bug:https://github.com/ArthurSonzogni/FTXUI/issues/694
2023-07-03 21:10:47 +02:00
cblack-dev
c2fef9d377
Resolve unused varaible warning in _WIN32 builds of screen_interactive.cpp (#693)
Marks constexpr int timeout_microseconds on line 73 as [[maybe_unused]] to resolve unused variable warning on _WIN32 builds.
2023-07-02 17:50:31 +02:00
Stefan Ravn van Overeem
b2f66c7386
Improve unicode codepoint Bisearch performance (#691)
Improve the performance of the functions for searching for codepoints
in a table by passing the table array in as a reference instead of copying
it.

Co-authored-by: ArthurSonzogni <sonzogniarthur@gmail.com>
2023-06-27 22:32:57 +02:00
Arthur Sonzogni
455998d759
Remove Ref<XxxOption> and add new interfaces. (#686)
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
2023-06-25 17:22:05 +02:00
Stefan Ravn van Overeem
e73e7f0d68
Support Fn keys for every terminal standards (#689)
Co-authored-by: ArthurSonzogni <sonzogniarthur@gmail.com>
2023-06-25 17:11:59 +02:00
ArthurSonzogni
5b5c6e1402
Fix .gitignore 2023-06-24 17:54:04 +02:00
Arthur Sonzogni
e9e1451f3c
Fix the .gitignore file. (#688) 2023-06-24 17:52:44 +02:00
Arthur Sonzogni
34688fdd8c
Support F1-F5 from OS terminal (#687)
Bug:https://github.com/ArthurSonzogni/FTXUI/issues/685
2023-06-24 17:15:23 +02:00
Arthur Sonzogni
da32a8ba0a
Add .gitignore (#679)
Bug:https://github.com/ArthurSonzogni/FTXUI/issues/669
2023-06-16 21:29:28 +02:00
Arthur Sonzogni
d9712cf1e8
Improve the README GIF 2023-06-11 14:04:30 +02:00
ArthurSonzogni
98b31ff1fe
Remove ButtonOption::Arthur()
It was added by mistacke previously.
2023-06-11 13:39:33 +02:00
Ruebled
67717ab923
Path Finder to README (#674) 2023-06-10 11:35:19 +02:00
Arthur Sonzogni
d587737633
Update README.md
The link was broken.

This fixes: https://github.com/ArthurSonzogni/FTXUI/issues/673
2023-06-09 13:48:11 +02:00
Avighna
c3c3a2b11f
Fixed small typo in screen.hpp (#668) 2023-06-06 00:13:36 +02:00
Arthur Sonzogni
ff5817b8a6
Fix on_enter bug in ftxui::Input (#667)
Fixed:https://github.com/ArthurSonzogni/FTXUI/issues/666
2023-06-04 21:34:16 +02:00
Arthur Sonzogni
7b7177b59c
Feature: hyperlink support. (#665)
See the [OSC 8 page](https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda).
FTXUI support proposed by @aaleino in [#662](https://github.com/ArthurSonzogni/FTXUI/issues/662).

API:
```cpp
auto link = text("Click here") | hyperlink("https://github.com/FTXUI")
```

Fixed:https://github.com/ArthurSonzogni/FTXUI/issues/662
2023-06-04 21:06:19 +02:00
Arthur Sonzogni
d4c6cebea3
Update README.md 2023-06-04 18:05:32 +02:00
Arthur Sonzogni
c6f0dd60ee
Update README.md 2023-06-04 18:04:50 +02:00
Arthur Sonzogni
7d7be0e9da
build: Display options and turn DOC/EXAMPLE OFF (#661)
- 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.
2023-06-04 14:35:08 +02:00
Prokop Randáček
59bbe3ed5e
fix some warnings (#660)
Co-authored-by: ArthurSonzogni <sonzogniarthur@gmail.com>
2023-06-03 13:59:39 +02:00
Herman Semenov
d464a071da
Optimize inserts in vector and refactor const reference objects (#659)
Signed-off-by: German Semenov <GermanAizek@yandex.ru>
Co-authored-by: ArthurSonzogni <sonzogniarthur@gmail.com>
2023-05-31 19:24:08 +02:00
Henrik S. Gaßmann
8bea9261bc build: Properly escape paths which may contain spaces 2023-05-29 16:27:31 +02:00
Henrik S. Gaßmann
3e5322944d build: Remove redundant cmake version check
The main `CMakelists.txt` already asserts a minimum version of `3.12`
which renders the condition `cmake <= 3.11.4` to be always false.
2023-05-29 16:27:31 +02:00
Henrik S. Gaßmann
332f229e49 build(install): Remove redundant install settings 2023-05-29 16:27:31 +02:00
Henrik S. Gaßmann
806bacf15a build(install): Fix pkgconfig install directory
`pkg-config` finds configs within `$prefix/lib/pkgconfig`, but not in
`$prefix/lib`.

See-Also: https://linux.die.net/man/1/pkg-config
2023-05-29 16:27:31 +02:00
Arthur Sonzogni
d00d946282
Update CHANGELOG.md (#651) 2023-05-29 11:52:39 +02:00
SpaceIm
d93b687bde
CMake: use compile_features to set min C++ standard (#647) 2023-05-25 19:34:34 +02:00
SpaceIm
69557d4623
add FTXUI_DEV_WARNINGS option in CMakeLists (#648)
This option allows to enable warnings as errors, and add more compiler warnings
2023-05-23 14:38:49 +02:00