Commit Graph

666 Commits

Author SHA1 Message Date
ArthurSonzogni
634870f44d
Avoid breaking changes. 2024-12-26 18:47:56 +01:00
Vemy
6900283afe
Fix: Properly changing window title text color #940 (#961) 2024-12-26 18:47:56 +01:00
Dmitry Nefedov
a015d8b2d8
Clear terminal output of interactive screen on resize if alternate screen not in use (#952) 2024-12-26 18:47:56 +01:00
Brian
aae4e55e43
Fixed typo on border (#956)
Fixed minor issue in function name
2024-12-26 18:47:56 +01:00
Boris Jaulmes
8e25a75b73
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-12-26 18:47:56 +01:00
Mikołaj Lubiak
024ce3908e
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-12-26 18:47:54 +01:00
ArthurSonzogni
d5099afa18
Fix CQ failures. 2024-12-26 18:47:11 +01:00
ArthurSonzogni
6a790edb6b
Quickfix 2024-12-26 18:47:11 +01:00
Arthur Sonzogni
0855d008df
Apply Clang-tidy (#918) 2024-12-26 18:47:09 +01:00
Arthur Sonzogni
995a33ac89
Table: support initializer list constructor. (#915)
To avoid burdening the user with explicit type construction when using
the library, we can use a constructor that accepts an initializer list
(std::initializer_list). This allows users to pass initializer lists
directly without having to wrap them in
std::vector<std::vector<std::string>>. This resolves the ambiguous case
when the inner list contains only two elements.

Bug:https://github.com/ArthurSonzogni/FTXUI/issues/912
2024-12-26 18:46:49 +01:00
Paolo Bosetti
f35dc7b4c9
Added -fPIC compile option (#913)
Added -fPIC compile option.
2024-12-26 18:46:49 +01:00
LiAuTraver
b05ff6a518
add missing include guard for screen/pixel.hpp (#890) 2024-12-26 18:46:49 +01:00
Arthur Sonzogni
128e7215df
Color alpha support. (#884) 2024-12-26 18:46:49 +01:00
ArthurSonzogni
67984b2afd
Fix Color::HSV(h,0,v)
There was a problem when v==0
2024-12-26 18:46:48 +01:00
Felix
43cf8e7a94
Solve issues with atomic copy (#867) 2024-12-26 18:46:48 +01:00
Arthur Sonzogni
697671d9ed
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-12-26 18:46:48 +01:00
ArthurSonzogni
3a51d782ef
Dropdown: Fix title not updated.
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-12-26 18:46:48 +01:00
ccn
1b2017e6f5
Update index.html (#858)
correct spelling
2024-12-26 18:46:48 +01:00
ccn
abddaa0c0a
Update homescreen.cpp (#859)
fix typo
2024-12-26 18:46:48 +01:00
ccn
306d1b6d3b
Update flex.cpp (#860)
fix typo
2024-12-26 18:46:48 +01:00
Arthur Sonzogni
343e3ab226
Generate compile commands for clangd. (#855)
Fix all the diagnostics reported.

Bug: https://github.com/ArthurSonzogni/FTXUI/issues/828
2024-12-26 18:46:48 +01:00
Arthur Sonzogni
e3eb8b1cb7
Fix Menu focus. (#850)
Bug:https://github.com/ArthurSonzogni/FTXUI/issues/841
2024-12-26 18:46:48 +01:00
Jørn Gustav Larsen
5daedf79ad
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-12-26 18:46:48 +01:00
Mark Antabi
9b6c4a7b4b
Allow user to specify window element border. (#849) 2024-12-26 18:46:47 +01:00
ArthurSonzogni
9beb235c0e
Apply clang-tidy. 2024-12-26 18:46:47 +01:00
Clancy Walters
2a69cd75d5
Prefer Exit() over OnExit() (#847)
This is a no-op patch, but prefered, because this centralize the exit path below `Exit()`.
2024-12-26 18:46:47 +01:00
Arthur Sonzogni
03e6685df5
Flush before applying a new configuration. (#848)
This avoids an ordering problem with whatever the user printed and
interacting with termios/WinAPI.

Bug:https://github.com/ArthurSonzogni/FTXUI/issues/846
2024-12-26 18:46:47 +01:00
Dimo Markov
a006bcafe1
Separate a reusable Image class from Screen (#834)
Co-authored-by: ArthurSonzogni <sonzogniarthur@gmail.com>
2024-12-26 18:46:47 +01:00
na-trium-144
57ebf6c8c1
Fix ResizableSplit handling keyboard navigation incorrectly (#842)
Co-authored-by: ArthurSonzogni <sonzogniarthur@gmail.com>
2024-12-26 18:46:47 +01:00
ArthurSonzogni
231c1dfd56
Fix minor compile error. 2024-12-26 18:46:47 +01:00
James
3b6e0d5a38
Feature: Dropdown options with callback (#826)
Co-authored-by: ArthurSonzogni <sonzogniarthur@gmail.com>
2024-12-26 18:46:45 +01:00
Jørn Gustav Larsen
d8617ec2b6
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-12-26 18:46:18 +01:00
Arthur Sonzogni
f81c5d94a5
Revert change to button example. (#835)
It was introduced mistakenly by:
f495ce029c
2024-12-26 18:46:16 +01:00
Arthur Sonzogni
fed24da54e
Update mainpage.md
Fixed: https://github.com/ArthurSonzogni/FTXUI/issues/812
2024-12-26 18:45:44 +01:00
rio
c8c3f8311e
Make Checkbox take focus when clicked (#810) 2024-12-26 18:45:44 +01:00
Arthur Sonzogni
6039aedfcc
Button: invoke on_click at the end. (#807)
Some users might destroy `this`, which would result in UAF.

In the future, we should consider alternatives like posting a task to
the main loop, or rely on users for this.

Fixed:https://github.com/ArthurSonzogni/FTXUI/issues/804
2024-12-26 18:45:44 +01:00
nyako
2759cfab8d
ftxui_set_options: properly check the current compiler. (#802)
This solve the issue encountered when using clang under MSVC.
2024-12-26 18:45:44 +01:00
Particle_G
aceabdb4d4
Add missing Checkbox() implementation (#796)
Fix: #795
2024-12-26 18:45:44 +01:00
Arthur Sonzogni
1d797eeed4
Restore cursor shape on exit. (#793) (#794)
Fixed: https://github.com/ArthurSonzogni/FTXUI/issues/792
2024-12-26 18:45:44 +01:00
Arthur Sonzogni
6618d099f5
Restore cursor shape on exit. (#793)
Fixed: https://github.com/ArthurSonzogni/FTXUI/issues/792
2024-12-26 18:45:43 +01:00
ArthurSonzogni
4dd9d4b1d0
Fix default for ScreenInteractive::Fullscreen()
It was intended to open gthe alternate screen.
2024-12-26 18:45:43 +01:00
Arthur Sonzogni
d6918c6cb1
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>
2024-12-26 18:45:43 +01:00
Clément Roblot
64436fc52b
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>
2024-12-26 18:45:43 +01:00
chrysante
19dd2afa16
Fix Input onchange not called (#776) 2024-12-26 18:45:43 +01:00
benoitdudu
37259aceaf
fix the doxygen documentation by moving comments at the right place (#768) 2024-12-26 18:45:43 +01:00
Clément Roblot
cc998af4d8
Scrollbar coloring (#755)
This a proposed MR to fix #754. While building the scroll bar the pixels were completely reseted thus canceling any style previously applied to said pixels. This MR removes this resetting of the pixels and leaves only the drawing of the shape of the scroll bar.
2024-12-26 18:45:43 +01:00
Arthur Sonzogni
19ffc37696
Feature: hscroll_indicator (#753)
This is the symetrical of `vscroll_indicator`.

Requested by @ibrahimnasson.

Fixed:https://github.com/ArthurSonzogni/FTXUI/issues/752
2024-12-26 18:45:41 +01: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