FTXUI 6.1.9
C++ functional terminal UI.
Loading...
Searching...
No Matches
component/component.cppm
Go to the documentation of this file.
1/// @module ftxui.component.component
2/// @brief Module file for the Component classes of the Component module
3
4module;
5
7
8export module ftxui.component.component;
9
10/**
11 * @namespace ftxui
12 * @brief The FTXUI ftxui:: namespace
13 */
14export namespace ftxui {
17 using ftxui::Event;
22
23 using ftxui::Make;
24
27
28 using ftxui::operator|;
29 using ftxui::operator|=;
30
31 namespace Container {
36 }
37
38 using ftxui::Button;
39 using ftxui::Checkbox;
40 using ftxui::Input;
41 using ftxui::Menu;
42 using ftxui::MenuEntry;
43 using ftxui::Radiobox;
44 using ftxui::Dropdown;
45 using ftxui::Toggle;
46 using ftxui::Slider;
52 using ftxui::Renderer;
54 using ftxui::Maybe;
55 using ftxui::Modal;
57 using ftxui::Hoverable;
58 using ftxui::Window;
59}
Component Horizontal(Components children)
A list of components, drawn one by one horizontally and navigated horizontally using left/right arrow...
Component Maybe(Component, const bool *show)
Decorate a component |child|. It is shown only when |show| is true.
Component ResizableSplitTop(Component main, Component back, int *main_size)
An vertical split in between two components, configurable using the mouse.
Component Menu(MenuOption options)
A list of text. The focused element is selected.
Component MenuEntry(MenuEntryOption options)
A specific menu entry. They can be put into a Container::Vertical to form a menu.
Component Toggle(ConstStringListRef entries, int *selected)
An horizontal list of elements. The user can navigate through them.
Component Radiobox(RadioboxOption options)
A list of element, where only one can be selected.
Component Button(ButtonOption options)
Draw a button. Execute a function when clicked.
Component Modal(Component main, Component modal, const bool *show_modal)
Definition modal.cpp:18
Component Renderer(Component child, std::function< Element()>)
Return a new Component, similar to |child|, but using |render| as the Component::Render() event.
Component Hoverable(Component component, bool *hover)
Wrap a component. Gives the ability to know if it is hovered by the mouse.
Definition hoverable.cpp:43
Component Window(WindowOptions option)
A draggeable / resizeable window. To use multiple of them, they must be stacked using Container::Stac...
Component Vertical(Components children)
A list of components, drawn one by one vertically and navigated vertically using up/down arrow key or...
Component Input(InputOption options={})
An input box for editing text.
Component ResizableSplitRight(Component main, Component back, int *main_size)
An horizontal split in between two components, configurable using the mouse.
Component Dropdown(ConstStringListRef entries, int *selected)
A dropdown menu.
Component Stacked(Components children)
A list of components to be stacked on top of each other. Events are propagated to the first component...
Component ResizableSplitBottom(Component main, Component back, int *main_size)
An vertical split in between two components, configurable using the mouse.
Component Checkbox(CheckboxOption options)
Draw checkable element.
Component ResizableSplitLeft(Component main, Component back, int *main_size)
An horizontal split in between two components, configurable using the mouse.
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...
Option for the AnimatedButton component.
Option for the Checkbox component.
Represent an event. It can be key press event, a terminal resize, or more ...
Definition event.hpp:29
Option for the Input component.
Option for the MenuEntry component.
Option for the Menu component.
Option for the Radiobox component.
Module file for the Component classes of the Component module.
The FTXUI ftxui:: namespace.
Definition animation.hpp:10
std::shared_ptr< T > Make(Args &&... args)
Definition component.hpp:26
std::function< Element(Element)> ElementDecorator
Definition component.hpp:32
Component ResizableSplit(ResizableSplitOption options)
A split in between two components.
Component Collapsible(ConstStringRef label, Component child, Ref< bool > show=false)
A collapsible component. It displays a checkbox with an arrow. Once activated, the child is displayed...
Component Slider(SliderOption< T > options)
A slider in any direction.
std::function< Component(Component)> ComponentDecorator
Definition component.hpp:31
Component CatchEvent(Component child, std::function< bool(Event)>)