|
| template<class T , class... Args> |
| std::shared_ptr< T > | Make (Args &&... args) |
| |
| Component | operator| (Component component, ComponentDecorator decorator) |
| |
| Component | operator| (Component component, ElementDecorator decorator) |
| |
| Component & | operator|= (Component &component, ComponentDecorator decorator) |
| |
| Component & | operator|= (Component &component, ElementDecorator decorator) |
| |
| Component | Vertical (Components children) |
| | 一个组件列表,垂直逐个绘制,并使用上/下箭头键或“j”/“k”键垂直导航。
|
| |
| Component | Vertical (Components children, int *selector) |
| | 一个组件列表,垂直逐个绘制,并使用上/下箭头键或“j”/“k”键垂直导航。 这对于实现菜单很有用。
|
| |
| Component | Horizontal (Components children) |
| | 一个组件列表,水平逐个绘制,并使用左/右箭头键或“h”/“l”键水平导航。
|
| |
| Component | Horizontal (Components children, int *selector) |
| | 一个组件列表,水平逐个绘制,并使用左/右箭头键或“h”/“l”键水平导航。
|
| |
| Component | Tab (Components children, int *selector) |
| | 一个组件列表,一次只绘制并与其交互一个。|selector| 提供所选组件的索引。这对于实现选项卡很有用。
|
| |
| Component | Stacked (Components children) |
| | 一个组件列表,它们相互堆叠。 事件传播到第一个组件,如果未处理,则传播到第二个,依此类推。 组件以给定顺序的相反顺序绘制。 当一个组件获得焦点时,它会被置于最前面,而不改变其他元素的相对顺序。
|
| |
| Component | Button (ButtonOption option) |
| | 绘制一个按钮。点击时执行一个函数。
|
| |
| Component | Button (ConstStringRef label, std::function< void()> on_click, ButtonOption option) |
| | 绘制一个按钮。点击时执行一个函数。
|
| |
| Component | Checkbox (CheckboxOption option) |
| | 绘制可勾选元素。
|
| |
| Component | Checkbox (ConstStringRef label, bool *checked, CheckboxOption option) |
| | 绘制可勾选元素。
|
| |
| Component | Input (InputOption option) |
| | 用于编辑文本的输入框。
|
| |
| Component | Input (StringRef content, InputOption option) |
| | 用于编辑文本的输入框。
|
| |
| Component | Input (StringRef content, StringRef placeholder, InputOption option) |
| | 用于编辑文本的输入框。
|
| |
| Component | Menu (MenuOption option) |
| | 文本列表。選定的元素是焦點。
|
| |
| Component | Menu (ConstStringListRef entries, int *selected, MenuOption option) |
| | 文本列表。選定的元素是焦點。
|
| |
| Component | MenuEntry (MenuEntryOption option) |
| | 一個特定的菜單條目。它們可以放入 Container::Vertical 中形成一個菜單。
|
| |
| Component | MenuEntry (ConstStringRef label, MenuEntryOption option) |
| | 一個特定的菜單條目。它們可以放入 Container::Vertical 中形成一個菜單。
|
| |
| Component | Radiobox (RadioboxOption option) |
| | 元素列表,其中只能选择一个。
|
| |
| Component | Radiobox (ConstStringListRef entries, int *selected, RadioboxOption option) |
| | 元素列表,其中只能选择一个。
|
| |
| Component | Dropdown (ConstStringListRef entries, int *selected) |
| | 一个下拉菜单。
|
| |
| Component | Dropdown (DropdownOption option) |
| | 一个下拉菜单。
|
| |
| Component | Toggle (ConstStringListRef entries, int *selected) |
| | 元素的水平列表。用戶可以瀏覽它們。
|
| |
| template<typename T > |
| Component | Slider (SliderOption< T > options) |
| | 任意方向的滑块。
|
| |
| Component | Slider (ConstStringRef label, Ref< int > value, ConstRef< int > min, ConstRef< int > max, ConstRef< int > increment) |
| | 一个水平滑块。
|
| |
| Component | Slider (ConstStringRef label, Ref< float > value, ConstRef< float > min=0.f, ConstRef< float > max=100.f, ConstRef< float > increment=5.f) |
| |
| Component | Slider (ConstStringRef label, Ref< long > value, ConstRef< long > min=0L, ConstRef< long > max=100L, ConstRef< long > increment=5L) |
| |
| Component | ResizableSplit (ResizableSplitOption options) |
| | 两个组件之间的分割。
|
| |
| Component | ResizableSplitLeft (Component main, Component back, int *main_size) |
| | 两个组件之间的水平分割,可通过鼠标配置。
|
| |
| Component | ResizableSplitRight (Component main, Component back, int *main_size) |
| | 两个组件之间的水平分割,可通过鼠标配置。
|
| |
| Component | ResizableSplitTop (Component main, Component back, int *main_size) |
| | 两个组件之间的垂直分割,可通过鼠标配置。
|
| |
| Component | ResizableSplitBottom (Component main, Component back, int *main_size) |
| | 两个组件之间的垂直分割,可通过鼠标配置。
|
| |
| Component | Renderer (Component child, std::function< Element()> render) |
| | 返回一个新组件,类似于 |child|,但使用 |render| 作为 Component::Render() 事件。
|
| |
| Component | Renderer (std::function< Element()> render) |
| | 返回一个组件,使用 |render| 来渲染其界面。
|
| |
| Component | Renderer (std::function< Element(bool)> render) |
| | 返回一个可聚焦的组件,使用 |render| 来渲染其界面。
|
| |
| ComponentDecorator | Renderer (ElementDecorator decorator) |
| | 装饰一个组件,通过装饰其渲染内容。
|
| |
| Component | CatchEvent (Component child, std::function< bool(Event)>) |
| |
| ComponentDecorator | CatchEvent (std::function< bool(Event)> on_event) |
| | 装饰一个组件,使用|on_event|捕获事件。当事件已被处理时,此函数必须返回true,否则返回false。
|
| |
| Component | Maybe (Component child, const bool *show) |
| | 装饰一个组件 |child|。它仅在 |show| 为 true 时显示。
|
| |
| Component | Maybe (Component child, std::function< bool()> show) |
| | 装饰一个组件 |child|。它仅在 |show| 返回 true 时显示。 true。
|
| |
| ComponentDecorator | Maybe (const bool *show) |
| | 装饰一个组件。它仅在 |show| 为 true 时显示。
|
| |
| ComponentDecorator | Maybe (std::function< bool()> show) |
| | 装饰一个组件。它仅在 |show| 函数返回 true 时显示。 返回 true。
|
| |
| Component | Modal (Component main, Component modal, const bool *show_modal) |
| |
| ComponentDecorator | Modal (Component modal, const bool *show_modal) |
| |
| Component | Collapsible (ConstStringRef label, Component child, Ref< bool > show=false) |
| |
| Component | Hoverable (Component component, bool *hover) |
| |
| Component | Hoverable (Component component, std::function< void()> on_enter, std::function< void()> on_leave) |
| | 包装一个组件。使用回调。
|
| |
| Component | Hoverable (Component component, std::function< void(bool)> on_change) |
| | 包装一个组件。使其能够知道鼠标是否悬停在其上。
|
| |
| ComponentDecorator | Hoverable (bool *hover) |
| | 包装一个组件。使其能够知道鼠标是否悬停在其上。
|
| |
| ComponentDecorator | Hoverable (std::function< void()> on_enter, std::function< void()> on_leave) |
| | 包装一个组件。使其能够知道鼠标是否悬停在其上。
|
| |
| ComponentDecorator | Hoverable (std::function< void(bool)> on_change) |
| | 包装一个组件。使其能够知道鼠标是否悬停在其上。
|
| |
| Component | Window (WindowOptions option) |
| | 一个可拖动/可调整大小的窗口。要使用多个窗口,它们必须 使用 Container::Stacked({...}) 组件进行堆叠;
|
| |