NexusForce
1.0.0
A rigorously engineered full-stack C++ backend library.
载入中...
搜索中...
未找到
window.hpp
浏览该文件的文档.
1
#ifndef NEFORCE_TUI_COMPONENT_WINDOW_HPP__
2
#define NEFORCE_TUI_COMPONENT_WINDOW_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
window_options
{
33
struct
render_state
{
34
element
inner
;
35
string
title
;
36
bool
active
=
false
;
37
bool
drag
=
false
;
38
bool
resize
=
false
;
39
};
40
41
unique_ptr<component_base>
inner
;
42
string
title
;
43
int
*
left
=
nullptr
;
44
int
*
top
=
nullptr
;
45
int
*
width
=
nullptr
;
46
int
*
height
=
nullptr
;
47
function
<
element
(
render_state
)>
render
;
48
};
49
55
unique_ptr<component_base>
NEFORCE_API
window
(
window_options
options);
56
// Components
58
// TUI
60
61
NEFORCE_END_COMPONENTS__
62
NEFORCE_END_TUI__
63
NEFORCE_END_NAMESPACE__
64
#endif
// NEFORCE_TUI_COMPONENT_WINDOW_HPP__
neforce::function
函数包装器主模板声明
定义
functional/function.hpp:30
neforce::tui::element
虚拟UI元素
定义
element.hpp:37
neforce::unique_ptr
独占智能指针
定义
unique_ptr.hpp:206
component.hpp
TUI组件基类
neforce::tui::components::window
unique_ptr< component_base > window(window_options options)
创建浮动窗口组件
neforce::tui::components::window_options::render_state
渲染状态
定义
window.hpp:33
neforce::tui::components::window_options::render_state::resize
bool resize
是否正在调整大小
定义
window.hpp:38
neforce::tui::components::window_options::render_state::drag
bool drag
是否正在拖动
定义
window.hpp:37
neforce::tui::components::window_options::render_state::active
bool active
是否激活
定义
window.hpp:36
neforce::tui::components::window_options::render_state::title
string title
窗口标题
定义
window.hpp:35
neforce::tui::components::window_options::render_state::inner
element inner
内部子组件的元素
定义
window.hpp:34
neforce::tui::components::window_options
窗口配置
定义
window.hpp:29
neforce::tui::components::window_options::inner
unique_ptr< component_base > inner
内部子组件
定义
window.hpp:41
neforce::tui::components::window_options::top
int * top
上位置
定义
window.hpp:44
neforce::tui::components::window_options::width
int * width
宽度
定义
window.hpp:45
neforce::tui::components::window_options::render
function< element(render_state)> render
自定义渲染函数
定义
window.hpp:47
neforce::tui::components::window_options::height
int * height
高度
定义
window.hpp:46
neforce::tui::components::window_options::left
int * left
左位置
定义
window.hpp:43
neforce::tui::components::window_options::title
string title
窗口标题
定义
window.hpp:42
include
NeForce
tui
component
window.hpp
制作者
1.16.0