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

控件。 More...

#include <ycontrol.h>

Inheritance diagram for YSLib::Components::Control:
Collaboration diagram for YSLib::Components::Control:

Classes

class  ControlEventMap
 扩展控件事件表。 More...
 

Public Member Functions

 Control (const Rect &={})
 构造:使用指定边界,默认背景(同 Widget 默认构造)。
 
 Control (const Rect &, NoBackgroundTag)
 构造:使用指定边界,无背景。
 
 Control (const Control &)
 复制构造:除容器为空外深复制。
 
 Control (Control &&)=default
 
virtual IWidget * GetBoundControlPtr (const KeyInput &)
 取按键-指针设备输入默认事件组映射。
 
void OnTouch_Close (TouchEventArgs &&)
 处理屏幕事件:关闭显示。
 
- 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 Renderer & GetRenderer () const ynothrow
 取渲染器。
 
virtual View & GetView () const ynothrow
 取部件视图。
 
virtual AController & GetController () 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 > &&)
 设置渲染器为指定指针指向的对象,同时更新渲染器状态。
 
virtual void Refresh (PaintEventArgs &&)
 刷新:按指定参数绘制界面并更新状态。
 
- Public Member Functions inherited from YSLib::Components::IWidget
virtual ~IWidget ()
 

Public Attributes

std::function< IWidget *(const
KeyInput &)> 
BoundControlPtr
 按键-指针设备输入事件组映射。
 
- Public Attributes inherited from YSLib::Components::Widget
HBrush Background
 背景。
 
Color ForeColor
 默认前景色。
 

Detailed Description

控件。

Since
build 168

Definition at line 304 of file ycontrol.h.

Constructor & Destructor Documentation

YSLib::Components::Control::Control ( const Rect &  = {})
explicit

构造:使用指定边界,默认背景(同 Widget 默认构造)。

See Also
其它重载构造函数。
Since
build 337
YSLib::Components::Control::Control ( const Rect &  ,
NoBackgroundTag   
)

构造:使用指定边界,无背景。

Note
使用扩展控件事件表加载的事件处理器。
加载事件处理器: Move 、 Resize 、 GotFocus 和 LostFocus 时自动无效化。
加载事件处理器: OnTouchDown_RequestToTopFocused 。
Since
build 350
YSLib::Components::Control::Control ( const Control &  )

复制构造:除容器为空外深复制。

YSLib::Components::Control::Control ( Control &&  )
default

Member Function Documentation

virtual IWidget* YSLib::Components::Control::GetBoundControlPtr ( const KeyInput &  )
inlinevirtual

取按键-指针设备输入默认事件组映射。

Reimplemented in YSLib::Components::VerticalScrollBar, and YSLib::Components::HorizontalScrollBar.

Definition at line 354 of file ycontrol.h.

void Control::OnTouch_Close ( TouchEventArgs &&  )

处理屏幕事件:关闭显示。

调用 Components::Close 。

Definition at line 243 of file ycontrol.cpp.

References YSLib::Components::Close().

Here is the call graph for this function:

Member Data Documentation

std::function<IWidget*(const KeyInput&)> YSLib::Components::Control::BoundControlPtr

按键-指针设备输入事件组映射。

Note
默认为 Control::GetBoundControlPtr 。

转换按键输入事件为指定部件的指针设备输入事件。

Definition at line 328 of file ycontrol.h.


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