101 text(
"Lorem ipsum dolor sit amet, consectetur adipiscing elit. "),
102 text(
"Sed do eiusmod tempor incididunt ut labore et dolore magna "
104 text(
"Ut enim ad minim veniam, quis nostrud exercitation ullamco "
105 "laboris nisi ut aliquip ex ea commodo consequat. "),
106 text(
"Duis aute irure dolor in reprehenderit in voluptate velit esse "
107 "cillum dolore eu fugiat nulla pariatur. "),
108 text(
"Excepteur sint occaecat cupidatat non proident, sunt in culpa "
109 "qui officia deserunt mollit anim id est laborum. "),
Component Wrap(std::string name, Component component)
std::vector< std::string > toggle_entries
std::vector< std::string > radiobox_entries
std::function< void()> on_button_clicked_
static ScreenInteractive FitComponent()
Component Checkbox(CheckboxOption options)
Component Menu(MenuOption options)
文字列表。選定的元素會被聚焦。
Component Toggle(ConstStringListRef entries, int *selected)
元素的水平列表。使用者可以在其中導航。
Component Radiobox(RadioboxOption options)
元素清單,只能選擇一個。
Component Button(ButtonOption options)
繪製一個按鈕。點擊時執行一個函數。
Component Renderer(Component child, std::function< Element()>)
回傳一個新的元件,類似於 |child|,但使用 |render| 作為 Component::Render() 事件。
Component Input(InputOption options={})
用於編輯文字的輸入框。
virtual void Render(Screen &screen)
Element xflex(Element)
在 X 軸上盡可能擴展/在需要時最小化。
Decorator size(WidthOrHeight, Constraint, int value)
限制元素的大小。
Element text(std::wstring text)
顯示一段 Unicode 文字。
Element separator()
在兩個元素之間繪製垂直或水平分隔線。
Element border(Element)
在元素周圍繪製邊框。
Element vbox(Elements)
一個垂直一個接一個顯示元素的容器。
Element hbox(Elements)
一個逐一水平顯示元素的容器。
Component Slider(SliderOption< T > options)
std::shared_ptr< ComponentBase > Component