|
NexusForce 1.0.0
A rigorously engineered full-stack C++ backend library.
|
TUI应用程序入口 更多...
#include <application.hpp>
Public 成员函数 | |
| template<typename RootComponent, typename... Args> | |
| application & | with_component (Args &&... args) |
| 设置根组件 | |
| application & | with_theme (const theme &theme) |
| 设置主题 | |
| application & | with_fps (int fps) |
| 设置最大刷新帧率 | |
| application & | with_title (string title) |
| 设置程序名 | |
| int | run () |
| 阻塞运行事件循环 | |
| void | quit (int exit_code=0) |
| 请求退出应用 | |
TUI应用程序入口
驱动主事件循环。
在文件 application.hpp 第 43 行定义.
| void neforce::tui::application::quit | ( | int | exit_code = 0 | ) |
请求退出应用
| exit_code | 退出码 |
| int neforce::tui::application::run | ( | ) |
阻塞运行事件循环
|
inline |
设置根组件
| RootComponent | 根组件类型 |
| Args | 构造参数类型 |
| args | 构造参数 |
在文件 application.hpp 第 61 行定义.
引用了 neforce::forward() , 以及 neforce::make_unique().
| application & neforce::tui::application::with_fps | ( | int | fps | ) |
设置最大刷新帧率
| fps | 帧率(0 表示仅事件驱动刷新) |
| application & neforce::tui::application::with_theme | ( | const theme & | theme | ) |
设置主题
| theme | 主题 |
| application & neforce::tui::application::with_title | ( | string | title | ) |
设置程序名
| title | 程序名 |