1#ifndef NEFORCE_TUI_DOM_STYLE_HPP__
2#define NEFORCE_TUI_DOM_STYLE_HPP__
13NEFORCE_BEGIN_NAMESPACE__
216 .bg =
color{16, 16, 16},
217 .fg =
color{220, 220, 220},
219 .secondary =
color{100, 100, 220},
223 .muted =
color{128, 128, 128},
224 .border =
color{64, 64, 64},
230NEFORCE_END_NAMESPACE__
static constexpr color green() noexcept
绿色
static constexpr color red() noexcept
红色
static constexpr color yellow() noexcept
黄色
static constexpr color cyan() noexcept
青色
unsigned char uint8_t
8位无符号整数类型
constexpr none_t none
默认空表示
constexpr theme dark_theme
预置暗色主题
decorator color(color c)
前景色装饰器
constexpr decltype(auto) end(Container &cont) noexcept(noexcept(cont.end()))
获取容器的结束迭代器
style::size_hint height
高度约束
enum style::align align
交叉轴对齐
enum style::align align_content
多行/列时交叉轴内容对齐
style::justify justify
主轴对齐
style::size_hint width
宽度约束
@ percent
父容器的百分比,value 为 0-100
int value
Fixed 字符数 / Percent 百分比 / Fill 弹性权重
optional< bool > underline
单下划线
optional< float > flex_grow
弹性增长权重
optional< bool > underlined_double
双下划线
optional< size_hint > width
宽度约束
optional< color > borderColor
边框颜色
optional< bool > reverse
反色
optional< float > flex_shrink
弹性收缩权重
optional< wrap_mode > text_wrap
文本换行模式
optional< bool > strikethrough
删除线
static style merge(const style &base, const style &over)
合并两个样式
optional< bool > italic
斜体
optional< size_hint > height
高度约束
style input_style(bool focused) const
获取输入框样式
style text_style() const
获取默认文本样式
style button_style(style::variant v) const
获取按钮样式