mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-06-25 00:52:09 +08:00
Add ::Fullscreen and ::FullscreenPrimaryScreen
This commit is contained in:
parent
77169b618d
commit
c5ee8d58bb
@ -27,6 +27,9 @@ current (development)
|
||||
```
|
||||
A couple of components are now activated when the mouse is pressed,
|
||||
as opposed to released.
|
||||
- Feature: Add `ScreenInteractive::FullscreenPrimaryScreen()`. This allows
|
||||
displaying a fullscreen component on the primary screen, as opposed to the
|
||||
alternate screen.
|
||||
- Bugfix: `Input` `onchange` was not called on backspace or delete key.
|
||||
Fixed by @chrysante in chrysante in PR #776.
|
||||
|
||||
|
@ -32,6 +32,7 @@ class ScreenInteractive : public Screen {
|
||||
static ScreenInteractive FixedSize(int dimx, int dimy);
|
||||
static ScreenInteractive Fullscreen();
|
||||
static ScreenInteractive FullscreenPrimaryScreen();
|
||||
static ScreenInteractive FullscreenAlternateScreen();
|
||||
static ScreenInteractive FitComponent();
|
||||
static ScreenInteractive TerminalOutput();
|
||||
|
||||
|
@ -352,16 +352,19 @@ ScreenInteractive ScreenInteractive::FixedSize(int dimx, int dimy) {
|
||||
};
|
||||
}
|
||||
|
||||
/// @ingroup component
|
||||
/// Create a ScreenInteractive taking the full terminal size. This is using the
|
||||
/// alternate screen buffer to avoid messing with the terminal content.
|
||||
/// @note This is the same as `ScreenInteractive::FullscreenAlternateScreen()`
|
||||
// static
|
||||
ScreenInteractive ScreenInteractive::Fullscreen() {
|
||||
return {
|
||||
0,
|
||||
0,
|
||||
Dimension::Fullscreen,
|
||||
true,
|
||||
};
|
||||
return FullscreenPrimaryScreen();
|
||||
}
|
||||
|
||||
/// @ingroup component
|
||||
/// Create a ScreenInteractive taking the full terminal size. The primary screen
|
||||
/// buffer is being used. It means if the terminal is resized, the previous
|
||||
/// content might mess up with the terminal content.
|
||||
// static
|
||||
ScreenInteractive ScreenInteractive::FullscreenPrimaryScreen() {
|
||||
return {
|
||||
@ -372,6 +375,19 @@ ScreenInteractive ScreenInteractive::FullscreenPrimaryScreen() {
|
||||
};
|
||||
}
|
||||
|
||||
/// @ingroup component
|
||||
/// Create a ScreenInteractive taking the full terminal size. This is using the
|
||||
/// alternate screen buffer to avoid messing with the terminal content.
|
||||
// static
|
||||
ScreenInteractive ScreenInteractive::FullscreenAlternateScreen() {
|
||||
return {
|
||||
0,
|
||||
0,
|
||||
Dimension::Fullscreen,
|
||||
true,
|
||||
};
|
||||
}
|
||||
|
||||
// static
|
||||
ScreenInteractive ScreenInteractive::TerminalOutput() {
|
||||
return {
|
||||
|
Loading…
Reference in New Issue
Block a user