YSTest  PreAlpha_b380_20130211
The YSLib Test Project
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
YSLib::Components::Label Class Reference

标签。 More...

#include <label.h>

Inheritance diagram for YSLib::Components::Label:
Collaboration diagram for YSLib::Components::Label:

Public Member Functions

 Label (const Rect &r={}, const Drawing::Font &fnt={})
 构造:使用指定边界和字体。
 
 Label (Label &&)=default
 
void Refresh (PaintEventArgs &&) override
 刷新:按指定参数绘制界面并更新状态。
 
- Public Member Functions inherited from YSLib::Components::Widget
 Widget (const Rect &={}, Color=Drawing::ColorSpace::White, Color=Drawing::ColorSpace::Black)
 
template<typename _tView , typename _tRenderer , typename _tController >
 Widget (_tView &&pView_=make_unique< View >(), _tRenderer &&pRenderer_=make_unique< Renderer >(), _tController &&pController_={})
 构造:使用视图指针、渲染器指针和控制器指针,无背景。
 
 Widget (const Widget &)
 复制构造:除容器指针为空外深复制。
 
 Widget (Widget &&)=default
 
virtual ~Widget ()
 析构:虚实现。
 
SPos GetX () const ynothrow
 
SPos GetY () const ynothrow
 
SDst GetWidth () const ynothrow
 
SDst GetHeight () const ynothrow
 
virtual RendererGetRenderer () const ynothrow
 取渲染器。
 
virtual ViewGetView () const ynothrow
 取部件视图。
 
virtual AControllerGetController () const override
 取控制器。
 
virtual WidgetRange GetChildren () override
 
void SetX (SDst _tempArgName)
 
void SetY (SDst _tempArgName)
 
void SetWidth (SDst _tempArgName)
 
void SetHeight (SDst _tempArgName)
 
void SetRenderer (unique_ptr< Renderer > &&)
 设置渲染器为指定指针指向的对象,同时更新渲染器状态。
 
void SetView (unique_ptr< View > &&)
 设置渲染器为指定指针指向的对象,同时更新渲染器状态。
 
- Public Member Functions inherited from YSLib::Components::IWidget
virtual ~IWidget ()
 

Additional Inherited Members

- Public Attributes inherited from YSLib::Components::Widget
HBrush Background
 背景。
 
Color ForeColor
 默认前景色。
 
- Protected Attributes inherited from YSLib::Components::MLabel
Drawing::Font Font
 字体。
 
Drawing::Padding Margin
 文本和容器的间距。
 
TextAlignment HorizontalAlignment
 文本水平和竖直对齐属性。
 
TextAlignment VerticalAlignment
 
bool AutoWrapLine
 启用自动换行。
 
String Text
 标签文本。
 

Detailed Description

标签。

Definition at line 94 of file label.h.

Constructor & Destructor Documentation

YSLib::Components::Label::Label ( const Rect r = {},
const Drawing::Font fnt = {} 
)
inlineexplicit

构造:使用指定边界和字体。

Since
build 337

Definition at line 114 of file label.h.

YSLib::Components::Label::Label ( Label &&  )
inlinedefault

Member Function Documentation

void Label::Refresh ( PaintEventArgs &&  e)
overridevirtual

刷新:按指定参数绘制界面并更新状态。

Since
build 294

Reimplemented from YSLib::Components::Widget.

Definition at line 99 of file label.cpp.

References YSLib::Drawing::DrawText(), and YSLib::Components::GetSizeOf().

Here is the call graph for this function:


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