|
NexusForce 1.0.0
A rigorously engineered full-stack C++ backend library.
|
差分渲染引擎 更多...
#include <reconciler.hpp>
Public 成员函数 | |
| reconciler (sys_console &console, strand &s, io_context &ctx) | |
| 构造函数 | |
| void | mount (component_base *root) |
| 挂载根组件 | |
| void | schedule_update (component_base *comp) |
| 调度组件更新 | |
| void | mark_dirty () |
| 强制全量重绘 | |
| bool | dispatch_key (const key_event &e) |
| 分发键盘事件到焦点组件 | |
| bool | dispatch_mouse (const mouse_event &e) |
| 分发鼠标事件 | |
| void | flush () |
| 有脏标记则执行渲染管线 | |
| bool | is_dirty () const noexcept |
| 是否有待渲染的脏标记 | |
| function< void(component_base *)> | schedule_render_callback () |
| 获取组件调度回调 | |
| void | set_theme (const theme &t) |
| 应用主题 | |
| neforce::tui::reconciler::reconciler | ( | sys_console & | console, |
| strand & | s, | ||
| io_context & | ctx ) |
构造函数
| console | 控制台渲染后端 |
| s | 串行执行器 |
| ctx | 事件循环上下文 |
引用了 neforce::console , 以及 reconciler().
被这些函数引用 reconciler().
| bool neforce::tui::reconciler::dispatch_key | ( | const key_event & | e | ) |
分发键盘事件到焦点组件
| e | 键盘事件 |
| bool neforce::tui::reconciler::dispatch_mouse | ( | const mouse_event & | e | ) |
分发鼠标事件
| e | 鼠标事件 |
|
inlinenodiscardnoexcept |
| void neforce::tui::reconciler::mount | ( | component_base * | root | ) |
挂载根组件
| root | 根组件指针 |
注入 schedule_render 回调,调用 setup(),标记全量渲染。
| void neforce::tui::reconciler::schedule_update | ( | component_base * | comp | ) |
调度组件更新
| comp | 需要重渲染的组件 |
| void neforce::tui::reconciler::set_theme | ( | const theme & | t | ) |