|
NexusForce 1.0.0
A rigorously engineered full-stack C++ backend library.
|
终端屏幕帧缓冲 更多...
#include <screen.hpp>
Public 成员函数 | |
| screen (int dimx, int dimy) | |
| 构造函数 | |
| void | resize (int dimx, int dimy) |
| 调整尺寸 | |
| const tui::cursor & | cursor () const noexcept |
| 获取光标 | |
| void | set_cursor (const tui::cursor &c) noexcept |
| 设置光标 | |
| uint8_t | register_hyperlink (const string &link) |
| 注册超链接,返回句柄 | |
| const string & | hyperlink (uint8_t id) const |
| 根据句柄查找超链接 | |
| string | to_string (const screen &prev) const |
| 生成 ANSI 转义序列 | |
| string | to_plaintext () const |
| 导出为纯文本(无 ANSI 转义) | |
| void | reset_position (bool clear=false) |
| 重置光标位置跟踪 | |
| void | clear () override |
| 清空所有状态 | |
| Public 成员函数 继承自 neforce::tui::surface | |
| surface (int dimx, int dimy) | |
| 构造函数 | |
| int | dimx () const noexcept |
| 获取宽度 | |
| int | dimy () const noexcept |
| 获取高度 | |
| string & | at (int x, int y) |
| 有边界检查的字符访问 | |
| cell & | cell_at (int x, int y) |
| 有边界检查的 cell 访问 | |
| cell & | fast_cell_at (int x, int y) noexcept |
| 无边界检查的 cell 访问 | |
| neforce::tui::screen::screen | ( | int | dimx, |
| int | dimy ) |
构造函数
| dimx | 宽度 |
| dimy | 高度 |
引用了 neforce::tui::surface::dimx() , 以及 neforce::tui::surface::dimy().
被这些函数引用 to_string().
|
inlinenodiscardnoexcept |
根据句柄查找超链接
| id | 超链接句柄 |
注册超链接,返回句柄
| link | URL 字符串 |
| void neforce::tui::screen::reset_position | ( | bool | clear = false | ) |
| void neforce::tui::screen::resize | ( | int | dimx, |
| int | dimy ) |
|
inlinenoexcept |
|
nodiscard |
导出为纯文本(无 ANSI 转义)
用于快照测试。样式信息不保留,仅输出字符内容。
生成 ANSI 转义序列
| prev | 上一帧的 screen |
比较当前帧与上一帧的每个 cell,仅输出变化的 样式和字符,最小化终端写入量。
引用了 neforce::prev() , 以及 screen().