FTXUI 6.1.9 C++ functional terminal UI.

Loading...
Searching...
No Matches
component_options.hpp
Go to the documentation of this file.
1// Copyright 2021 Arthur Sonzogni. All rights reserved.
2// Use of this source code is governed by the MIT license that can be found in
3// the LICENSE file.
4#ifndef FTXUI_COMPONENT_COMPONENT_OPTIONS_HPP
5#define FTXUI_COMPONENT_COMPONENT_OPTIONS_HPP
6
7#include <chrono> // for milliseconds
8#include <ftxui/component/animation.hpp> // for Duration, QuadraticInOut, Function
9#include <ftxui/dom/direction.hpp> // for Direction, Direction::Left, Direction::Right, Direction::Down
10#include <ftxui/dom/elements.hpp> // for Element, separator
11#include <ftxui/util/ref.hpp> // for Ref, ConstRef, StringRef
12#include <functional> // for function
13#include <string> // for string
14
15#include "ftxui/component/component_base.hpp" // for Component
16#include "ftxui/screen/color.hpp" // for Color, Color::GrayDark, Color::White
17
18 namespace ftxui {
19
20/// @brief arguments for transform from |ButtonOption|, |CheckboxOption|,
21/// |RadioboxOption|, |MenuEntryOption|, |MenuOption|.
22 struct EntryState {
23 std::string label; ///< The label to display.
24 bool state; ///< The state of the button/checkbox/radiobox
25 bool active; ///< Whether the entry is the active one.
26 bool focused; ///< Whether the entry is one focused by the user.
27 int index; ///< Index of the entry when applicable or -1.
28};
29
30/// @brief Option for the underline effect.
31/// @ingroup component
32 struct UnderlineOption {
33 bool enabled = false;
34
35 Color color_active = Color::White;
36 Color color_inactive = Color::GrayDark;
37
38 animation::easing::Function leader_function =
39 animation::easing::QuadraticInOut;
40 animation::easing::Function follower_function =
41 animation::easing::QuadraticInOut;
42
43 animation::Duration leader_duration = std::chrono::milliseconds(250);
44 animation::Duration leader_delay = std::chrono::milliseconds(0);
45 animation::Duration follower_duration = std::chrono::milliseconds(250);
46 animation::Duration follower_delay = std::chrono::milliseconds(0);
47
48 void SetAnimation(animation::Duration d, animation::easing::Function f);
49 void SetAnimationDuration(animation::Duration d);
50 void SetAnimationFunction(animation::easing::Function f);
51 void SetAnimationFunction(animation::easing::Function f_leader,
52 animation::easing::Function f_follower);
53};
54
55/// @brief Option about a potentially animated color.
56/// @ingroup component
57 struct AnimatedColorOption {
58 void Set(
59 Color inactive,
60 Color active,
61 animation::Duration duration = std::chrono::milliseconds(250),
62 animation::easing::Function function = animation::easing::QuadraticInOut);
63
64 bool enabled = false;
65 Color inactive;
66 Color active;
67 animation::Duration duration = std::chrono::milliseconds(250);
68 animation::easing::Function function = animation::easing::QuadraticInOut;
69};
70
71 struct AnimatedColorsOption {
72 AnimatedColorOption background;
73 AnimatedColorOption foreground;
74};
75
76/// @brief Option for the MenuEntry component.
77/// @ingroup component
78 struct MenuEntryOption {
79 ConstStringRef label = "MenuEntry";
80 std::function<Element(const EntryState& state)> transform;
81 AnimatedColorsOption animated_colors;
82};
83
84/// @brief Option for the Menu component.
85/// @ingroup component
86 struct MenuOption {
87 // Standard constructors:
88 static MenuOption Horizontal();
89 static MenuOption HorizontalAnimated();
90 static MenuOption Vertical();
91 static MenuOption VerticalAnimated();
92 static MenuOption Toggle();
93
94 ConstStringListRef entries; ///> The list of entries.
95 Ref<int> selected = 0; ///> The index of the selected entry.
96
97 // Style:
98 UnderlineOption underline;
99 MenuEntryOption entries_option;
100 Direction direction = Direction::Down;
101 std::function<Element()> elements_prefix;
102 std::function<Element()> elements_infix;
103 std::function<Element()> elements_postfix;
104
105 // Observers:
106 std::function<void()> on_change; ///> Called when the selected entry changes.
107 std::function<void()> on_enter; ///> Called when the user presses enter.
108 Ref<int> focused_entry = 0;
109};
110
111/// @brief Option for the AnimatedButton component.
112/// @ingroup component
113 struct ButtonOption {
114 // Standard constructors:
115 static ButtonOption Ascii();
116 static ButtonOption Simple();
117 static ButtonOption Border();
118 static ButtonOption Animated();
119 static ButtonOption Animated(Color color);
120 static ButtonOption Animated(Color background, Color foreground);
121 static ButtonOption Animated(Color background,
122 Color foreground,
123 Color background_active,
124 Color foreground_active);
125
126 ConstStringRef label = "Button";
127 std::function<void()> on_click = [] {};
128
129 // Style:
130 std::function<Element(const EntryState&)> transform;
131 AnimatedColorsOption animated_colors;
132};
133
134/// @brief Option for the Checkbox component.
135/// @ingroup component
136 struct CheckboxOption {
137 // Standard constructors:
138 static CheckboxOption Simple();
139
140 ConstStringRef label = "Checkbox";
141
142 Ref<bool> checked = false;
143
144 // Style:
145 std::function<Element(const EntryState&)> transform;
146
147 // Observer:
148 /// Called when the user change the state.
149 std::function<void()> on_change = [] {};
150};
151
152/// @brief Used to define style for the Input component.
153 struct InputState {
154 Element element;
155 bool hovered; ///< Whether the input is hovered by the mouse.
156 bool focused; ///< Whether the input is focused by the user.
157 bool is_placeholder; ///< Whether the input is empty and displaying the
158 ///< placeholder.
159};
160
161/// @brief Option for the Input component.
162/// @ingroup component
163 struct InputOption {
164 // A set of predefined styles:
165
166 /// @brief Create the default input style:
167 static InputOption Default();
168 /// @brief A white on black style with high margins:
169 static InputOption Spacious();
170
171 /// The content of the input.
172 StringRef content = "";
173
174 /// The content of the input when it's empty.
175 StringRef placeholder = "";
176
177 // Style:
178 std::function<Element(InputState)> transform;
179 Ref<bool> password = false; ///< Obscure the input content using '*'.
180 Ref<bool> multiline = true; ///< Whether the input can be multiline.
181 Ref<bool> insert = true; ///< Insert or overtype character mode.
182
183 /// Called when the content changes.
184 std::function<void()> on_change = [] {};
185 /// Called when the user presses enter.
186 std::function<void()> on_enter = [] {};
187
188 // The char position of the cursor:
189 Ref<int> cursor_position = 0;
190};
191
192/// @brief Option for the Radiobox component.
193/// @ingroup component
194 struct RadioboxOption {
195 // Standard constructors:
196 static RadioboxOption Simple();
197
198 // Content:
199 ConstStringListRef entries;
200 Ref<int> selected = 0;
201
202 // Style:
203 std::function<Element(const EntryState&)> transform;
204
205 // Observers:
206 /// Called when the selected entry changes.
207 std::function<void()> on_change = [] {};
208 Ref<int> focused_entry = 0;
209};
210
211 struct ResizableSplitOption {
212 Component main;
213 Component back;
214 Ref<Direction> direction = Direction::Left;
215 Ref<int> main_size =
216 (direction() == Direction::Left || direction() == Direction::Right) ? 20
217 : 10;
218 std::function<Element()> separator_func = [] { return ::ftxui::separator(); };
219};
220
221// @brief Option for the `Slider` component.
222// @ingroup component
223 template <typename T>
224 struct SliderOption {
225 Ref<T> value;
226 ConstRef<T> min = T(0);
227 ConstRef<T> max = T(100);
228 ConstRef<T> increment = (max() - min()) / 20;
229 Direction direction = Direction::Right;
230 Color color_active = Color::White;
231 Color color_inactive = Color::GrayDark;
232 std::function<void()> on_change; ///> Called when `value` is updated.
233};
234
235/// @brief State passed to the `Window` component's render function.
236/// @ingroup component
237 struct WindowRenderState {
238 Element inner; ///< The element wrapped inside this window.
239 const std::string& title; ///< The title of the window.
240 bool active = false; ///< Whether the window is the active one.
241 bool drag = false; ///< Whether the window is being dragged.
242 bool resize = false; ///< Whether the window is being resized.
243 bool hover_left = false; ///< Whether the resizeable left side is hovered.
244 bool hover_right = false; ///< Whether the resizeable right side is hovered.
245 bool hover_top = false; ///< Whether the resizeable top side is hovered.
246 bool hover_down = false; ///< Whether the resizeable down side is hovered.
247};
248
249// @brief Option for the `Window` component.
250// @ingroup component
251 struct WindowOptions {
252 Component inner; ///< The component wrapped by this window.
253 ConstStringRef title = ""; ///< The title displayed by this window.
254
255 Ref<int> left = 0; ///< The left side position of the window.
256 Ref<int> top = 0; ///< The top side position of the window.
257 Ref<int> width = 20; ///< The width of the window.
258 Ref<int> height = 10; ///< The height of the window.
259
260 Ref<bool> resize_left = true; ///< Can the left side be resized?
261 Ref<bool> resize_right = true; ///< Can the right side be resized?
262 Ref<bool> resize_top = true; ///< Can the top side be resized?
263 Ref<bool> resize_down = true; ///< Can the down side be resized?
264
265 /// An optional function to customize how the window looks like:
266 std::function<Element(const WindowRenderState&)> render;
267};
268
269/// @brief Option for the Dropdown component.
270/// @ingroup component
271/// A dropdown menu is a checkbox opening/closing a radiobox.
272 struct DropdownOption {
273 /// Whether the dropdown is open or closed:
274 Ref<bool> open = false;
275 // The options for the checkbox:
276 CheckboxOption checkbox;
277 // The options for the radiobox:
278 RadioboxOption radiobox;
279 // The transformation function:
280 std::function<Element(bool open, Element checkbox, Element radiobox)>
281 transform;
282};
283
284} // namespace ftxui
285
286#endif /* end of include guard: FTXUI_COMPONENT_COMPONENT_OPTIONS_HPP */
animation.hpp
ftxui::ConstRef
An adapter. Own or reference an immutable object.
Definition ref.hpp:17
ftxui::ConstStringListRef
An adapter. Reference a list of strings.
Definition ref.hpp:116
ftxui::ConstStringRef
An adapter. Own or reference a constant string. For convenience, this class convert multiple immutabl...
Definition ref.hpp:94
ftxui::Ref
An adapter. Own or reference an mutable object.
Definition ref.hpp:46
ftxui::StringRef
An adapter. Own or reference a constant string. For convenience, this class convert multiple mutable ...
Definition ref.hpp:82
color.hpp
component_base.hpp
direction.hpp
elements.hpp
ftxui::ButtonOption::Animated
static ButtonOption Animated()
Create a ButtonOption, using animated colors.
Definition component_options.cpp:196
ftxui::WindowRenderState::active
bool active
Whether the window is the active one.
Definition component_options.hpp:240
ftxui::DropdownOption::checkbox
CheckboxOption checkbox
Definition component_options.hpp:276
ftxui::ButtonOption::on_click
std::function< void()> on_click
Definition component_options.hpp:127
ftxui::MenuOption::elements_prefix
std::function< Element()> elements_prefix
Definition component_options.hpp:101
ftxui::MenuOption::Toggle
static MenuOption Toggle()
Standard options for a horizontal menu with some separator. This can be useful to implement a tab bar...
Definition component_options.cpp:145
ftxui::UnderlineOption::follower_duration
animation::Duration follower_duration
Definition component_options.hpp:45
ftxui::UnderlineOption::leader_function
animation::easing::Function leader_function
Definition component_options.hpp:38
ftxui::MenuOption::entries_option
MenuEntryOption entries_option
Definition component_options.hpp:99
ftxui::WindowRenderState::drag
bool drag
Whether the window is being dragged.
Definition component_options.hpp:241
ftxui::InputOption::Default
static InputOption Default()
Create the default input style:
Definition component_options.cpp:292
ftxui::AnimatedColorOption::function
animation::easing::Function function
Definition component_options.hpp:68
ftxui::UnderlineOption::follower_delay
animation::Duration follower_delay
Definition component_options.hpp:46
ftxui::ButtonOption::Border
static ButtonOption Border()
Create a ButtonOption. The button is shown using a border, inverted when focused. This is the current...
Definition component_options.cpp:179
ftxui::WindowRenderState::hover_down
bool hover_down
Whether the resizeable down side is hovered.
Definition component_options.hpp:246
ftxui::WindowRenderState::title
const std::string & title
The title of the window.
Definition component_options.hpp:239
ftxui::MenuEntryOption::label
ConstStringRef label
Definition component_options.hpp:79
ftxui::UnderlineOption::SetAnimationFunction
void SetAnimationFunction(animation::easing::Function f)
Set how the underline should animate.
Definition component_options.cpp:49
ftxui::InputOption::Spacious
static InputOption Spacious()
A white on black style with high margins:
Definition component_options.cpp:314
ftxui::InputOption::insert
Ref< bool > insert
Insert or overtype character mode.
Definition component_options.hpp:181
ftxui::CheckboxOption::Simple
static CheckboxOption Simple()
Option for standard Checkbox.
Definition component_options.cpp:244
ftxui::WindowRenderState::resize
bool resize
Whether the window is being resized.
Definition component_options.hpp:242
ftxui::MenuOption::on_enter
std::function< void()> on_enter
Definition component_options.hpp:107
ftxui::MenuOption::direction
Direction direction
Definition component_options.hpp:100
ftxui::WindowRenderState::inner
Element inner
The element wrapped inside this window.
Definition component_options.hpp:238
ftxui::ButtonOption::Simple
static ButtonOption Simple()
Create a ButtonOption, inverted when focused.
Definition component_options.cpp:165
ftxui::MenuOption::underline
UnderlineOption underline
Definition component_options.hpp:98
ftxui::MenuEntryOption::transform
std::function< Element(const EntryState &state)> transform
Definition component_options.hpp:80
ftxui::UnderlineOption::color_active
Color color_active
Definition component_options.hpp:35
ftxui::AnimatedColorOption::active
Color active
Definition component_options.hpp:66
ftxui::MenuOption::Horizontal
static MenuOption Horizontal()
Standard options for a horizontal menu. This can be useful to implement a tab bar.
Definition component_options.cpp:69
ftxui::MenuOption::VerticalAnimated
static MenuOption VerticalAnimated()
Standard options for an animated vertical menu. This can be useful to implement a list of selectable ...
Definition component_options.cpp:123
ftxui::UnderlineOption::leader_duration
animation::Duration leader_duration
Definition component_options.hpp:43
ftxui::MenuOption::Vertical
static MenuOption Vertical()
Standard options for a vertical menu. This can be useful to implement a list of selectable items.
Definition component_options.cpp:102
ftxui::ButtonOption::Ascii
static ButtonOption Ascii()
Create a ButtonOption, highlighted using [] characters.
Definition component_options.cpp:153
ftxui::InputOption::cursor_position
Ref< int > cursor_position
Definition component_options.hpp:189
ftxui::AnimatedColorOption::duration
animation::Duration duration
Definition component_options.hpp:67
ftxui::UnderlineOption::SetAnimation
void SetAnimation(animation::Duration d, animation::easing::Function f)
Set how the underline should animate.
Definition component_options.cpp:34
ftxui::UnderlineOption::SetAnimationDuration
void SetAnimationDuration(animation::Duration d)
Set how the underline should animate.
Definition component_options.cpp:42
ftxui::MenuOption::entries
ConstStringListRef entries
Definition component_options.hpp:94
ftxui::UnderlineOption::follower_function
animation::easing::Function follower_function
Definition component_options.hpp:40
ftxui::DropdownOption::radiobox
RadioboxOption radiobox
Definition component_options.hpp:278
ftxui::UnderlineOption::enabled
bool enabled
Definition component_options.hpp:33
ftxui::AnimatedColorOption::inactive
Color inactive
Definition component_options.hpp:65
ftxui::WindowRenderState::hover_right
bool hover_right
Whether the resizeable right side is hovered.
Definition component_options.hpp:244
ftxui::InputOption::password
Ref< bool > password
Obscure the input content using '*'.
Definition component_options.hpp:179
ftxui::InputOption::transform
std::function< Element(InputState)> transform
Definition component_options.hpp:178
ftxui::MenuOption::focused_entry
Ref< int > focused_entry
Definition component_options.hpp:108
ftxui::MenuOption::elements_infix
std::function< Element()> elements_infix
Definition component_options.hpp:102
ftxui::DropdownOption::open
Ref< bool > open
Whether the dropdown is open or closed:
Definition component_options.hpp:274
ftxui::InputOption::placeholder
StringRef placeholder
The content of the input when it's empty.
Definition component_options.hpp:175
ftxui::MenuOption::elements_postfix
std::function< Element()> elements_postfix
Definition component_options.hpp:103
ftxui::MenuEntryOption::animated_colors
AnimatedColorsOption animated_colors
Definition component_options.hpp:81
ftxui::CheckboxOption::checked
Ref< bool > checked
Definition component_options.hpp:142
ftxui::WindowRenderState::hover_left
bool hover_left
Whether the resizeable left side is hovered.
Definition component_options.hpp:243
ftxui::MenuOption::on_change
std::function< void()> on_change
Definition component_options.hpp:106
ftxui::MenuOption::selected
Ref< int > selected
Definition component_options.hpp:95
ftxui::InputOption::content
StringRef content
The content of the input.
Definition component_options.hpp:172
ftxui::WindowRenderState::hover_top
bool hover_top
Whether the resizeable top side is hovered.
Definition component_options.hpp:245
ftxui::AnimatedColorOption::Set
void Set(Color inactive, Color active, animation::Duration duration=std::chrono::milliseconds(250), animation::easing::Function function=animation::easing::QuadraticInOut)
A color option that can be animated. @params _inactive The color when the component is inactive....
Definition component_options.cpp:20
ftxui::UnderlineOption::color_inactive
Color color_inactive
Definition component_options.hpp:36
ftxui::UnderlineOption::leader_delay
animation::Duration leader_delay
Definition component_options.hpp:44
ftxui::DropdownOption::transform
std::function< Element(bool open, Element checkbox, Element radiobox)> transform
Definition component_options.hpp:281
ftxui::MenuOption::HorizontalAnimated
static MenuOption HorizontalAnimated()
Standard options for an animated horizontal menu. This can be useful to implement a tab bar.
Definition component_options.cpp:93
ftxui::InputOption::multiline
Ref< bool > multiline
Whether the input can be multiline.
Definition component_options.hpp:180
ftxui::RadioboxOption::Simple
static RadioboxOption Simple()
Option for standard Radiobox.
Definition component_options.cpp:268
ftxui::ButtonOption::transform
std::function< Element(const EntryState &)> transform
Definition component_options.hpp:130
ftxui::AnimatedColorOption
Option about a potentially animated color.
Definition component_options.hpp:57
ftxui::ButtonOption
Option for the AnimatedButton component.
Definition component_options.hpp:113
ftxui::CheckboxOption
Option for the Checkbox component.
Definition component_options.hpp:136
ftxui::DropdownOption
Option for the Dropdown component.A dropdown menu is a checkbox opening/closing a radiobox.
Definition component_options.hpp:272
ftxui::InputOption
Option for the Input component.
Definition component_options.hpp:163
ftxui::MenuEntryOption
Option for the MenuEntry component.
Definition component_options.hpp:78
ftxui::MenuOption
Option for the Menu component.
Definition component_options.hpp:86
ftxui::RadioboxOption
Option for the Radiobox component.
Definition component_options.hpp:194
ftxui::UnderlineOption
Option for the underline effect.
Definition component_options.hpp:32
ftxui::WindowRenderState
State passed to the Window component's render function.
Definition component_options.hpp:237
ftxui::Direction
Direction
Direction is an enumeration that represents the four cardinal directions.
Definition direction.hpp:13
ftxui::Direction::Down
@ Down
ftxui::Direction::Right
@ Right
ftxui::Direction::Left
@ Left
ftxui::Color::White
@ White
Definition color.hpp:69
ftxui::Color::GrayDark
@ GrayDark
Definition color.hpp:62
ftxui::Color
Color is a class that represents a color in the terminal user interface.
Definition color.hpp:22
ftxui::animation::easing::QuadraticInOut
float QuadraticInOut(float p)
Definition animation.cpp:46
ftxui::animation::easing::Function
std::function< float(float)> Function
Definition animation.hpp:45
ftxui::animation::Duration
std::chrono::duration< float > Duration
Definition animation.hpp:30
ftxui
The FTXUI ftxui:: namespace.
Definition animation.hpp:10
ftxui::Element
std::shared_ptr< Node > Element
Definition elements.hpp:22
ftxui::Component
std::shared_ptr< ComponentBase > Component
Definition component_base.hpp:24
ref.hpp
ftxui::AnimatedColorsOption
Definition component_options.hpp:71
ftxui::AnimatedColorsOption::foreground
AnimatedColorOption foreground
Definition component_options.hpp:73
ftxui::AnimatedColorsOption::background
AnimatedColorOption background
Definition component_options.hpp:72
ftxui::EntryState
arguments for transform from |ButtonOption|, |CheckboxOption|, |RadioboxOption|, |MenuEntryOption|,...
Definition component_options.hpp:22
ftxui::EntryState::active
bool active
Whether the entry is the active one.
Definition component_options.hpp:25
ftxui::EntryState::label
std::string label
The label to display.
Definition component_options.hpp:23
ftxui::EntryState::focused
bool focused
Whether the entry is one focused by the user.
Definition component_options.hpp:26
ftxui::EntryState::index
int index
Index of the entry when applicable or -1.
Definition component_options.hpp:27
ftxui::EntryState::state
bool state
The state of the button/checkbox/radiobox.
Definition component_options.hpp:24
ftxui::InputState
Used to define style for the Input component.
Definition component_options.hpp:153
ftxui::InputState::focused
bool focused
Whether the input is focused by the user.
Definition component_options.hpp:156
ftxui::InputState::hovered
bool hovered
Whether the input is hovered by the mouse.
Definition component_options.hpp:155
ftxui::InputState::is_placeholder
bool is_placeholder
Definition component_options.hpp:157
ftxui::InputState::element
Element element
Definition component_options.hpp:154
ftxui::ResizableSplitOption
Definition component_options.hpp:211
ftxui::ResizableSplitOption::separator_func
std::function< Element()> separator_func
Definition component_options.hpp:218
ftxui::ResizableSplitOption::main_size
Ref< int > main_size
Definition component_options.hpp:215
ftxui::ResizableSplitOption::back
Component back
Definition component_options.hpp:213
ftxui::ResizableSplitOption::direction
Ref< Direction > direction
Definition component_options.hpp:214
ftxui::ResizableSplitOption::main
Component main
Definition component_options.hpp:212
ftxui::SliderOption
Definition component_options.hpp:224
ftxui::SliderOption::min
ConstRef< T > min
Definition component_options.hpp:226
ftxui::SliderOption::direction
Direction direction
Definition component_options.hpp:229
ftxui::SliderOption::color_active
Color color_active
Definition component_options.hpp:230
ftxui::SliderOption::increment
ConstRef< T > increment
Definition component_options.hpp:228
ftxui::SliderOption::value
Ref< T > value
Definition component_options.hpp:225
ftxui::SliderOption::max
ConstRef< T > max
Definition component_options.hpp:227
ftxui::SliderOption::on_change
std::function< void()> on_change
Definition component_options.hpp:232
ftxui::SliderOption::color_inactive
Color color_inactive
Definition component_options.hpp:231
ftxui::WindowOptions
Definition component_options.hpp:251
ftxui::WindowOptions::resize_down
Ref< bool > resize_down
Can the down side be resized?
Definition component_options.hpp:263
ftxui::WindowOptions::inner
Component inner
The component wrapped by this window.
Definition component_options.hpp:252
ftxui::WindowOptions::resize_left
Ref< bool > resize_left
Can the left side be resized?
Definition component_options.hpp:260
ftxui::WindowOptions::height
Ref< int > height
The height of the window.
Definition component_options.hpp:258
ftxui::WindowOptions::resize_top
Ref< bool > resize_top
Can the top side be resized?
Definition component_options.hpp:262
ftxui::WindowOptions::width
Ref< int > width
The width of the window.
Definition component_options.hpp:257
ftxui::WindowOptions::render
std::function< Element(const WindowRenderState &)> render
An optional function to customize how the window looks like:
Definition component_options.hpp:266
ftxui::WindowOptions::title
ConstStringRef title
The title displayed by this window.
Definition component_options.hpp:253
ftxui::WindowOptions::resize_right
Ref< bool > resize_right
Can the right side be resized?
Definition component_options.hpp:261
ftxui::WindowOptions::left
Ref< int > left
The left side position of the window.
Definition component_options.hpp:255
ftxui::WindowOptions::top
Ref< int > top
The top side position of the window.
Definition component_options.hpp:256