NexusForce 1.0.0
A rigorously engineered full-stack C++ backend library.
载入中...
搜索中...
未找到
neforce::tui::style结构体 参考

样式 更多...

#include <style.hpp>

struct  padding
 内边距 更多...
struct  margin
 外边距 更多...
struct  size_hint
 尺寸约束 更多...

Public 类型

enum class  border : uint8_t { none , single , double_ , rounded }
 边框样式 更多...
enum class  align : uint8_t { start , center , end , stretch }
 对齐方式 更多...
enum class  justify : uint8_t {
  start , center , end , space_between ,
  space_around
}
 主轴对齐方式 更多...
enum class  direction : uint8_t { row , column }
 布局方向 更多...
enum class  variant : uint8_t {
  default_ , primary , secondary , danger ,
  success
}
 组件语义变体 更多...
enum class  wrap_mode : uint8_t { none , word , character }
 文本换行模式 更多...

静态 Public 成员函数

static style merge (const style &base, const style &over)
 合并两个样式

Public 属性

optional< colorfg
 前景色
optional< colorbg
 背景色
optional< bool > bold
 粗体
optional< bool > dim
 暗色
optional< bool > underline
 单下划线
optional< bool > underlined_double
 双下划线
optional< bool > italic
 斜体
optional< bool > reverse
 反色
optional< bool > blink
 闪烁
optional< bool > strikethrough
 删除线
optional< padding > padding
 内边距
optional< margin > margin
 外边距
optional< borderborder
 边框样式
optional< colorborderColor
 边框颜色
optional< size_hintwidth
 宽度约束
optional< size_hintheight
 高度约束
optional< alignalign
 默认对齐方式
optional< float > flex_grow
 弹性增长权重
optional< float > flex_shrink
 弹性收缩权重
optional< wrap_modetext_wrap
 文本换行模式

详细描述

样式

在文件 style.hpp25 行定义.

成员枚举类型说明

◆ align

enum class neforce::tui::style::align : uint8_t
strong

对齐方式

枚举值
start 

起始对齐

center 

居中对齐

end 

末尾对齐

stretch 

拉伸填充

在文件 style.hpp59 行定义.

◆ border

enum class neforce::tui::style::border : uint8_t
strong

边框样式

枚举值
none 

无边框

single 

单线边框 ┌─┐│└─┘

double_ 

双线边框 ╔═╗║╚═╝

rounded 

圆角边框 ╭─╮│╰─╯

在文件 style.hpp49 行定义.

◆ direction

布局方向

枚举值
row 

水平排列

column 

垂直排列

在文件 style.hpp80 行定义.

◆ justify

主轴对齐方式

枚举值
start 

起始对齐

center 

居中对齐

end 

末尾对齐

space_between 

两端对齐,元素之间均匀分布

space_around 

环绕对齐,每个元素两侧有相等间距

在文件 style.hpp69 行定义.

◆ variant

组件语义变体

枚举值
default_ 

默认样式

primary 

主要操作

secondary 

次要操作

danger 

危险操作

success 

成功/确认操作

在文件 style.hpp88 行定义.

◆ wrap_mode

文本换行模式

枚举值
none 

不换行,超出截断

word 

按单词边界换行

character 

按字符边界换行

在文件 style.hpp99 行定义.

成员函数说明

◆ merge()

style neforce::tui::style::merge ( const style & base,
const style & over )
static

合并两个样式

参数
base基础样式
over覆盖样式
返回
合并后的样式

该结构体的文档由以下文件生成: