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

控件。 更多...

#include <ycontrol.h>

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

类

class  ControlEventMap
 扩展控件事件表。 更多...
 

Public 成员函数

 Control (const Rect &={})
 构造:使用指定边界,默认背景(同 Widget 默认构造)。
 
 Control (const Rect &, NoBackgroundTag)
 构造:使用指定边界,无背景。
 
 Control (const Control &)
 复制构造:除容器为空外深复制。
 
 Control (Control &&)=default
 
virtual IWidget * GetBoundControlPtr (const KeyInput &)
 取按键-指针设备输入默认事件组映射。
 
void OnTouch_Close (TouchEventArgs &&)
 处理屏幕事件:关闭显示。
 
- Public 成员函数 继承自 YSLib::UI::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 成员函数 继承自 YSLib::UI::IWidget
virtual ~IWidget ()
 

Public 属性

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

详细描述

控件。

自从
build 168

在文件 ycontrol.h 第 304 行定义.

构造及析构函数说明

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

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

参见
其它重载构造函数。
自从
build 337
YSLib::UI::Control::Control ( const Rect &  ,
NoBackgroundTag   
)

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

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

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

YSLib::UI::Control::Control ( Control &&  )
default

成员函数说明

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

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

被 YSLib::UI::VerticalScrollBar , 以及 YSLib::UI::HorizontalScrollBar 重载.

在文件 ycontrol.h 第 354 行定义.

void Control::OnTouch_Close ( TouchEventArgs &&  )

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

调用 UI::Close 。

在文件 ycontrol.cpp 第 244 行定义.

参考 YSLib::UI::Close().

函数调用图:

类成员变量说明

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

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

注解
默认为 Control::GetBoundControlPtr 。

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

在文件 ycontrol.h 第 328 行定义.


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