28 #ifndef YSL_INC_UI_label_h_
29 #define YSL_INC_UI_label_h_ 1
32 #include YFM_YSLib_UI_YWidget
34 #include YFM_YSLib_Core_YString
35 #include YFM_YSLib_Service_TextBase
126 : Widget(
r, b, c), MLabel(fnt)
135 Refresh(PaintEventArgs&&) override;
182 DefGetter(ynothrow, ListType&, ListRef, *hList)
188 GetItemPtr(const IndexType&);
194 GetItemPtr(const IndexType&) const;
200 GetTextLineHeightExOf(tsList))
207 GetMaxTextWidth() const;
252 : HilightBackColor(bc), HilightTextColor(fc)
254 template<
class _type>
typename ListType::size_type IndexType
索引类型。
void Refresh(PaintEventArgs &&) override
刷新:按指定参数绘制界面并更新状态。
#define DefDeDtor(_t)
定义默认析构函数。
YF_API void DrawClippedText(const Graphics &g, const Rect &mask, TextState &ts, const String &str, bool line_wrap)
绘制剪切区域的文本。
Color HilightTextColor
高亮文本色。
GIHEvent< UIEventArgs && > ItemType
std::uint16_t SDst
屏幕坐标距离。
#define DefGetter(_q, _t, _n,...)
Color HilightBackColor
高亮背景色。
不可复制对象:禁止派生类调用默认原型的复制构造函数和复制赋值操作符。
YSLib 标准字符串(使用 UCS-2 作为内部编码)。
void SetList(const shared_ptr< ListType > &)
设置文本列表。
#define ynothrow
YSLib 无异常抛出保证:若支持 noexcept 关键字, 指定特定的 noexcept 异常规范。
YF_API void DrawText(const Graphics &g, TextState &ts, const String &str, bool line_wrap)
绘制文本。
MHilightText(const Color &bc, const Color &fc)
vector< ItemType > ListType
列表类型。
TextAlignment HorizontalAlignment
文本水平和竖直对齐属性。
std::function< void(PaintEventArgs &&)> HBrush
画刷回调函数。
shared_ptr< ListType > hList
文本列表句柄。
Drawing::TextState tsList
列表文本状态。
Drawing::Padding Margin
文本和容器的间距。
Selected const shared_ptr< ListType > const pair< Color, Color > & DefDeMoveCtor(TextList) DefPredMem(const ynothrow
Label(const Rect &r={}, const Drawing::Font &fnt={}, HBrush b=MakeBlankBrush(), Color c=Drawing::ColorSpace::Black)
构造:使用指定边界、字体、背景画刷和文字颜色。
TextAlignment VerticalAlignment
MHilightText(const _type &pr)