Commit Graph

110 Commits

Author SHA1 Message Date
ArthurSonzogni
add5f40d31
Restore dbox behavior from ftxui5.0.0
Some checks failed
Build / Bazel, ${{ matrix.compiler }}, ${{ matrix.os }} (cl, windows-latest) (push) Has been cancelled
Build / Bazel, ${{ matrix.compiler }}, ${{ matrix.os }} (gcc, macos-latest) (push) Has been cancelled
Build / Bazel, ${{ matrix.compiler }}, ${{ matrix.os }} (gcc, ubuntu-latest) (push) Has been cancelled
Build / Bazel, ${{ matrix.compiler }}, ${{ matrix.os }} (llvm, macos-latest) (push) Has been cancelled
Build / Bazel, ${{ matrix.compiler }}, ${{ matrix.os }} (llvm, ubuntu-latest) (push) Has been cancelled
Build / CMake, ${{ matrix.compiler }}, ${{ matrix.os }} (cl, Windows MSVC, windows-latest) (push) Has been cancelled
Build / CMake, ${{ matrix.compiler }}, ${{ matrix.os }} (gcc, Linux GCC, ubuntu-latest) (push) Has been cancelled
Build / CMake, ${{ matrix.compiler }}, ${{ matrix.os }} (llvm, llvm-cov gcov, Linux Clang, ubuntu-latest) (push) Has been cancelled
Build / CMake, ${{ matrix.compiler }}, ${{ matrix.os }} (llvm, llvm-cov gcov, MacOS clang, macos-latest) (push) Has been cancelled
Documentation / documentation (push) Has been cancelled
Bug:https://github.com/eclipse-ecal/ecal/pull/2095
2025-05-02 16:48:00 +02:00
ArthurSonzogni
784f53fd7e
Remove attestion for Bazel 2025-05-01 11:30:12 +02:00
ArthurSonzogni
799d8a267e
Fix release workflow 2025-05-01 10:52:54 +02:00
ArthurSonzogni
f4513702b0
Fix release workflow 2025-05-01 10:40:53 +02:00
ArthurSonzogni
694fa6bf5c
Fix publish workflow 2025-05-01 10:09:18 +02:00
Arthur Sonzogni
625915b52c
Fix publish workflow (#1041) 2025-05-01 10:06:49 +02:00
Arthur Sonzogni
2d4c114008
v6.1.2 (#1040) 2025-05-01 10:01:05 +02:00
Arthur Sonzogni
bcdcf70348
Fix Bazel Central Repository Workflow (#1038)
Some checks are pending
Build / Bazel, ${{ matrix.compiler }}, ${{ matrix.os }} (cl, windows-latest) (push) Waiting to run
Build / Bazel, ${{ matrix.compiler }}, ${{ matrix.os }} (gcc, macos-latest) (push) Waiting to run
Build / Bazel, ${{ matrix.compiler }}, ${{ matrix.os }} (gcc, ubuntu-latest) (push) Waiting to run
Build / Bazel, ${{ matrix.compiler }}, ${{ matrix.os }} (llvm, macos-latest) (push) Waiting to run
Build / Bazel, ${{ matrix.compiler }}, ${{ matrix.os }} (llvm, ubuntu-latest) (push) Waiting to run
Build / CMake, ${{ matrix.compiler }}, ${{ matrix.os }} (cl, Windows MSVC, windows-latest) (push) Waiting to run
Build / CMake, ${{ matrix.compiler }}, ${{ matrix.os }} (gcc, Linux GCC, ubuntu-latest) (push) Waiting to run
Build / CMake, ${{ matrix.compiler }}, ${{ matrix.os }} (llvm, llvm-cov gcov, Linux Clang, ubuntu-latest) (push) Waiting to run
Build / CMake, ${{ matrix.compiler }}, ${{ matrix.os }} (llvm, llvm-cov gcov, MacOS clang, macos-latest) (push) Waiting to run
Build / Create release (push) Blocked by required conditions
Build / Build packages (build/ftxui*Darwin*, macos-latest) (push) Blocked by required conditions
Build / Build packages (build/ftxui*Linux*, ubuntu-latest) (push) Blocked by required conditions
Build / Build packages (build/ftxui*Win64*, windows-latest) (push) Blocked by required conditions
Build / Build source package (push) Blocked by required conditions
Build / documentation (push) Waiting to run
2025-04-30 12:04:32 +02:00
Arthur Sonzogni
4231c4903b
Release version 6.1.0. (#1037)
Some checks are pending
Build / Bazel, ${{ matrix.compiler }}, ${{ matrix.os }} (cl, windows-latest) (push) Waiting to run
Build / Bazel, ${{ matrix.compiler }}, ${{ matrix.os }} (gcc, macos-latest) (push) Waiting to run
Build / Bazel, ${{ matrix.compiler }}, ${{ matrix.os }} (gcc, ubuntu-latest) (push) Waiting to run
Build / Bazel, ${{ matrix.compiler }}, ${{ matrix.os }} (llvm, macos-latest) (push) Waiting to run
Build / Bazel, ${{ matrix.compiler }}, ${{ matrix.os }} (llvm, ubuntu-latest) (push) Waiting to run
Build / CMake, ${{ matrix.compiler }}, ${{ matrix.os }} (cl, Windows MSVC, windows-latest) (push) Waiting to run
Build / CMake, ${{ matrix.compiler }}, ${{ matrix.os }} (gcc, Linux GCC, ubuntu-latest) (push) Waiting to run
Build / CMake, ${{ matrix.compiler }}, ${{ matrix.os }} (llvm, llvm-cov gcov, Linux Clang, ubuntu-latest) (push) Waiting to run
Build / CMake, ${{ matrix.compiler }}, ${{ matrix.os }} (llvm, llvm-cov gcov, MacOS clang, macos-latest) (push) Waiting to run
Build / Create release (push) Blocked by required conditions
Build / Build packages (build/ftxui*Darwin*, macos-latest) (push) Blocked by required conditions
Build / Build packages (build/ftxui*Linux*, ubuntu-latest) (push) Blocked by required conditions
Build / Build packages (build/ftxui*Win64*, windows-latest) (push) Blocked by required conditions
Build / Build source package (push) Blocked by required conditions
Build / documentation (push) Waiting to run
This highlight support for the Bazel build system.
2025-04-29 16:05:11 +02:00
Arthur Sonzogni
10d73d365f
Support Bazel build system (#1033)
Bug:https://github.com/ArthurSonzogni/FTXUI/issues/1032
Fixed:https://github.com/ArthurSonzogni/FTXUI/issues/1032
2025-04-29 15:11:10 +02:00
Arthur Sonzogni
07fd3e685a
Bugfix: Avoid crash with ResizeableSplit. (#1025)
Component
---------
- Bugfix: Fix a crash with ResizeableSplit. See #1023.
  - Clamp screen size to terminal size.
  - Disallow `ResizeableSplit` with negative size.

Dom
---
- Bugfix: Disallow specifying a negative size constraint. See #1023.

Bug: https://github.com/ArthurSonzogni/FTXUI/issues/1023
2025-03-31 18:19:48 +02:00
ArthurSonzogni
09eb2f7fb0
v6.0.2 2025-03-30 01:27:57 +01:00
Arthur Sonzogni
4ba7dd2c5e
Window: Major crash fix. (#1021)
A patch handling focus was recently merged, but a special condition on
Windows was inverted, causing a segfault.

Bug:https://github.com/ArthurSonzogni/FTXUI/issues/1020
2025-03-29 12:51:08 +01:00
ArthurSonzogni
ee24bec3ba
v6.0.1
Same as v6.0.0.

Due to a problem tag v6.0.0 was replaced. This isn't a good practice and affect
developers that started using it in the short timeframe. Submitting a new
release with the same content is the best way to fix this.

Bug:https://github.com/ArthurSonzogni/FTXUI/issues/1017
Bug:https://github.com/ArthurSonzogni/FTXUI/issues/1019
2025-03-28 12:08:59 +01:00
ArthurSonzogni
b69e0f8b91
v6.0.0 2025-03-23 18:19:57 +01:00
KenReneris
2c9a828402
Add support for italics (#1009)
Co-authored-by: Ken Reneris <ms/devops kreneris@microsoft.com>
Co-authored-by: ArthurSonzogni <sonzogniarthur@gmail.com>
2025-03-22 18:03:43 +01:00
Ayaan
b0e087ecef
Merge dom and component focus (#978)
Instead of two levels of focus with `focus` and `selected`, use a recursive
level. The components set the one "active" and hbox/vbox/dbox 

Co-authored-by: ArthurSonzogni <sonzogniarthur@gmail.com>
2025-03-19 15:33:05 +01:00
Arthur Sonzogni
d75108e960
Fix linear_gradient float precision bug.
This was reported by:
https://github.com/ArthurSonzogni/FTXUI/issues/998

Indeed, the `t` interpolation factor, which is itself interpolated might become
slightly larger than 1.0. This is due to the float precision.
This was supposedly handled, but there was an off-by-one error in the check.

Along the way, fix a bug found by a fuzzer.

Bug: https://github.com/ArthurSonzogni/FTXUI/issues/998
Fixed: https://github.com/ArthurSonzogni/FTXUI/issues/998
2025-02-10 23:10:27 +01:00
Clément Roblot
6fafa2dfed
Feature: Selection
Add support for selection content in the dom.
2024-12-27 09:45:13 +01:00
Boris Jaulmes
70bc44d28b
Allow a Dimension::Fit to extend beyond the terminal maximum height (#950)
For long tables (and other DOM elements), one may want the screen to render on dimensions higher than the terminal.  
Hence, this PR proposes a way to do so, with an optional parameter in the `Dimension::Fit` util function.

Discussions / Issues :  
- https://github.com/ArthurSonzogni/FTXUI/issues/572
- https://github.com/ArthurSonzogni/FTXUI/discussions/949

Bug:https://github.com/ArthurSonzogni/FTXUI/issues/572
Fixed:Bug:https://github.com/ArthurSonzogni/FTXUI/issues/572
Co-authored-by: ArthurSonzogni <sonzogniarthur@gmail.com>
2024-11-07 21:07:09 +01:00
Mikołaj Lubiak
99df1ac8ba
Add SliderWithCallback component (#938)
Add SliderOption::on_change.

Useful to observe a change to the value.

Signed-off-by: Mikołaj Lubiak <lubiak@proton.me>
Co-authored-by: ArthurSonzogni <sonzogniarthur@gmail.com>
2024-10-29 08:03:59 +01:00
Herring
1d40687a40
Add index to EntryState (#933)
Co-authored-by: ArthurSonzogni <sonzogniarthur@gmail.com>
2024-09-30 23:18:59 +02:00
Arthur Sonzogni
ff305147ca
Color alpha support. (#884) 2024-06-13 18:43:14 +02:00
Arthur Sonzogni
ecacb22d37
Dropdown: Fix title not updated. (#851)
A bug was introduced by:
https://github.com/ArthurSonzogni/FTXUI/pull/826

The checkbox label wasn't updated.

Bug:https://github.com/ArthurSonzogni/FTXUI/issues/861
2024-05-15 18:23:59 +02:00
Arthur Sonzogni
6a755f3760
Fix Menu focus. (#850)
Bug:https://github.com/ArthurSonzogni/FTXUI/issues/841
2024-04-28 16:03:00 +02:00
Jørn Gustav Larsen
d386df6f94
Enable raw keyboard input (#832)
In order for applications to receive all keyboard inputs, including the
Ctrl-C and Ctrl-Z, the raw input mode has been enabled. As result the
SIGINT will no longer be used, instead the keyboard Ctrl-C event is used
for exiting the framework, but only if no components has made use of it.

Co-authored-by: Jørn Gustav Larsen <jgl@fasttracksoftware.com>
Co-authored-by: ArthurSonzogni <sonzogniarthur@gmail.com>
2024-04-28 15:17:54 +02:00
Dimo Markov
293ff179f6
Separate a reusable Image class from Screen (#834)
Co-authored-by: ArthurSonzogni <sonzogniarthur@gmail.com>
2024-04-27 11:03:44 +02:00
na-trium-144
0dfd59bd09
Fix ResizableSplit handling keyboard navigation incorrectly (#842)
Co-authored-by: ArthurSonzogni <sonzogniarthur@gmail.com>
2024-04-18 17:28:28 +02:00
James
3c9fa60d28
Feature: Dropdown options with callback (#826)
Co-authored-by: ArthurSonzogni <sonzogniarthur@gmail.com>
2024-04-06 17:45:10 +02:00
Jørn Gustav Larsen
2216f3a5da
Problem with setting the cursor position on the right screen edge when drawing. (#831)
When moving the cursor back to its original location, a problem arises when cursor placed in the right edge column, where an off by one error occur. This pull request will resolve this problem.

Co-authored-by: Jørn Gustav Larsen <jgl@fasttracksoftware.com>
Co-authored-by: Jørn Gustav Larsen <jgl@adminbyrequest.com>
Co-authored-by: ArthurSonzogni <sonzogniarthur@gmail.com>
2024-04-03 21:32:19 +02:00
Arthur Sonzogni
a7b6785420
Restore cursor shape on exit. (#793) (#794)
Fixed: https://github.com/ArthurSonzogni/FTXUI/issues/792
2023-12-17 10:35:21 +01:00
Arthur Sonzogni
348c3853d4
Restore cursor shape on exit. (#793)
Fixed: https://github.com/ArthurSonzogni/FTXUI/issues/792
2023-12-17 10:24:33 +01:00
Arthur Sonzogni
b970cb6ea8
feature: allow fullscreen without alternative screen (#777)
This should solve #766

The original PR was:
#767

Co-authored-by: rbrugo <brugo.riccardo@gmail.com>
Co-authored-by: ArthurSonzogni <sonzogniarthur@gmail.com>
2023-11-11 17:57:07 +01:00
Clément Roblot
c31aecf2ed
Checkbox button debounce (#774)
This fixes: https://github.com/ArthurSonzogni/FTXUI/issues/773

Dragging the mouse with the left button pressed now avoids activating multiple
checkboxes.

Add support for detecting mouse press transition. Added:
```cpp
// The previous mouse event.
Mouse Mouse::previous;

// Return whether the mouse transitionned from:
// released to pressed => IsPressed()
// pressed to pressed => IsHeld()
// pressed to released => IsReleased()
bool Mouse::IsPressed(Button button) const;
bool Mouse::IsHeld(Button button) const;
bool Mouse::IsReleased(Button button) const;
```
A couple of components are now activated when the mouse is pressed,
as opposed to released.

Co-authored-by: ArthurSonzogni <sonzogniarthur@gmail.com>
2023-11-11 17:33:50 +01:00
chrysante
e8589dd533
Fix Input onchange not called (#776) 2023-11-11 17:29:19 +01:00
Arthur Sonzogni
c24a274292
Feature: hscroll_indicator (#753)
This is the symetrical of `vscroll_indicator`.

Requested by @ibrahimnasson.

Fixed:https://github.com/ArthurSonzogni/FTXUI/issues/752
2023-09-26 23:08:42 +02:00
Claus Klein
dd6a5d371f
Fix CMAKE_UNITY_BUILD usage (#738)
Add missing include guard.
This fix https://github.com/cpp-best-practices/cmake_template/issues/64

Co-authored-by: ArthurSonzogni <sonzogniarthur@gmail.com>
2023-08-28 21:38:51 +02:00
MingSheng
05c7bee6dd
Feature: input can now use overwrite mode when toggled with insert key (#735)
Co-authored-by: ArthurSonzogni <sonzogniarthur@gmail.com>
2023-08-28 21:07:26 +02:00
ArthurSonzogni
cdf28903a7
Release v5.0.0 2023-08-19 15:46:36 +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
Arthur Sonzogni
8ae1c95d18
Update CHANGELOG.md 2023-08-13 17:36:41 +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
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
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
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
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
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
Arthur Sonzogni
d00d946282
Update CHANGELOG.md (#651) 2023-05-29 11:52:39 +02:00
Henrik Gaßmann
b1c53bcd15
build: Check package version in find_package (#643)
Modify the `ftxui-config.cmake.in` file so that it includes
`ftxui-targets.cmake`. This causes cmake to check the version is
compatible with what the user requested.

This patch also includes additional minor changes.

Co-authored-by: ArthurSonzogni <sonzogniarthur@gmail.com>
2023-05-19 17:50:23 +02:00
ArthurSonzogni
4b9b0635c4
Update the CHANGELOG 2023-05-19 11:59:23 +02:00