NexusForce
1.0.0
A rigorously engineered full-stack C++ backend library.
载入中...
搜索中...
未找到
text_input.hpp
浏览该文件的文档.
1
#ifndef NEFORCE_TUI_COMPONENT_TEXT_INPUT_HPP__
2
#define NEFORCE_TUI_COMPONENT_TEXT_INPUT_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
text_input_option
{
30
state<string>
*
text
=
nullptr
;
31
string
placeholder
;
32
function
<void()>
on_enter
;
33
tui::style
style
;
34
tui::style::wrap_mode
wrap
=
tui::style::wrap_mode::word
;
35
};
36
45
unique_ptr<component_base>
NEFORCE_API
text_input
(
text_input_option
opt);
46
// Components
48
// TUI
50
51
NEFORCE_END_COMPONENTS__
52
NEFORCE_END_TUI__
53
NEFORCE_END_NAMESPACE__
54
#endif
// NEFORCE_TUI_COMPONENT_TEXT_INPUT_HPP__
neforce::function
函数包装器主模板声明
定义
functional/function.hpp:30
neforce::tui::state
响应式状态变量
定义
state.hpp:36
neforce::unique_ptr
独占智能指针
定义
unique_ptr.hpp:206
component.hpp
TUI组件基类
neforce::tui::components::text_input
unique_ptr< component_base > text_input(text_input_option opt)
创建文本输入组件
neforce::tui::components::text_input_option
文本输入组件配置
定义
text_input.hpp:29
neforce::tui::components::text_input_option::on_enter
function< void()> on_enter
回车回调
定义
text_input.hpp:32
neforce::tui::components::text_input_option::style
tui::style style
样式
定义
text_input.hpp:33
neforce::tui::components::text_input_option::wrap
tui::style::wrap_mode wrap
文本换行模式
定义
text_input.hpp:34
neforce::tui::components::text_input_option::placeholder
string placeholder
占位提示
定义
text_input.hpp:31
neforce::tui::components::text_input_option::text
state< string > * text
文本状态
定义
text_input.hpp:30
neforce::tui::style
样式
定义
style.hpp:25
neforce::tui::style::wrap_mode
wrap_mode
文本换行模式
定义
style.hpp:99
neforce::tui::style::wrap_mode::word
@ word
按单词边界换行
定义
style.hpp:101
include
NeForce
tui
component
text_input.hpp
制作者
1.16.0