YSTest  PreAlpha_b500_20140530
The YSLib Test Project
 全部  命名空间 文件 函数 变量 类型定义 枚举 枚举值 友元 宏定义  
YSLib::UI::MTextList类 参考

文本列表模块。 更多...

#include <label.h>

类 YSLib::UI::MTextList 继承关系图:
YSLib::UI::MTextList 的协作图:

Public 类型

using ItemType = String
 项目类型:字符串。 更多...
 
using ListType = vector< ItemType >
 列表类型。 更多...
 
using IndexType = typename ListType::size_type
 索引类型。 更多...
 

Protected 成员函数

 MTextList (const shared_ptr< ListType > &={}, const Drawing::Font &={})
 构造:使用文本列表句柄和字体指针。 更多...
 
DefDeMoveCtor(MTextList)
public const ItemType
GetItemPtr (const IndexType &) const
 取文本列表。 更多...
 
 DefGetter (const ynothrow, SDst, ItemHeight, GetTextLineHeightExOf(tsList)) SDst GetMaxTextWidth() const
 取项目行高。 更多...
 
void SetList (const shared_ptr< ListType > &h)
 设置文本列表。 更多...
 
IndexType Find (const ItemType &) const
 查找项。 更多...
 
void RefreshTextState ()
 刷新文本状态。 更多...
 

Protected 属性

shared_ptr< ListTypehList
 文本列表句柄。 更多...
 
Drawing::TextState tsList
 列表文本状态。 更多...
 

额外继承的成员函数

- Public 成员函数 继承自 YSLib::UI::MLabel
 MLabel (const Drawing::Font &={}, TextAlignment=TextAlignment::Left)
 构造:使用指定字体。 更多...
 
 DefDeMoveCtor (MLabel) virtual DefDeDtor(MLabel) void DrawText(const Size &
 绘制文本。 更多...
 
const PaintContext &virtual void DrawClippedText (const Graphics &, const Rect &, Drawing::TextState &)
 绘制剪切文本:使用指定的图形接口上下文、相对于部件的边界和文本状态。 更多...
 
- Public 属性 继承自 YSLib::UI::MLabel
Drawing::Font Font
 字体。 更多...
 
Drawing::Padding Margin
 文本和容器的间距。 更多...
 
TextAlignment HorizontalAlignment
 文本水平和竖直对齐属性。 更多...
 
TextAlignment VerticalAlignment
 
bool AutoWrapLine
 启用自动换行。 更多...
 
String Text
 标签文本。 更多...
 
 Color
 

详细描述

文本列表模块。

警告
非虚析构。

在文件 label.h144 行定义.

成员类型定义说明

using YSLib::UI::MTextList::IndexType = typename ListType::size_type

索引类型。

在文件 label.h149 行定义.

项目类型:字符串。

在文件 label.h147 行定义.

列表类型。

在文件 label.h148 行定义.

构造及析构函数说明

YSLib::UI::MTextList::MTextList ( const shared_ptr< ListType > &  h = {},
const Drawing::Font fnt = {} 
)
explicitprotected

构造:使用文本列表句柄和字体指针。

注解
当文本列表指针为空时新建。
自从
build 337

在文件 label.cpp114 行定义.

参考 hList.

成员函数说明

YSLib::UI::MTextList::DefGetter ( const ynothrow  ,
SDst  ,
ItemHeight  ,
GetTextLineHeightExOf(tsList  
) const
protected

取项目行高。

自从
build 301

取文本列表中的最大文本宽度。

自从
build 282
MTextList::IndexType YSLib::UI::MTextList::Find ( const ItemType text) const
protected

查找项。

返回
若找到则返回对应索引,否则返回 IndexType(-1)
自从
build 316

在文件 label.cpp144 行定义.

const MTextList::ItemType * YSLib::UI::MTextList::GetItemPtr ( const IndexType idx) const
protected

取文本列表。

自从
build 392

取文本列表引用。

自从
build 392

取指定项目索引的项目指针。

自从
build 392

取指定项目索引的项目 const 指针。

自从
build 392

在文件 label.cpp123 行定义.

void YSLib::UI::MTextList::RefreshTextState ( )
protected
void YSLib::UI::MTextList::SetList ( const shared_ptr< ListType > &  h)
inlineprotected

设置文本列表。

注解
若参数为空则忽略。
自从
build 292

在文件 label.h215 行定义.

参考 YB_LIKELY.

类成员变量说明

shared_ptr<ListType> YSLib::UI::MTextList::hList
mutableprotected

文本列表句柄。

在文件 label.h152 行定义.

参考自 MTextList().

Drawing::TextState YSLib::UI::MTextList::tsList
protected

列表文本状态。

自从
build 346

在文件 label.h157 行定义.

参考自 RefreshTextState().


该类的文档由以下文件生成: