YSTest: YSLib::Components::MLabel Class Reference

YSTest PreAlpha_b380_20130211 The YSLib Test Project

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Attributes | Protected Member Functions | List of all members
YSLib::Components::MLabel Class Reference

标签模块。 More...

`#include <label.h>`

Inheritance diagram for YSLib::Components::MLabel:
[legend]
Collaboration diagram for YSLib::Components::MLabel:
[legend]

## Public Attributes

Drawing::Font | Font
| 字体。
Drawing::Padding | Margin
| 文本和容器的间距。
TextAlignment | HorizontalAlignment
| 文本水平和竖直对齐属性。
TextAlignment | VerticalAlignment
bool | AutoWrapLine
| 启用自动换行。
String | Text
| 标签文本。

## Protected Member Functions

| MLabel (const Drawing::Font &={}, TextAlignment=TextAlignment::Left)
| 构造：使用指定字体。
| MLabel (MLabel &&)=default
void | DrawText (const Size &, Color, const PaintContext &)
| 绘制文本。

## Additional Inherited Members

Private Member Functions inherited from ystdex::noncopyable
| noncopyable (const noncopyable &)=delete
| 禁止复制构造。
noncopyable & | operator= (const noncopyable &)=delete
| 禁止赋值复制。
| noncopyable ()=default
| `protected` 构造：默认实现。
| ~noncopyable ()=default
| `protected` 析构：默认实现。

## Detailed Description

标签模块。

Warning
  非虚析构。

Definition at line 55 of file label.h.

## Constructor & Destructor Documentation

YSLib::Components::MLabel::MLabel | ( | const Drawing::Font & | = `{}`,
|  | TextAlignment | = `TextAlignment::Left`
| ) |  |

explicitprotected

构造：使用指定字体。

Since
  build 337

YSLib::Components::MLabel::MLabel | ( | MLabel && |  | ) |

inlineprotecteddefault

## Member Function Documentation

void MLabel::DrawText | ( | const Size & | s,
|  | Color | c,
|  | const PaintContext & | e
| ) |  |

protected

绘制文本。

Since
  build 371

Definition at line 43 of file label.cpp.

References YSLib::Drawing::PaintContext::ClipArea, YSLib::Drawing::PenStyle::Color, platform::KeyCodes::Down, YSLib::Drawing::DrawClippedText(), FetchMargin(), YSLib::Drawing::FetchStringWidth(), YSLib::Drawing::PenStyle::Font, YSLib::Drawing::GetHorizontalOf(), YSLib::Drawing::Graphics::GetSize(), YSLib::Drawing::GetTextLineHeightOf(), YSLib::Drawing::GetVerticalOf(), YSLib::Drawing::Size::Height, platform::KeyCodes::Left, YSLib::Drawing::PaintContext::Location, YSLib::Drawing::TextState::Margin, YSLib::Drawing::TextState::Pen, YSLib::Drawing::TextState::ResetPen(), platform::KeyCodes::Right, YSLib::Drawing::PaintContext::Target, platform::KeyCodes::Up, YSLib::Drawing::Size::Width, YSLib::Drawing::GBinaryGroup< _type >::X, YSLib::Drawing::GBinaryGroup< _type >::Y, and yunseq.

Referenced by YSLib::Components::CheckButton::Refresh().

Here is the call graph for this function:

Here is the caller graph for this function:

## Member Data Documentation

bool YSLib::Components::MLabel::AutoWrapLine

启用自动换行。

Since
  build 309

Definition at line 70 of file label.h.

Drawing::Font YSLib::Components::MLabel::Font

字体。

Definition at line 58 of file label.h.

TextAlignment YSLib::Components::MLabel::HorizontalAlignment

文本水平和竖直对齐属性。

Note
  只在停用自动换行且可完整显示时有效。

Since
  build 208

Definition at line 65 of file label.h.

Drawing::Padding YSLib::Components::MLabel::Margin

文本和容器的间距。

Definition at line 59 of file label.h.

Referenced by YSLib::Components::CheckButton::CheckButton(), YSLib::Components::CheckButton::Refresh(), and YSLib::Components::MTextList::RefreshTextState().

String YSLib::Components::MLabel::Text

标签文本。

Definition at line 73 of file label.h.

Referenced by YSLib::Components::DialogPanel::DialogPanel().

TextAlignment YSLib::Components::MLabel::VerticalAlignment

Definition at line 65 of file label.h.

The documentation for this class was generated from the following files:

- label.h
- label.cpp