ftxui
ftxui::CapturedMouseInterface
ftxui::ComponentBase
ftxui::EntryState
ftxui::UnderlineOption
ftxui::AnimatedColorOption
ftxui::AnimatedColorsOption
ftxui::MenuEntryOption
ftxui::MenuOption
ftxui::ButtonOption
ftxui::CheckboxOption
ftxui::InputState
ftxui::InputOption
ftxui::RadioboxOption
ftxui::ResizableSplitOption
ftxui::SliderOption
ftxui::WindowRenderState
ftxui::WindowOptions
ftxui::DropdownOption
ftxui::Event
ftxui::Loop
ftxui::Mouse
ftxui::SenderImpl
ftxui::ReceiverImpl
ftxui::ScreenInteractive
ftxui::AnimationTask
ftxui::Canvas
ftxui::FlexboxConfig
ftxui::LinearGradient
ftxui::Node
ftxui::Requirement
ftxui::Selection
ftxui::Table
ftxui::TableSelection
ftxui::Box
ftxui::Color
ftxui::ColorInfo
ftxui::Image
ftxui::Pixel
ftxui::Screen
ftxui::Dimensions
ftxui::AutoReset
ftxui::ConstRef
ftxui::Ref
ftxui::StringRef
ftxui::ConstStringRef
ftxui::ConstStringListRef
ftxui::CatchEventBase
ftxui::ContainerBase
ftxui::VerticalContainer
ftxui::HorizontalContainer
ftxui::TabContainer
ftxui::StackedContainer
ftxui::MenuBase
ftxui::TerminalInputParser
ftxui::NodeDecorator
ftxui::animation
ftxui::Container
ftxui::Dimension
ftxui::literals
ftxui::Terminal
ftxui::box_helper
ftxui::flexbox_helper
ftxui::util
Direction
ftxui::Direction
Up
= 0
Down
= 1
Left
= 2
Right
= 3
BorderStyle
ftxui::BorderStyle
LIGHT
DASHED
HEAVY
DOUBLE
ROUNDED
EMPTY
WidthOrHeight
ftxui::WidthOrHeight
WIDTH
HEIGHT
Constraint
ftxui::Constraint
LESS_THAN
EQUAL
GREATER_THAN
int8_t WordBreakProperty ftxui::WordBreakProperty ALetter CR Double_Quote Extend ExtendNumLet Format Hebrew_Letter Katakana LF MidLetter MidNum MidNumLet Newline Numeric Regional_Indicator Single_Quote WSegSpace ZWJ
std::unique_ptr< CapturedMouseInterface > using CapturedMouse = std::unique_ptr<CapturedMouseInterface> CapturedMouse ftxui::CapturedMouse
std::function< Component(Component)> using ComponentDecorator = std::function<Component(Component)> ComponentDecorator ftxui::ComponentDecorator
std::function< Element(Element)> using ElementDecorator = std::function<Element(Element)> ElementDecorator ftxui::ElementDecorator
std::shared_ptr< ComponentBase > typedef std::shared_ptr< ComponentBase > Component = std::shared_ptr<ComponentBase> Component ftxui::Component
std::vector< Component > using Components = std::vector<Component> Components ftxui::Components
class T
std::unique_ptr< SenderImpl< T > > using Sender = std::unique_ptr<SenderImpl<T>> Sender ftxui::Sender
class T
std::unique_ptr< ReceiverImpl< T > > using Receiver = std::unique_ptr<ReceiverImpl<T>> Receiver ftxui::Receiver
std::function< void()> using Closure = std::function<void()> Closure ftxui::Closure
std::variant< Event, Closure, AnimationTask > using Task = std::variant<Event, Closure, AnimationTask> Task ftxui::Task
std::shared_ptr< Node > typedef std::shared_ptr< Node > Element = std::shared_ptr<Node> Element ftxui::Element
std::vector< Element > typedef std::vector< Element > Elements = std::vector<Element> Elements ftxui::Elements
std::function< Element(Element)> using Decorator = std::function<Element(Element)> Decorator ftxui::Decorator
std::function< std::vector< int >(int, int)> using GraphFunction = std::function<std::vector<int>(int, int)> GraphFunction ftxui::GraphFunction
const std::map< std::string, std::string > const std::map<std::string, std::string> g_uniformize g_uniformize ftxui::g_uniformize
const std::array< ColorInfo, 256 > const std::array<ColorInfo, 256> palette256 palette256 ftxui::palette256
class T
class... Args Args
std::shared_ptr< T > std::shared_ptr< T > Make (Args &&... args) Make ftxui::Make Args &&... args
Component Component operator| (Component component, ComponentDecorator decorator) operator| ftxui::operator| Component component ComponentDecorator decorator
Component Component operator| (Component component, ElementDecorator decorator) operator| ftxui::operator| Component component ElementDecorator decorator
Component & Component & operator|= (Component &component, ComponentDecorator decorator) operator|= ftxui::operator|= Component & component ComponentDecorator decorator
Component & Component & operator|= (Component &component, ElementDecorator decorator) operator|= ftxui::operator|= Component & component ElementDecorator decorator
Component Component Button (ButtonOption option) Button ftxui::Button ButtonOption options option

Draw a button. Execute a function when clicked.

option

Additional optional parameters.

ButtonBase

### Example

    autoscreen=ScreenInteractive::FitComponent();
    Componentbutton=Button({
    .label="Clicktoquit",
    .on_click=screen.ExitLoopClosure(),
    });
    screen.Loop(button)

### Output

    ┌─────────────┐
    │Clicktoquit│
    └─────────────┘

Component Component Button (ConstStringRef label, std::function< void()> on_click, ButtonOption option) Button ftxui::Button ConstStringRef label std::function< void()> on_click ButtonOption options option ButtonOption::Simple()

Draw a button. Execute a function when clicked.

label

The label of the button.

on_click

The action to execute when clicked.

option

Additional optional parameters.

ButtonBase

### Example

    autoscreen=ScreenInteractive::FitComponent();
    std::stringlabel="Clicktoquit";
    Componentbutton=Button(&label,screen.ExitLoopClosure());
    screen.Loop(button)

### Output

    ┌─────────────┐
    │Clicktoquit│
    └─────────────┘

Component Component Checkbox (CheckboxOption option) Checkbox ftxui::Checkbox CheckboxOption options option

Draw checkable element.

option

Additional optional parameters.

CheckboxBase

### Example

    autoscreen=ScreenInteractive::FitComponent();
    CheckboxOptionoption;
    option.label="Makeasandwidth";
    option.checked=false;
    Componentcheckbox=Checkbox(option);
    screen.Loop(checkbox)

### Output

    ☐Makeasandwitch

Component Component Checkbox (ConstStringRef label, bool *checked, CheckboxOption option) Checkbox ftxui::Checkbox ConstStringRef label bool * checked CheckboxOption options option CheckboxOption::Simple()

Draw checkable element.

label

The label of the checkbox.

checked

Whether the checkbox is checked or not.

option

Additional optional parameters.

CheckboxBase

### Example

    autoscreen=ScreenInteractive::FitComponent();
    std::stringlabel="Makeasandwidth";
    boolchecked=false;
    Componentcheckbox=Checkbox(&label,&checked);
    screen.Loop(checkbox)

### Output

    ☐Makeasandwitch

Component Component Input (InputOption option) Input ftxui::Input InputOption options option {}

An input box for editing text.

option

Additional optional parameters.

InputBase

### Example

    autoscreen=ScreenInteractive::FitComponent();
    std::stringcontent="";
    std::stringplaceholder="placeholder";
    Componentinput=Input({
    .content=&content,
    .placeholder=&placeholder,
    })
    screen.Loop(input);

### Output

    placeholder

Component Component Input (StringRef content, InputOption option) Input ftxui::Input StringRef content InputOption options option {}

An input box for editing text.

content

The editable content.

option

Additional optional parameters.

InputBase

### Example

    autoscreen=ScreenInteractive::FitComponent();
    std::stringcontent="";
    std::stringplaceholder="placeholder";
    Componentinput=Input(content,{
    .placeholder=&placeholder,
    .password=true,
    })
    screen.Loop(input);

### Output

    placeholder

Component Component Input (StringRef content, StringRef placeholder, InputOption option) Input ftxui::Input StringRef content StringRef placeholder InputOption options option {}

An input box for editing text.

content

The editable content.

option

Additional optional parameters.

InputBase

### Example

    autoscreen=ScreenInteractive::FitComponent();
    std::stringcontent="";
    std::stringplaceholder="placeholder";
    Componentinput=Input(content,placeholder);
    screen.Loop(input);

### Output

    placeholder

Component Component Menu (MenuOption option) Menu ftxui::Menu MenuOption options option

A list of text. The focused element is selected.

option

a structure containing all the paramters.

### Example

    autoscreen=ScreenInteractive::TerminalOutput();
    std::vector<std::string>entries={
    "entry1",
    "entry2",
    "entry3",
    };
    intselected=0;
    automenu=Menu({
    .entries=&entries,
    .selected=&selected,
    });
    screen.Loop(menu);

### Output

    >entry1
    entry2
    entry3

Component Component Menu (ConstStringListRef entries, int *selected, MenuOption option) Menu ftxui::Menu ConstStringListRef entries int * selected_ selected MenuOption options option MenuOption::Vertical()

A list of text. The focused element is selected.

entries

The list of entries in the menu.

selected

The index of the currently selected element.

option

Additional optional parameters.

### Example

    autoscreen=ScreenInteractive::TerminalOutput();
    std::vector<std::string>entries={
    "entry1",
    "entry2",
    "entry3",
    };
    intselected=0;
    automenu=Menu(&entries,&selected);
    screen.Loop(menu);

### Output

    >entry1
    entry2
    entry3

Component Component MenuEntry (MenuEntryOption option) MenuEntry ftxui::MenuEntry MenuEntryOption options option

A specific menu entry. They can be put into a Container::Vertical to form a menu.

option

The parameters.

### Example

    autoscreen=ScreenInteractive::TerminalOutput();
    intselected=0;
    automenu=Container::Vertical({
    MenuEntry({.label="entry1"}),
    MenuEntry({.label="entry2"}),
    MenuEntry({.label="entry3"}),
    },&selected);
    screen.Loop(menu);

### Output

    >entry1
    entry2
    entry3

Component Component MenuEntry (ConstStringRef label, MenuEntryOption option) MenuEntry ftxui::MenuEntry ConstStringRef label MenuEntryOption options option {}

A specific menu entry. They can be put into a Container::Vertical to form a menu.

label

The text drawn representing this element.

option

Additional optional parameters.

### Example

    autoscreen=ScreenInteractive::TerminalOutput();
    intselected=0;
    automenu=Container::Vertical({
    MenuEntry("entry1"),
    MenuEntry("entry2"),
    MenuEntry("entry3"),
    },&selected);
    screen.Loop(menu);

### Output

    >entry1
    entry2
    entry3

Component Component Radiobox (RadioboxOption option) Radiobox ftxui::Radiobox RadioboxOption options option

A list of element, where only one can be selected.

option

The parameters

RadioboxBase

### Example

    autoscreen=ScreenInteractive::TerminalOutput();
    std::vector<std::string>entries={
    "entry1",
    "entry2",
    "entry3",
    };
    intselected=0;
    automenu=Radiobox({
    .entries=entries,
    .selected=&selected,
    });
    screen.Loop(menu);

### Output

    ◉entry1
    ○entry2
    ○entry3

NOLINTNEXTLINE
Component Component Radiobox (ConstStringListRef entries, int *selected, RadioboxOption option) Radiobox ftxui::Radiobox ConstStringListRef entries int * selected_ selected RadioboxOption options option {}

A list of element, where only one can be selected.

entries

The list of entries in the list.

selected

The index of the currently selected element.

option

Additional optional parameters.

RadioboxBase

### Example

    autoscreen=ScreenInteractive::TerminalOutput();
    std::vector<std::string>entries={
    "entry1",
    "entry2",
    "entry3",
    };
    intselected=0;
    automenu=Radiobox(&entries,&selected);
    screen.Loop(menu);

### Output

    ◉entry1
    ○entry2
    ○entry3

Component Component Dropdown (ConstStringListRef entries, int *selected) Dropdown ftxui::Dropdown ConstStringListRef entries int * selected

A dropdown menu.

entries

The list of entries to display.

selected

The index of the selected entry.

Component Component Dropdown (DropdownOption option) Dropdown ftxui::Dropdown DropdownOption options option

A dropdown menu.

option

The options for the dropdown.

Component Component Toggle (ConstStringListRef entries, int *selected) Toggle ftxui::Toggle ConstStringListRef entries int * selected

An horizontal list of elements. The user can navigate through them.

entries

The list of selectable entries to display.

selected

Reference the selected entry. See also |Menu|.

typename T
Component Component Slider (SliderOption< T > options) Slider ftxui::Slider SliderOption< T > options

A slider in any direction.

options

The options

### Example

    autoscreen=ScreenInteractive::TerminalOutput();
    intvalue=50;
    autoslider=Slider({
    .value=&value,
    .min=0,
    .max=100,
    .increment=20,
    });
    screen.Loop(slider);

Component Component Slider (ConstStringRef label, Ref< int > value, ConstRef< int > min, ConstRef< int > max, ConstRef< int > increment) Slider ftxui::Slider ConstStringRef label Ref< int > value ConstRef< int > min 0 ConstRef< int > max 100 ConstRef< int > increment 5

An horizontal slider.

label

The name of the slider.

value

The current value of the slider.

min

The minimum value.

max

The maximum value.

increment

The increment when used by the cursor.

### Example

    autoscreen=ScreenInteractive::TerminalOutput();
    intvalue=50;
    autoslider=Slider("Value:",&value,0,100,1);
    screen.Loop(slider);

### Output

    Value:[██████████████████████████]

Component Component Slider (ConstStringRef label, Ref< float > value, ConstRef< float > min=0.f, ConstRef< float > max=100.f, ConstRef< float > increment=5.f) Slider ftxui::Slider ConstStringRef label Ref< float > value ConstRef< float > min 0.f ConstRef< float > max 100.f ConstRef< float > increment 5.f
Component Component Slider (ConstStringRef label, Ref< long > value, ConstRef< long > min=0L, ConstRef< long > max=100L, ConstRef< long > increment=5L) Slider ftxui::Slider ConstStringRef label Ref< long > value ConstRef< long > min 0L ConstRef< long > max 100L ConstRef< long > increment 5L
Component Component ResizableSplit (ResizableSplitOption options) ResizableSplit ftxui::ResizableSplit ResizableSplitOption options

A split in between two components.

options

all the parameters.

### Example

    autoleft=Renderer([]{returntext("Left")|center;});
    autoright=Renderer([]{returntext("right")|center;});
    intleft_size=10;
    autocomponent=ResizableSplit({
    .main=left,
    .back=right,
    .direction=Direction::Left,
    .main_size=&left_size,
    .separator_func=[]{returnseparatorDouble();},
    });

### Output

    ║
    left║right
    ║

Component Component ResizableSplitLeft (Component main, Component back, int *main_size) ResizableSplitLeft ftxui::ResizableSplitLeft Component main Component back int * main_size

An horizontal split in between two components, configurable using the mouse.

main

The main component of size |main_size|, on the left.

back

The back component taking the remaining size, on the right.

main_size

The size of the |main| component.

### Example

    autoscreen=ScreenInteractive::Fullscreen();
    intleft_size=10;
    autoleft=Renderer([]{returntext("Left")|center;});
    autoright=Renderer([]{returntext("right")|center;});
    autosplit=ResizableSplitLeft(left,right,&left_size);
    screen.Loop(split);

### Output

    │
    left│right
    │

Component Component ResizableSplitRight (Component main, Component back, int *main_size) ResizableSplitRight ftxui::ResizableSplitRight Component main Component back int * main_size

An horizontal split in between two components, configurable using the mouse.

main

The main component of size |main_size|, on the right.

back

The back component taking the remaining size, on the left.

main_size

The size of the |main| component.

### Example

    autoscreen=ScreenInteractive::Fullscreen();
    intright_size=10;
    autoleft=Renderer([]{returntext("Left")|center;});
    autoright=Renderer([]{returntext("right")|center;});
    autosplit=ResizableSplitRight(right,left,&right_size)
    screen.Loop(split);

### Output

    │
    left│right
    │

Component Component ResizableSplitTop (Component main, Component back, int *main_size) ResizableSplitTop ftxui::ResizableSplitTop Component main Component back int * main_size

An vertical split in between two components, configurable using the mouse.

main

The main component of size |main_size|, on the top.

back

The back component taking the remaining size, on the bottom.

main_size

The size of the |main| component.

### Example

    autoscreen=ScreenInteractive::Fullscreen();
    inttop_size=1;
    autotop=Renderer([]{returntext("Top")|center;});
    autobottom=Renderer([]{returntext("Bottom")|center;});
    autosplit=ResizableSplitTop(top,bottom,&top_size)
    screen.Loop(split);

### Output

    top
    ────────────
    bottom

Component Component ResizableSplitBottom (Component main, Component back, int *main_size) ResizableSplitBottom ftxui::ResizableSplitBottom Component main Component back int * main_size

An vertical split in between two components, configurable using the mouse.

main

The main component of size |main_size|, on the bottom.

back

The back component taking the remaining size, on the top.

main_size

The size of the |main| component.

### Example

    autoscreen=ScreenInteractive::Fullscreen();
    intbottom_size=1;
    autotop=Renderer([]{returntext("Top")|center;});
    autobottom=Renderer([]{returntext("Bottom")|center;});
    autosplit=ResizableSplit::Bottom(bottom,top,&bottom_size)
    screen.Loop(split);

### Output

    top
    ────────────
    bottom

Component Component Renderer (Component child, std::function< Element()> render) Renderer ftxui::Renderer Component child std::function< Element()> render

Return a new Component, similar to |child|, but using |render| as the Component::Render() event.

child

The component to forward events to.

render

The function drawing the interface.

### Example

    autoscreen=ScreenInteractive::TerminalOutput();
    std::stringlabel="Clicktoquit";
    autobutton=Button(&label,screen.ExitLoopClosure());
    autorenderer=Renderer(button,[&]{
    returnhbox({
    text("Abutton:"),
    button->Render(),
    });
    });
    screen.Loop(renderer);

Component Component Renderer (std::function< Element()> render) Renderer ftxui::Renderer std::function< Element()> render

Return a component, using |render| to render its interface.

render

The function drawing the interface.

### Example

    autoscreen=ScreenInteractive::TerminalOutput();
    autorenderer=Renderer([]{
    returntext("Myinterface");
    });
    screen.Loop(renderer);

Component Component Renderer (std::function< Element(bool)> render) Renderer ftxui::Renderer std::function< Element(bool)> render

Return a focusable component, using |render| to render its interface.

render

The function drawing the interface, taking a boolean telling whether the component is focused or not.

### Example

    autoscreen=ScreenInteractive::TerminalOutput();
    autorenderer=Renderer([](boolfocused){
    if(focused)
    returntext("Myinterface")|inverted;
    else
    returntext("Myinterface");
    });
    screen.Loop(renderer);

ComponentDecorator ComponentDecorator Renderer (ElementDecorator decorator) Renderer ftxui::Renderer ElementDecorator decorator

Decorate a component, by decorating what it renders.

decorator

the function modifying the element it renders.

### Example

    autoscreen=ScreenInteractive::TerminalOutput();
    autorenderer=
    //Renderer([]{returntext("Hello");)
    |Renderer(bold)
    |Renderer(inverted);
    screen.Loop(renderer);

Component Component CatchEvent (Component child, std::function< bool(Event)>) CatchEvent ftxui::CatchEvent Component child std::function< bool(Event)>
ComponentDecorator ComponentDecorator CatchEvent (std::function< bool(Event)> on_event) CatchEvent ftxui::CatchEvent std::function< bool(Event)> on_event

Decorate a component, using |on_event| to catch events. This function must returns true when the event has been handled, false otherwise.

on_event

The function drawing the interface.

### Example

    autoscreen=ScreenInteractive::TerminalOutput();
    autorenderer=Renderer([]{returntext("Helloworld");});
    renderer|=CatchEvent([&](Eventevent){
    if(event==Event::Character('q')){
    screen.ExitLoopClosure()();
    returntrue;
    }
    returnfalse;
    });
    screen.Loop(renderer);

Component Component Maybe (Component child, const bool *show) Maybe ftxui::Maybe Component child const bool * show

Decorate a component |child|. It is shown only when |show| is true.

child

the compoennt to decorate.

show

a boolean. |child| is shown when |show| is true.

### Example

    autocomponent=Renderer([]{returntext("HelloWorld!");});
    automaybe_component=Maybe(component,&show);

Component Component Maybe (Component child, std::function< bool()> show) Maybe ftxui::Maybe Component child std::function< bool()> show

Decorate a component |child|. It is shown only when |show| returns true.

child

the compoenent to decorate.

show

a function returning whether |child| should shown.

ComponentDecorator ComponentDecorator Maybe (const bool *show) Maybe ftxui::Maybe const bool * show

Decorate a component. It is shown only when |show| is true.

show

a boolean. |child| is shown when |show| is true.

### Example

    autocomponent=Renderer([]{returntext("HelloWorld!");});
    automaybe_component=component|Maybe(&show);

ComponentDecorator ComponentDecorator Maybe (std::function< bool()> show) Maybe ftxui::Maybe std::function< bool()> show

Decorate a component. It is shown only when the |show| function returns true.

show

a function returning whether the decorated component should be shown.

### Example

    autocomponent=Renderer([]{returntext("HelloWorld!");});
    automaybe_component=component|Maybe([&]{returncounter==42;});

Component Component Modal (Component main, Component modal, const bool *show_modal) Modal ftxui::Modal Component main Component modal const bool * show_modal
ComponentDecorator ComponentDecorator Modal (Component modal, const bool *show_modal) Modal ftxui::Modal Component modal const bool * show_modal
Component Component Collapsible (ConstStringRef label, Component child, Ref< bool > show=false) Collapsible ftxui::Collapsible ConstStringRef label Component child Ref< bool > show false
Component Component Hoverable (Component component, bool *hover) Hoverable ftxui::Hoverable Component component bool * hover

Wrap a component. Gives the ability to know if it is hovered by the mouse.

component

The wrapped component.

hover

The value to reflect whether the component is hovered or not.

### Example

    autobutton=Button("exit",screen.ExitLoopClosure());
    boolhover=false;
    autobutton_hover=Hoverable(button,&hover);

Component Component Hoverable (Component component, std::function< void()> on_enter, std::function< void()> on_leave) Hoverable ftxui::Hoverable Component component std::function< void()> on_enter std::function< void()> on_leave

Wrap a component. Uses callbacks.

component

The wrapped component.

on_enter

Callback OnEnter

on_leave

Callback OnLeave

### Example

    autobutton=Button("exit",screen.ExitLoopClosure());
    boolhover=false;
    autobutton_hover=Hoverable(button,&hover);

Component Component Hoverable (Component component, std::function< void(bool)> on_change) Hoverable ftxui::Hoverable Component component std::function< void(bool)> on_change

Wrap a component. Gives the ability to know if it is hovered by the mouse.

component

the wrapped component.

on_change

is called when the mouse enter or leave the component.

### Example

    autobutton=Button("exit",screen.ExitLoopClosure());
    boolhovered=false;
    autobutton_hoverable=Hoverable(button,
    //[&](boolhover){hovered=hover;});

ComponentDecorator ComponentDecorator Hoverable (bool *hover) Hoverable ftxui::Hoverable bool * hover

Wrap a component. Gives the ability to know if it is hovered by the mouse.

hover

The value to reflect whether the component is hovered or not.

### Example

    boolhover=false;
    autobutton=Button("exit",screen.ExitLoopClosure());
    button|=Hoverable(&hover);

ComponentDecorator ComponentDecorator Hoverable (std::function< void()> on_enter, std::function< void()> on_leave) Hoverable ftxui::Hoverable std::function< void()> on_enter std::function< void()> on_leave

Wrap a component. Gives the ability to know if it is hovered by the mouse.

on_enter

is called when the mouse hover the component.

on_leave

is called when the mouse leave the component.

### Example

    autobutton=Button("exit",screen.ExitLoopClosure());
    inton_enter_cnt=0;
    inton_leave_cnt=0;
    button|=Hoverable(
    [&]{on_enter_cnt++; },
    [&]{on_leave_cnt++; }
    //);

ComponentDecorator ComponentDecorator Hoverable (std::function< void(bool)> on_change) Hoverable ftxui::Hoverable std::function< void(bool)> on_change

Wrap a component. Gives the ability to know if it is hovered by the mouse.

on_change

is called when the mouse enter or leave the component.

### Example

    autobutton=Button("exit",screen.ExitLoopClosure());
    boolhovered=false;
    button|=Hoverable([&](boolhover){hovered=hover;});

Component Component Window (WindowOptions option) Window ftxui::Window WindowOptions option

A draggeable / resizeable window. To use multiple of them, they must be stacked using `Container::Stacked({...})` component;.

option

A struct holding every parameters.

Window

### Example

    autowindow_1=Window({
    .inner=DummyWindowContent(),
    .title="Firstwindow",
    });

    autowindow_2=Window({
    .inner=DummyWindowContent(),
    .title="Secondwindow",
    });

    autocontainer=Container::Stacked({
    window_1,
    window_2,
    });

class T
Receiver< T > Receiver< T > MakeReceiver () MakeReceiver ftxui::MakeReceiver
Element Element text (std::wstring text) text ftxui::text std::wstring text

Display a piece of unicode text.

ftxui::to_wstring

### Example

    Elementdocument=text(L"Helloworld!");

### Output

    Helloworld!

Element Element vtext (std::wstring text) vtext ftxui::vtext std::wstring text

Display a piece unicode text vertically.

ftxui::to_wstring

### Example

    Elementdocument=vtext(L"Helloworld!");

### Output

    H
    e
    l
    l
    o

    w
    o
    r
    l
    d
    !

Elements Elements paragraph (std::wstring text) paragraph ftxui::paragraph std::wstring text
Element Element operator| (Element element, Decorator decorator) operator| ftxui::operator| Element element Decorator decorator

From an element, apply a decorator.

the decorated element.

### Example

Both of these are equivalent:

    bold(text("Hello"));

    text("Hello")|bold;

Element & Element & operator|= (Element &e, Decorator d) operator|= ftxui::operator|= Element & e Decorator d

Apply a decorator to an element.

the decorated element.

### Example

Both of these are equivalent:

    autoelement=text("Hello");
    element|=bold;

Elements Elements operator| (Elements elements, Decorator decorator) operator| ftxui::operator| Elements elements Decorator decorator

From a set of element, apply a decorator to every elements.

the set of decorated element.

Decorator Decorator operator| (Decorator a, Decorator b) operator| ftxui::operator| Decorator a Decorator b

Compose two decorator into one.

### Example

    autodecorator=bold|blink;

Element Element text (std::string text) text ftxui::text std::string text

Display a piece of UTF8 encoded unicode text.

ftxui::to_wstring

### Example

    Elementdocument=text("Helloworld!");

### Output

    Helloworld!

Element Element vtext (std::string text) vtext ftxui::vtext std::string text

Display a piece of unicode text vertically.

ftxui::to_wstring

### Example

    Elementdocument=vtext("Helloworld!");

### Output

    H
    e
    l
    l
    o

    w
    o
    r
    l
    d
    !

Element Element separator () separator ftxui::separator

Draw a vertical or horizontal separation in between two other elements.

separator

separatorLight

separatorDashed

separatorDouble

separatorHeavy

separatorEmpty

separatorRounded

separatorStyled

separatorCharacter

Add a visual separation in between two elements.

### Example

    //Use'border'asafunction...
    Elementdocument=vbox({
    text("up"),
    separator(),
    text("down"),
    });

### Output

    up
    ────
    down

Element Element separatorLight () separatorLight ftxui::separatorLight

Draw a vertical or horizontal separation in between two other elements, using the LIGHT style.

separator

separatorLight

separatorDashed

separatorDouble

separatorHeavy

separatorEmpty

separatorRounded

separatorStyled

separatorCharacter

Add a visual separation in between two elements.

### Example

    //Use'border'asafunction...
    Elementdocument=vbox({
    text("up"),
    separatorLight(),
    text("down"),
    });

### Output

    up
    ────
    down

Element Element separatorDashed () separatorDashed ftxui::separatorDashed

Draw a vertical or horizontal separation in between two other elements, using the DASHED style.

separator

separatorLight

separatorDashed

separatorDouble

separatorHeavy

separatorEmpty

separatorRounded

separatorStyled

separatorCharacter

Add a visual separation in between two elements.

### Example

    //Use'border'asafunction...
    Elementdocument=vbox({
    text("up"),
    separatorLight(),
    text("down"),
    });

### Output

    up
    ╍╍╍╍
    down

Element Element separatorHeavy () separatorHeavy ftxui::separatorHeavy

Draw a vertical or horizontal separation in between two other elements, using the HEAVY style.

separator

separatorLight

separatorDashed

separatorDouble

separatorHeavy

separatorEmpty

separatorRounded

separatorStyled

separatorCharacter

Add a visual separation in between two elements.

### Example

    //Use'border'asafunction...
    Elementdocument=vbox({
    text("up"),
    separatorHeavy(),
    text("down"),
    });

### Output

    up
    ━━━━
    down

Element Element separatorDouble () separatorDouble ftxui::separatorDouble

Draw a vertical or horizontal separation in between two other elements, using the DOUBLE style.

separator

separatorLight

separatorDashed

separatorDouble

separatorHeavy

separatorEmpty

separatorRounded

separatorStyled

separatorCharacter

Add a visual separation in between two elements.

### Example

    //Use'border'asafunction...
    Elementdocument=vbox({
    text("up"),
    separatorDouble(),
    text("down"),
    });

### Output

    up
    ════
    down

Element Element separatorEmpty () separatorEmpty ftxui::separatorEmpty

Draw a vertical or horizontal separation in between two other elements, using the EMPTY style.

separator

separatorLight

separatorDashed

separatorDouble

separatorHeavy

separatorEmpty

separatorRounded

separatorStyled

separatorCharacter

Add a visual separation in between two elements.

### Example

    //Use'border'asafunction...
    Elementdocument=vbox({
    text("up"),
    separator(),
    text("down"),
    });

### Output

    up

    down

Element Element separatorStyled (BorderStyle style) separatorStyled ftxui::separatorStyled BorderStyle style

Draw a vertical or horizontal separation in between two other elements.

style

the style of the separator.

separator

separatorLight

separatorDashed

separatorDouble

separatorHeavy

separatorEmpty

separatorRounded

separatorStyled

separatorCharacter

Add a visual separation in between two elements.

### Example

    //Use'border'asafunction...
    Elementdocument=vbox({
    text("up"),
    separatorStyled(DOUBLE),
    text("down"),
    });

### Output

    up
    ════
    down

Element Element separator (Pixel pixel) separator ftxui::separator Pixel pixel

Draw a separator in between two element filled with a given pixel.

separator

separatorLight

separatorDashed

separatorHeavy

separatorDouble

separatorStyled

### Example

    Pixelempty;
    Elementdocument=vbox({
    text("Up"),
    separator(empty),
    text("Down"),
    })

### Output

    Up

    Down

Element Element separatorCharacter (std::string value) separatorCharacter ftxui::separatorCharacter std::string value

Draw a vertical or horizontal separation in between two other elements.

value

the character to fill the separator area.

separator

separatorLight

separatorDashed

separatorDouble

separatorHeavy

separatorEmpty

separatorRounded

separatorStyled

separatorCharacter

Add a visual separation in between two elements.

### Example

    //Use'border'asafunction...
    Elementdocument=vbox({
    text("up"),
    separator(),
    text("down"),
    });

### Output

    up
    ────
    down

Element Element separatorHSelector (float left, float right, Color unselected_color, Color selected_color) separatorHSelector ftxui::separatorHSelector float left float right Color unselected_color Color selected_color

Draw an horizontal bar, with the area in between left/right colored differently.

left

the left limit of the active area.

right

the right limit of the active area.

selected_color

the color of the selected area.

unselected_color

the color of the unselected area.

### Example

    Elementdocument=separatorHSelector(2,5,Color::White,Color::Blue);

Element Element separatorVSelector (float up, float down, Color unselected_color, Color selected_color) separatorVSelector ftxui::separatorVSelector float up float down Color unselected_color Color selected_color

Draw an vertical bar, with the area in between up/downcolored differently.

up

the left limit of the active area.

down

the right limit of the active area.

selected_color

the color of the selected area.

unselected_color

the color of the unselected area.

### Example

    Elementdocument=separatorHSelector(2,5,Color::White,Color::Blue);

Element Element gauge (float progress) gauge ftxui::gauge float progress

Draw a high definition progress bar.

progress

The proportion of the area to be filled. Belong to [0,1].

### Example

A gauge. It can be used to represent a progress bar.

    border(gauge(0.5))

Output

    ┌──────────────────────────────────────────────────────────────────────────┐
    │█████████████████████████████████████│
    └──────────────────────────────────────────────────────────────────────────┘

Element Element gaugeLeft (float progress) gaugeLeft ftxui::gaugeLeft float progress

Draw a high definition progress bar progressing from right to left.

progress

The proportion of the area to be filled. Belong to [0,1].

### Example

A gauge. It can be used to represent a progress bar.

    border(gaugeLeft(0.5))

Output

    ┌──────────────────────────────────────────────────────────────────────────┐
    │█████████████████████████████████████│
    └──────────────────────────────────────────────────────────────────────────┘

Element Element gaugeRight (float progress) gaugeRight ftxui::gaugeRight float progress

Draw a high definition progress bar progressing from left to right.

progress

The proportion of the area to be filled. Belong to [0,1].

### Example

A gauge. It can be used to represent a progress bar.

    border(gaugeRight(0.5))

Output

    ┌──────────────────────────────────────────────────────────────────────────┐
    │█████████████████████████████████████│
    └──────────────────────────────────────────────────────────────────────────┘

Element Element gaugeUp (float progress) gaugeUp ftxui::gaugeUp float progress

Draw a high definition progress bar progressing from bottom to top.

progress

The proportion of the area to be filled. Belong to [0,1].

### Example

A gauge. It can be used to represent a progress bar.

    border(gaugeUp(0.5))

Output

    ┌─┐
    ││
    ││
    ││
    ││
    │█│
    │█│
    │█│
    │█│
    └─┘

Element Element gaugeDown (float progress) gaugeDown ftxui::gaugeDown float progress

Draw a high definition progress bar progressing from top to bottom.

progress

The proportion of the area to be filled. Belong to [0,1].

### Example

A gauge. It can be used to represent a progress bar.

    border(gaugeDown(0.5))

Output

    ┌─┐
    │█│
    │█│
    │█│
    │█│
    ││
    ││
    ││
    ││
    └─┘

Element Element gaugeDirection (float progress, Direction direction) gaugeDirection ftxui::gaugeDirection float progress Direction direction

Draw a high definition progress bar progressing in specified direction.

progress

The proportion of the area to be filled. Belong to [0,1].

Element Element border (Element child) border ftxui::border Element child

Draw a border around the element.

border

borderLight

borderDashed

borderDouble

borderHeavy

borderEmpty

borderRounded

borderStyled

borderWith

Add a border around an element

### Example

    //Use'border'asafunction...
    Elementdocument=border(text("Theelement"));

    //...Orasa'pipe'.
    Elementdocument=text("Theelement")|border;

### Output

    ┌───────────┐
    │Theelement│
    └───────────┘

Element Element borderLight (Element child) borderLight ftxui::borderLight Element child

Draw a light border around the element.

border

borderLight

borderDashed

borderDouble

borderHeavy

borderRounded

borderEmpty

borderStyled

borderWith

Add a border around an element

### Example

    //Use'borderLight'asafunction...
    Elementdocument=borderLight(text("Theelement"));

    //...Orasa'pipe'.
    Elementdocument=text("Theelement")|borderLight;

### Output

    ┌──────────────┐
    │Theelement│
    └──────────────┘

Element Element borderDashed (Element child) borderDashed ftxui::borderDashed Element child

Draw a dashed border around the element.

border

borderLight

borderDashed

borderDouble

borderHeavy

borderRounded

borderEmpty

borderStyled

borderWith

Add a border around an element

### Example

    //Use'borderDash'asafunction...
    Elementdocument=borderDash(text("Theelement"));

    //...Orasa'pipe'.
    Elementdocument=text("Theelement")|borderDAsh;

### Output

    ┏╍╍╍╍╍╍╍╍╍╍╍╍╍╍┓
    ╏Theelement╏
    ┗╍╍╍╍╍╍╍╍╍╍╍╍╍╍┛

Element Element borderHeavy (Element child) borderHeavy ftxui::borderHeavy Element child

Draw a heavy border around the element.

border

borderLight

borderDashed

borderDouble

borderHeavy

borderRounded

borderEmpty

borderStyled

borderWith

Add a border around an element

### Example

    //Use'borderHeavy'asafunction...
    Elementdocument=borderHeavy(text("Theelement"));

    //...Orasa'pipe'.
    Elementdocument=text("Theelement")|borderHeavy;

### Output

    ┏━━━━━━━━━━━━━━┓
    ┃Theelement┃
    ┗━━━━━━━━━━━━━━┛

Element Element borderDouble (Element child) borderDouble ftxui::borderDouble Element child

Draw a double border around the element.

border

borderLight

borderDashed

borderDouble

borderHeavy

borderRounded

borderEmpty

borderStyled

borderWith

Add a border around an element

### Example

    //Use'borderDouble'asafunction...
    Elementdocument=borderDouble(text("Theelement"));

    //...Orasa'pipe'.
    Elementdocument=text("Theelement")|borderDouble;

### Output

    ╔══════════════╗
    ║Theelement║
    ╚══════════════╝

Element Element borderRounded (Element child) borderRounded ftxui::borderRounded Element child

Draw a rounded border around the element.

border

borderLight

borderDashed

borderDouble

borderHeavy

borderRounded

borderEmpty

borderStyled

borderWith

Add a border around an element

### Example

    //Use'borderRounded'asafunction...
    Elementdocument=borderRounded(text("Theelement"));

    //...Orasa'pipe'.
    Elementdocument=text("Theelement")|borderRounded;

### Output

    ╭──────────────╮
    │Theelement│
    ╰──────────────╯

Element Element borderEmpty (Element child) borderEmpty ftxui::borderEmpty Element child

Draw an empty border around the element.

border

borderLight

borderDashed

borderDouble

borderHeavy

borderRounded

borderEmpty

borderStyled

borderWith

Add a border around an element

### Example

    //Use'borderRounded'asafunction...
    Elementdocument=borderRounded(text("Theelement"));

    //...Orasa'pipe'.
    Elementdocument=text("Theelement")|borderRounded;

### Output

    Theelement

Decorator Decorator borderStyled (BorderStyle style) borderStyled ftxui::borderStyled BorderStyle style

Same as border but with different styles.

border

Decorator Decorator borderStyled (BorderStyle style, Color foreground_color) borderStyled ftxui::borderStyled BorderStyle style Color foreground_color

Same as border but with a foreground color and a different style.

border

Decorator Decorator borderStyled (Color foreground_color) borderStyled ftxui::borderStyled Color foreground_color

Same as border but with a foreground color.

border

Decorator Decorator borderWith (const Pixel &pixel) borderWith ftxui::borderWith const Pixel & pixel

Same as border but with a constant Pixel around the element.

border

Element Element window (Element title, Element content, BorderStyle border) window ftxui::window Element title Element content BorderStyle border ROUNDED

Draw window with a title and a border around the element.

title

The title of the window.

content

The element to be wrapped.

border

The style of the border. Default is ROUNDED.

border

### Example

    Elementdocument=window(text("Title"),
    text("content")
    );

    //Withspecifyingborder
    Elementdocument=window(text("Title"),
    text("content"),
    ROUNDED
    );

### Output

    ┌Title──┐
    │content│
    └───────┘

Element Element spinner (int charset_index, size_t image_index) spinner ftxui::spinner int charset_index size_t image_index

Useful to represent the effect of time and/or events. This display an ASCII art "video".

charset_index

The type of "video".

image_index

The "frame" of the video. You need to increase this for every "step".

Element Element paragraph (const std::string &the_text) paragraph ftxui::paragraph const std::string & text the_text

Return an element drawing the paragraph on multiple lines.

flexbox.

Element Element paragraphAlignLeft (const std::string &the_text) paragraphAlignLeft ftxui::paragraphAlignLeft const std::string & text the_text

Return an element drawing the paragraph on multiple lines, aligned on the left.

flexbox.

Element Element paragraphAlignRight (const std::string &the_text) paragraphAlignRight ftxui::paragraphAlignRight const std::string & text the_text

Return an element drawing the paragraph on multiple lines, aligned on the right.

flexbox.

Element Element paragraphAlignCenter (const std::string &the_text) paragraphAlignCenter ftxui::paragraphAlignCenter const std::string & text the_text

Return an element drawing the paragraph on multiple lines, aligned on the center.

flexbox.

Element Element paragraphAlignJustify (const std::string &the_text) paragraphAlignJustify ftxui::paragraphAlignJustify const std::string & text the_text

Return an element drawing the paragraph on multiple lines, aligned using a justified alignment. the center.

flexbox.

Element Element graph (GraphFunction graph_function) graph ftxui::graph GraphFunction graph_function

Draw a graph using a GraphFunction.

graph_function

the function to be called to get the data.

Element Element emptyElement () emptyElement ftxui::emptyElement

An element of size 0x0 drawing nothing.

Element Element canvas (ConstRef< Canvas > canvas) canvas ftxui::canvas ConstRef< Canvas > canvas

Produce an element from a Canvas, or a reference to a Canvas.

Element Element canvas (int width, int height, std::function< void(Canvas &)> fn) canvas ftxui::canvas int width int height std::function< void(Canvas &)> fn

Produce an element drawing a canvas of requested size.

width

the width of the canvas.

height

the height of the canvas.

fn

a function drawing the canvas.

Element Element canvas (std::function< void(Canvas &)> fn) canvas ftxui::canvas std::function< void(Canvas &)> fn

Produce an element drawing a canvas.

fn

a function drawing the canvas.

Element Element bold (Element child) bold ftxui::bold Element child

Use a bold font, for elements with more emphasis.

Element Element dim (Element child) dim ftxui::dim Element child

Use a light font, for elements with less emphasis.

Element Element italic (Element child) italic ftxui::italic Element child

Apply a underlinedDouble to text.

Element Element inverted (Element child) inverted ftxui::inverted Element child

Add a filter that will invert the foreground and the background colors.

Element Element underlined (Element child) underlined ftxui::underlined Element child

Make the underlined element to be underlined.

Element Element underlinedDouble (Element child) underlinedDouble ftxui::underlinedDouble Element child

Apply a underlinedDouble to text.

Element Element blink (Element child) blink ftxui::blink Element child

The text drawn alternates in between visible and hidden.

Element Element strikethrough (Element child) strikethrough ftxui::strikethrough Element child

Apply a strikethrough to text.

Decorator Decorator color (Color c) color ftxui::color Color c

Decorate using a foreground color.

c

The foreground color to be applied.

The Decorator applying the color.

### Example

    Elementdocument=text("red")|color(Color::Red);

Decorator Decorator bgcolor (Color color) bgcolor ftxui::bgcolor Color color

Decorate using a background color.

color

The background color to be applied.

The Decorator applying the color.

### Example

    Elementdocument=text("red")|bgcolor(Color::Red);

Decorator Decorator color (const LinearGradient &gradient) color ftxui::color const LinearGradient & gradient

Decorate using a linear-gradient effect on the foreground color.

gradient

The gradient effect to be applied on the output element.

The Decorator applying the color.

### Example

    text("Hello")|color(LinearGradient{0,{Color::Red,Color::Blue}})

Decorator Decorator bgcolor (const LinearGradient &gradient) bgcolor ftxui::bgcolor const LinearGradient & gradient

Decorate using a linear-gradient effect on the background color.

gradient

The gradient effect to be applied on the output element.

The Decorator applying the color.

### Example

    text("Hello")|color(LinearGradient{0,{Color::Red,Color::Blue}})

Element Element color (Color color, Element child) color ftxui::color Color color Element child

Set the foreground color of an element.

color

The color of the output element.

child

The input element.

The output element colored.

### Example

    Elementdocument=color(Color::Green,text("Success")),

Element Element bgcolor (Color color, Element child) bgcolor ftxui::bgcolor Color color Element child

Set the background color of an element.

color

The color of the output element.

child

The input element.

The output element colored.

### Example

    Elementdocument=bgcolor(Color::Green,text("Success")),

Element Element color (const LinearGradient &gradient, Element child) color ftxui::color const LinearGradient & gradient Element child

Set the foreground color of an element with linear-gradient effect.

gradient

The gradient effect to be applied on the output element.

child

The input element.

The output element colored.

### Example

    color(LinearGradient{0,{Color::Red,Color::Blue}},text("Hello"))

Element Element bgcolor (const LinearGradient &gradient, Element child) bgcolor ftxui::bgcolor const LinearGradient & gradient Element child

Set the background color of an element with linear-gradient effect.

gradient

The gradient effect to be applied on the output element.

child

The input element.

The output element colored.

### Example

    bgcolor(LinearGradient{0,{Color::Red,Color::Blue}},text("Hello"))

Decorator Decorator focusPosition (int x, int y) focusPosition ftxui::focusPosition int x int y

Used inside a `frame`, this force the view to be scrolled toward a a given position. The position is expressed in the numbers of cells.

### Example

    Elementdocument=huge_document()
    |focusPosition(10,10)
    |frame;

Decorator Decorator focusPositionRelative (float x, float y) focusPositionRelative ftxui::focusPositionRelative float x float y

Used inside a `frame`, this force the view to be scrolled toward a a given position. The position is expressed in proportion of the requested size.

For instance:

- (0, 0) means that the view is scrolled toward the upper left.

- (1, 0) means that the view is scrolled toward the upper right.

- (0, 1) means that the view is scrolled toward the bottom left.

### Example

    Elementdocument=huge_document()
    |focusPositionRelative(0.f,1.f)
    |frame;

Element Element automerge (Element child) automerge ftxui::automerge Element child

Enable character to be automatically merged with others nearby.

Decorator Decorator hyperlink (std::string link) hyperlink ftxui::hyperlink std::string link

Decorate using an hyperlink. The link will be opened when the user click on it. This is supported only on a limited set of terminal emulator. List: https://github.com/Alhadis/OSC8-Adoption/.

link

The link to redirect the users to.

The Decorator applying the hyperlink.

### Example

    Elementdocument=
    text("red")|hyperlink("https://github.com/Arthursonzogni/FTXUI");

Element Element hyperlink (std::string link, Element child) hyperlink ftxui::hyperlink std::string link Element child

Make the rendered area clickable using a web browser. The link will be opened when the user click on it. This is supported only on a limited set of terminal emulator. List: https://github.com/Alhadis/OSC8-Adoption/.

link

The link

child

The input element.

The output element with the link.

### Example

    Elementdocument=
    hyperlink("https://github.com/ArthurSonzogni/FTXUI","link");

Element Element selectionStyleReset (Element child) selectionStyleReset ftxui::selectionStyleReset Element child

Reset the selection style of an element.

child

The input element.

The output element with the selection style reset.

Decorator Decorator selectionColor (Color foreground) selectionColor ftxui::selectionColor Color foreground

Set the color of an element when selected.

foreground

The color to be applied. Note that the style is applied on top of the existing style.

Decorator Decorator selectionBackgroundColor (Color foreground) selectionBackgroundColor ftxui::selectionBackgroundColor Color foreground

Set the background color of an element when selected. Note that the style is applied on top of the existing style.

Decorator Decorator selectionForegroundColor (Color foreground) selectionForegroundColor ftxui::selectionForegroundColor Color foreground

Set the foreground color of an element when selected. Note that the style is applied on top of the existing style.

Decorator Decorator selectionStyle (std::function< void(Pixel &)> style) selectionStyle ftxui::selectionStyle std::function< void(Pixel &)> style

Set the style of an element when selected.

style

The style to be applied. Note that the style is applied on top of the existing style.

Element Element hbox (Elements children) hbox ftxui::hbox Elements children

A container displaying elements horizontally one by one.

children

The elements in the container

The container.

Example

    hbox({
    text("Left"),
    text("Right"),
    });

Element Element vbox (Elements children) vbox ftxui::vbox Elements children

A container displaying elements vertically one by one.

children

The elements in the container

The container.

Example

    vbox({
    text("Up"),
    text("Down"),
    });

Element Element dbox (Elements children_) dbox ftxui::dbox Elements children_

Stack several element on top of each other.

children_

The input element.

The right aligned element.

Element Element flexbox (Elements children, FlexboxConfig config) flexbox ftxui::flexbox Elements children FlexboxConfig config FlexboxConfig()

A container displaying elements on row/columns and capable of wrapping on the next column/row when full.

children

The elements in the container

config

The option

The container.

Example

    flexbox({
    text("element1"),
    text("element2"),
    text("element3"),
    },FlexboxConfig()
    //.Set(FlexboxConfig::Direction::Column)
    //.Set(FlexboxConfig::Wrap::WrapInversed)
    //.SetGapMainAxis(1)
    //.SetGapCrossAxis(1)
    //)

Element Element gridbox (std::vector< Elements > lines) gridbox ftxui::gridbox std::vector< Elements > lines

A container displaying a grid of elements.

lines

A list of lines, each line being a list of elements.

The container.

Example

    autocell=[](constchar*t){returntext(t)|border;};
    autodocument=gridbox({
    {cell("north-west"),cell("north"),cell("north-east")},
    {cell("west"),cell("center"),cell("east")},
    {cell("south-west"),cell("south"),cell("south-east")},
    });

Output:

    ╭──────────╮╭──────╮╭──────────╮
    │north-west││north││north-east│
    ╰──────────╯╰──────╯╰──────────╯
    ╭──────────╮╭──────╮╭──────────╮
    │west││center││east│
    ╰──────────╯╰──────╯╰──────────╯
    ╭──────────╮╭──────╮╭──────────╮
    │south-west││south││south-east│
    ╰──────────╯╰──────╯╰──────────╯

Element Element hflow (Elements children) hflow ftxui::hflow Elements children

A container displaying elements in rows from left to right. When filled, it starts on a new row below.

children

The elements in the container

The container.

Example

    hflow({
    text("element1"),
    text("element2"),
    text("element3"),
    });

Element Element vflow (Elements children) vflow ftxui::vflow Elements children

A container displaying elements in rows from top to bottom. When filled, it starts on a new columns on the right. filled, it starts on a new row. is full, it starts a new row.

children

The elements in the container

The container.

Example

    vflow({
    text("element1"),
    text("element2"),
    text("element3"),
    });

Element Element flex (Element child) flex ftxui::flex Element child

Make a child element to expand proportionally to the space left in a container.

Examples:

    hbox({
    text("left")|border,
    text("middle")|border|flex,
    text("right") |border,
    });

Output:

    ┌────┐┌─────────────────────────────────────────────────────────┐┌─────┐
    │left││middle││right│
    └────┘└─────────────────────────────────────────────────────────┘└─────┘

Element Element flex_grow (Element child) flex_grow ftxui::flex_grow Element child

Expand if possible.

Element Element flex_shrink (Element child) flex_shrink ftxui::flex_shrink Element child

Minimize if needed.

Element Element xflex (Element child) xflex ftxui::xflex Element child

Expand/Minimize if possible/needed on the X axis.

Element Element xflex_grow (Element child) xflex_grow ftxui::xflex_grow Element child

Expand if possible on the X axis.

Element Element xflex_shrink (Element child) xflex_shrink ftxui::xflex_shrink Element child

Minimize if needed on the X axis.

Element Element yflex (Element child) yflex ftxui::yflex Element child

Expand/Minimize if possible/needed on the Y axis.

Element Element yflex_grow (Element child) yflex_grow ftxui::yflex_grow Element child

Expand if possible on the Y axis.

Element Element yflex_shrink (Element child) yflex_shrink ftxui::yflex_shrink Element child

Minimize if needed on the Y axis.

Element Element notflex (Element child) notflex ftxui::notflex Element child

Make the element not flexible.

Element Element filler () filler ftxui::filler

An element that will take expand proportionally to the space left in a container.

Decorator Decorator size (WidthOrHeight direction, Constraint constraint, int value) size ftxui::size WidthOrHeight direction Constraint constraint int value

Apply a constraint on the size of an element.

direction

Whether the WIDTH of the HEIGHT of the element must be constrained.

constraint

The type of constaint.

value

The value.

Element Element frame (Element child) frame ftxui::frame Element child

Allow an element to be displayed inside a 'virtual' area. It size can be larger than its container. In this case only a smaller portion is displayed. The view is scrollable to make the focused element visible.

frame

xframe

yframe

Element Element xframe (Element child) xframe ftxui::xframe Element child

Same as `frame`, but only on the x-axis.

frame

xframe

yframe

Element Element yframe (Element child) yframe ftxui::yframe Element child

Same as `frame`, but only on the y-axis.

frame

xframe

yframe

Element Element focus (Element child) focus ftxui::focus Element child

Set the `child` to be the one focused among its siblings.

child

The element to be focused.

Element Element select (Element child) select ftxui::select Element e child

Set the `child` to be the one focused among its siblings.

This is deprecated. Use `focus` instead. child

The element to be focused.

Element Element focusCursorBlock (Element child) focusCursorBlock ftxui::focusCursorBlock Element child

Same as `focus`, but set the cursor shape to be a still block.

focus

focusCursorBlock

focusCursorBlockBlinking

focusCursorBar

focusCursorBarBlinking

focusCursorUnderline

focusCursorUnderlineBlinking

Element Element focusCursorBlockBlinking (Element child) focusCursorBlockBlinking ftxui::focusCursorBlockBlinking Element child

Same as `focus`, but set the cursor shape to be a blinking block.

focus

focusCursorBlock

focusCursorBlockBlinking

focusCursorBar

focusCursorBarBlinking

focusCursorUnderline

focusCursorUnderlineBlinking

Element Element focusCursorBar (Element child) focusCursorBar ftxui::focusCursorBar Element child

Same as `focus`, but set the cursor shape to be a still block.

focus

focusCursorBlock

focusCursorBlockBlinking

focusCursorBar

focusCursorBarBlinking

focusCursorUnderline

focusCursorUnderlineBlinking

Element Element focusCursorBarBlinking (Element child) focusCursorBarBlinking ftxui::focusCursorBarBlinking Element child

Same as `focus`, but set the cursor shape to be a blinking bar.

focus

focusCursorBlock

focusCursorBlockBlinking

focusCursorBar

focusCursorBarBlinking

focusCursorUnderline

focusCursorUnderlineBlinking

Element Element focusCursorUnderline (Element child) focusCursorUnderline ftxui::focusCursorUnderline Element child

Same as `focus`, but set the cursor shape to be a still underline.

focus

focusCursorBlock

focusCursorBlockBlinking

focusCursorBar

focusCursorBarBlinking

focusCursorUnderline

focusCursorUnderlineBlinking

Element Element focusCursorUnderlineBlinking (Element child) focusCursorUnderlineBlinking ftxui::focusCursorUnderlineBlinking Element child

Same as `focus`, but set the cursor shape to be a blinking underline.

focus

focusCursorBlock

focusCursorBlockBlinking

focusCursorBar

focusCursorBarBlinking

focusCursorUnderline

focusCursorUnderlineBlinking

Element Element vscroll_indicator (Element child) vscroll_indicator ftxui::vscroll_indicator Element child

Display a vertical scrollbar to the right. colors.

Element Element hscroll_indicator (Element child) hscroll_indicator ftxui::hscroll_indicator Element child

Display an horizontal scrollbar to the bottom. colors.

Decorator Decorator reflect (Box &box) reflect ftxui::reflect Box & box
Element Element clear_under (Element element) clear_under ftxui::clear_under Element element

Before drawing |child|, clear the pixels below. This is useful in.

ftxui::dbox

Element Element hcenter (Element child) hcenter ftxui::hcenter Element child

Center an element horizontally.

child

The decorated element.

The centered element.

Element Element vcenter (Element child) vcenter ftxui::vcenter Element child

Center an element vertically.

child

The decorated element.

The centered element.

Element Element center (Element child) center ftxui::center Element child

Center an element horizontally and vertically.

child

The decorated element.

The centered element.

Element Element align_right (Element child) align_right ftxui::align_right Element child

Align an element on the right side.

child

The decorated element.

The right aligned element.

Element Element nothing (Element element) nothing ftxui::nothing Element element

A decoration doing absolutely nothing.

void void Render (Screen &screen, const Element &element) Render ftxui::Render Screen & screen const Element & element

Display an element on a ftxui::Screen.

void void Render (Screen &screen, Node *node) Render ftxui::Render Screen & screen Node * node

Display an element on a ftxui::Screen.

void void Render (Screen &screen, Node *node, Selection &selection) Render ftxui::Render Screen & screen Node * node Selection & selection
std::string std::string GetNodeSelectedContent (Screen &screen, Node *node, Selection &selection) GetNodeSelectedContent ftxui::GetNodeSelectedContent Screen & screen Node * node Selection & selection
Color Color operator""_rgb (unsigned long long int combined) operator""_rgb ftxui::literals::operator""_rgb unsigned long long int combined

Creates a color from a combined hex RGB representation, e.g. 0x808000_rgb.

ColorInfo ColorInfo GetColorInfo (Color::Palette256 index) GetColorInfo ftxui::GetColorInfo Color::Palette256 index
ColorInfo ColorInfo GetColorInfo (Color::Palette16 index) GetColorInfo ftxui::GetColorInfo Color::Palette16 index
int int wchar_width (wchar_t) wchar_width ftxui::wchar_width wchar_t ucs
int int wstring_width (const std::wstring &) wstring_width ftxui::wstring_width const std::wstring & text
std::string std::string to_string (const std::wstring &s) to_string ftxui::to_string const std::wstring & s

Convert a UTF8 std::string into a std::wstring.

std::wstring std::wstring to_wstring (const std::string &s) to_wstring ftxui::to_wstring const std::string & s

Convert a std::wstring into a UTF8 std::string.

typename T
std::wstring std::wstring to_wstring (T s) to_wstring ftxui::to_wstring T s
int int string_width (const std::string &) string_width ftxui::string_width const std::string & input
std::vector< std::string > std::vector< std::string > Utf8ToGlyphs (const std::string &input) Utf8ToGlyphs ftxui::Utf8ToGlyphs const std::string & input
std::vector< int > std::vector< int > CellToGlyphIndex (const std::string &input) CellToGlyphIndex ftxui::CellToGlyphIndex const std::string & input
Component Component CatchEvent (Component child, std::function< bool(Event event)> on_event) CatchEvent ftxui::CatchEvent Component child std::function< bool(Event event)> on_event

Return a component, using |on_event| to catch events. This function must returns true when the event has been handled, false otherwise.

child

The wrapped component.

on_event

The function drawing the interface.

### Example

    autoscreen=ScreenInteractive::TerminalOutput();
    autorenderer=Renderer([]{
    returntext("Myinterface");
    });
    autocomponent=CatchEvent(renderer,[&](Eventevent){
    if(event==Event::Character('q')){
    screen.ExitLoopClosure()();
    returntrue;
    }
    returnfalse;
    });
    screen.Loop(component);

template Component template Component Slider (SliderOption< int8_t >) Slider ftxui::Slider SliderOption< int8_t >
template Component template Component Slider (SliderOption< int16_t >) Slider ftxui::Slider SliderOption< int16_t >
template Component template Component Slider (SliderOption< int32_t >) Slider ftxui::Slider SliderOption< int32_t >
template Component template Component Slider (SliderOption< int64_t >) Slider ftxui::Slider SliderOption< int64_t >
template Component template Component Slider (SliderOption< uint8_t >) Slider ftxui::Slider SliderOption< uint8_t >
template Component template Component Slider (SliderOption< uint16_t >) Slider ftxui::Slider SliderOption< uint16_t >
template Component template Component Slider (SliderOption< uint32_t >) Slider ftxui::Slider SliderOption< uint32_t >
template Component template Component Slider (SliderOption< uint64_t >) Slider ftxui::Slider SliderOption< uint64_t >
template Component template Component Slider (SliderOption< float >) Slider ftxui::Slider SliderOption< float >
template Component template Component Slider (SliderOption< double >) Slider ftxui::Slider SliderOption< double >
bool bool EatCodePoint (const std::string &input, size_t start, size_t *end, uint32_t *ucs) EatCodePoint ftxui::EatCodePoint const std::string & input size_t start size_t * end uint32_t * ucs
bool bool EatCodePoint (const std::wstring &input, size_t start, size_t *end, uint32_t *ucs) EatCodePoint ftxui::EatCodePoint const std::wstring & input size_t start size_t * end uint32_t * ucs
bool bool IsCombining (uint32_t ucs) IsCombining ftxui::IsCombining uint32_t ucs
bool bool IsFullWidth (uint32_t ucs) IsFullWidth ftxui::IsFullWidth uint32_t ucs
bool bool IsControl (uint32_t ucs) IsControl ftxui::IsControl uint32_t ucs
WordBreakProperty WordBreakProperty CodepointToWordBreakProperty (uint32_t codepoint) CodepointToWordBreakProperty ftxui::CodepointToWordBreakProperty uint32_t codepoint
size_t size_t GlyphPrevious (const std::string &input, size_t start) GlyphPrevious ftxui::GlyphPrevious const std::string & input size_t start
size_t size_t GlyphNext (const std::string &input, size_t start) GlyphNext ftxui::GlyphNext const std::string & input size_t start
size_t size_t GlyphIterate (const std::string &input, int glyph_offset, size_t start) GlyphIterate ftxui::GlyphIterate const std::string & input int glyph_offset size_t start
int int GlyphCount (const std::string &input) GlyphCount ftxui::GlyphCount const std::string & input
std::vector< WordBreakProperty > std::vector< WordBreakProperty > Utf8ToWordBreakProperty (const std::string &input) Utf8ToWordBreakProperty ftxui::Utf8ToWordBreakProperty const std::string & input
bool bool IsWordBreakingCharacter (const std::string &input, size_t glyph_index) IsWordBreakingCharacter ftxui::IsWordBreakingCharacter const std::string & input size_t glyph_index