NexusForce
1.0.0
A rigorously engineered full-stack C++ backend library.
载入中...
搜索中...
未找到
radiobox.hpp
浏览该文件的文档.
1
#ifndef NEFORCE_TUI_COMPONENT_RADIOBOX_HPP__
2
#define NEFORCE_TUI_COMPONENT_RADIOBOX_HPP__
3
10
11
#include "
NeForce/tui/component/component.hpp
"
12
NEFORCE_BEGIN_NAMESPACE__
13
NEFORCE_BEGIN_TUI__
14
NEFORCE_BEGIN_COMPONENTS__
15
20
25
29
struct
radiobox_option
{
30
vector<string>
entries
;
31
int
*
selected
=
nullptr
;
32
function
<void()>
on_change
;
33
};
34
40
unique_ptr<component_base>
NEFORCE_API
radiobox
(
radiobox_option
option);
41
// Components
43
// TUI
45
46
NEFORCE_END_COMPONENTS__
47
NEFORCE_END_TUI__
48
NEFORCE_END_NAMESPACE__
49
#endif
// NEFORCE_TUI_COMPONENT_RADIOBOX_HPP__
neforce::function
函数包装器主模板声明
定义
functional/function.hpp:30
neforce::unique_ptr
独占智能指针
定义
unique_ptr.hpp:206
neforce::vector
动态大小数组容器
定义
vector.hpp:167
component.hpp
TUI组件基类
neforce::tui::components::radiobox
unique_ptr< component_base > radiobox(radiobox_option option)
创建单选按钮组
neforce::tui::components::radiobox_option
单选按钮组配置
定义
radiobox.hpp:29
neforce::tui::components::radiobox_option::on_change
function< void()> on_change
选择变更回调
定义
radiobox.hpp:32
neforce::tui::components::radiobox_option::selected
int * selected
当前选中索引
定义
radiobox.hpp:31
neforce::tui::components::radiobox_option::entries
vector< string > entries
选项文本列表
定义
radiobox.hpp:30
include
NeForce
tui
component
radiobox.hpp
制作者
1.16.0