FTXUI  3.0.0
C++ functional terminal UI.
Loading...
Searching...
No Matches
ftxui::Container Namespace Reference

Functions

Component Vertical (Components children)
 A list of components, drawn one by one vertically and navigated vertically using up/down arrow key or 'j'/'k' keys.
 
Component Vertical (Components children, int *selector)
 A list of components, drawn one by one vertically and navigated vertically using up/down arrow key or 'j'/'k' keys. This is useful for implementing a Menu for instance.
 
Component Horizontal (Components children)
 A list of components, drawn one by one horizontally and navigated horizontally using left/right arrow key or 'h'/'l' keys.
 
Component Horizontal (Components children, int *selector)
 A list of components, drawn one by one horizontally and navigated horizontally using left/right arrow key or 'h'/'l' keys.
 
Component Tab (Components children, int *selector)
 A list of components, where only one is drawn and interacted with at a time. The |selector| gives the index of the selected component. This is useful to implement tabs.
 

Function Documentation

◆ Vertical() [1/2]

Component Vertical ( Components children)

A list of components, drawn one by one vertically and navigated vertically using up/down arrow key or 'j'/'k' keys.

Parameters
childrenthe list of components.
See also
ContainerBase

Example

auto container = Container::Vertical({
children_1,
children_2,
children_3,
children_4,
});
Component Vertical(Components children)
A list of components, drawn one by one vertically and navigated vertically using up/down arrow key or...

Definition at line 254 of file container.cpp.

◆ Vertical() [2/2]

Component Vertical ( Components children,
int * selector )

A list of components, drawn one by one vertically and navigated vertically using up/down arrow key or 'j'/'k' keys. This is useful for implementing a Menu for instance.

Parameters
childrenthe list of components.
selectorA reference to the index of the selected children.
See also
ContainerBase

Example

auto container = Container::Vertical({
children_1,
children_2,
children_3,
children_4,
});

Definition at line 276 of file container.cpp.

◆ Horizontal() [1/2]

Component Horizontal ( Components children)

A list of components, drawn one by one horizontally and navigated horizontally using left/right arrow key or 'h'/'l' keys.

Parameters
childrenthe list of components.
See also
ContainerBase

Example

int selected_children = 2;
auto container = Container::Horizontal({
children_1,
children_2,
children_3,
children_4,
}, &selected_children);
Component Horizontal(Components children)
A list of components, drawn one by one horizontally and navigated horizontally using left/right arrow...

Definition at line 297 of file container.cpp.

◆ Horizontal() [2/2]

Component Horizontal ( Components children,
int * selector )

A list of components, drawn one by one horizontally and navigated horizontally using left/right arrow key or 'h'/'l' keys.

Parameters
childrenthe list of components.
selectorA reference to the index of the selected children.
See also
ContainerBase

Example

int selected_children = 2;
auto container = Container::Horizontal({
children_1,
children_2,
children_3,
children_4,
}, selected_children);

Definition at line 319 of file container.cpp.

◆ Tab()

Component Tab ( Components children,
int * selector )

A list of components, where only one is drawn and interacted with at a time. The |selector| gives the index of the selected component. This is useful to implement tabs.

Parameters
childrenThe list of components.
selectorThe index of the drawn children.
See also
ContainerBase

Example

int tab_drawn = 0;
auto container = Container::Tab({
children_1,
children_2,
children_3,
children_4,
}, &tab_drawn);
Component Tab(Components children, int *selector)
A list of components, where only one is drawn and interacted with at a time. The |selector| gives the...

Definition at line 342 of file container.cpp.