ftxui::InputOption
cpp
#include <ftxui/component/component_options.hpp>Option for the Input component.
Examples: component/homescreen, component/input, component/input_style
Summary
| Symbol | Description |
|---|---|
content | The content of the input. |
placeholder | The content of the input when it's empty. |
transform | |
password | Obscure the input content using '*'. |
multiline | Whether the input can be multiline. |
insert | Insert or overtype character mode. |
on_change | Called when the content changes. |
on_enter | Called when the user presses enter. |
cursor_position |
Public Attributes
content
cpp
StringRef content = "";The content of the input.
placeholder
cpp
StringRef placeholder = "";The content of the input when it's empty.
transform
cpp
std::function< Element(InputState)> transform;Examples: component/input_style
password
cpp
Ref< bool > password = false;Obscure the input content using '*'.
Examples: component/input
multiline
cpp
Ref< bool > multiline = true;Whether the input can be multiline.
insert
cpp
Ref< bool > insert = true;Insert or overtype character mode.
on_change
cpp
std::function< void()> on_change = [] {};Called when the content changes.
on_enter
cpp
std::function< void()> on_enter = [] {};Called when the user presses enter.
cursor_position
cpp
Ref< int > cursor_position = 0;