Skip to content
You are viewing documentation for v6.1.0. Switch to latest (main).

ftxui::ScreenInteractive ​

cpp
#include <ftxui/component/screen_interactive.hpp>

Inherits from: ftxui::Screen

Examples: component/button, component/button_animated, component/button_in_frame, component/button_style, component/canvas_animated, component/checkbox, component/checkbox_in_frame, component/collapsible, component/composition, component/custom_loop, component/dropdown, component/dropdown_custom (+38 more)

Summary ​

SymbolDescription
Private
FixedSize
FitComponent
TerminalOutput
ActiveReturn the currently active screen, or null if none.
RequestAnimationFrameAdd a task to draw the screen one more time, until all the animations are done.
WithRestoredIODecorate a function. It executes the same way, but with the currently active screen terminal hooks temporarilly uninstalled during its execution.
ForceHandleCtrlCForce FTXUI to handle or not handle Ctrl-C, even if the component catches the Event::CtrlC.
ForceHandleCtrlZForce FTXUI to handle or not handle Ctrl-Z, even if the component catches the Event::CtrlZ.
GetSelectionReturns the content of the current selection.
SelectionChange

Public Attributes ​

Private ​

cpp
friend Private;

Static Functions ​

FixedSize ​

cpp
static ScreenInteractive FixedSize(int dimx, int dimy);

FitComponent ​

TerminalOutput ​

Active ​

cpp
static ScreenInteractive * Active();

Return the currently active screen, or null if none.

Public Member Functions ​

RequestAnimationFrame ​

Add a task to draw the screen one more time, until all the animations are done.

WithRestoredIO ​

cpp
Closure WithRestoredIO(Closure);

Decorate a function. It executes the same way, but with the currently active screen terminal hooks temporarilly uninstalled during its execution.

Parameters:

  • fn: The function to decorate.

ForceHandleCtrlC ​

cpp
void ForceHandleCtrlC(bool force);

Force FTXUI to handle or not handle Ctrl-C, even if the component catches the Event::CtrlC.

ForceHandleCtrlZ ​

cpp
void ForceHandleCtrlZ(bool force);

Force FTXUI to handle or not handle Ctrl-Z, even if the component catches the Event::CtrlZ.

GetSelection ​

cpp
std::string GetSelection();

Returns the content of the current selection.

SelectionChange ​

cpp
void SelectionChange(std::function< void()> callback);