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

下拉列表。 更多...

#include <ComboList.h>

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

Public 类型

typedef ListBox::ListType ListType
 
typedef ListBox::ViewArgs ViewArgs
 视图参数类型。
 
typedef ListBox::HViewEvent HViewEvent
 视图事件委托类型。
 
typedef
ystdex::subscriptive_iterator
< DropDownList, IWidget > 
Iterator
 

Public 成员函数

 DropDownList (const Rect &={}, const shared_ptr< ListType > &={})
 
 DropDownList (DropDownList &&)=default
 
 ~DropDownList () override
 析构:分离顶层子部件。
 
Iterator GetBegin ()
 
Iterator GetEnd ()
 
WidgetRange GetChildren () override
 
IWidget & operator[] (size_t idx) ynoexcept
 
size_t GetChildrenCount () const ynothrow
 
const ListType & GetList () const ynothrow
 
ListType & GetListRef () ynothrow
 
GEvent< void(HViewEvent::EventArgsType)> & GetViewChanged () ynothrow
 取视图变更事件。
 
GEvent< void(HIndexEvent::EventArgsType)> & GetSelected () ynothrow
 取项目选择状态变更事件。
 
GEvent< void(HIndexEvent::EventArgsType)> & GetConfirmed () ynothrow
 取项目选中确定事件。
 
void SetList (const shared_ptr< ListType > &_tempArgName)
 设置文本列表。
 
void AdjustViewForContent ()
 按内容大小依次调整列表视图中选中和首个项目的索引。
 
void Refresh (PaintEventArgs &&) override
 刷新:按指定参数绘制界面并更新状态。
 
- Public 成员函数 继承自 YSLib::UI::Button
 Button (const Rect &={}, const Drawing::Font &={}, TextAlignment=TextAlignment::Center)
 构造:使用指定边界、字体和文本对齐样式。
 
 Button (const Rect &, Drawing::Hue, const Drawing::Font &={}, TextAlignment=TextAlignment::Center)
 构造:使用指定边界、色调、字体和文本对齐样式。
 
 Button (Button &&)=default
 
- Public 成员函数 继承自 YSLib::UI::Thumb
 Thumb (const Rect &={}, Drawing::Hue=180)
 构造:使用指定边界和色调。
 
 Thumb (Thumb &&)=default
 
bool IsPressed () const ynothrow
 判断按钮当前是否处于按下状态。
 
- Public 成员函数 继承自 YSLib::UI::Control
 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
 取控制器。
 
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 成员函数 继承自 YSLib::UI::IWidget
virtual ~IWidget ()
 

Protected 属性

ListBox lbContent
 

Private 成员函数

void DetachTopWidget ()
 分离顶层子部件。
 

额外继承的成员函数

- Public 属性 继承自 YSLib::UI::Control
std::function< IWidget *(const
KeyInput &)> 
BoundControlPtr
 按键-指针设备输入事件组映射。
 
- Protected 成员函数 继承自 YSLib::UI::Thumb
 Thumb (const Rect &, NoBackgroundTag)
 无背景构造:使用指定边界。
 

详细描述

下拉列表。

注解
顶层容器不可转换至 Panel 时忽略列表。
自从
build 282

在文件 ComboList.h 第 188 行定义.

成员类型定义说明

视图事件委托类型。

参见
TextList::HViewEvent 。
自从
build 283

在文件 ComboList.h 第 203 行定义.

视图参数类型。

参见
TextList::ViewArgs 。
自从
build 283

在文件 ComboList.h 第 197 行定义.

构造及析构函数说明

YSLib::UI::DropDownList::DropDownList ( const Rect &  = {},
const shared_ptr< ListType > &  = {} 
)
explicit
自从
build 337
YSLib::UI::DropDownList::DropDownList ( DropDownList &&  )
inlinedefault
DropDownList::~DropDownList ( )
override

析构:分离顶层子部件。

自从
build 283

在文件 ComboList.cpp 第 205 行定义.

参考 DetachTopWidget().

函数调用图:

成员函数说明

void YSLib::UI::DropDownList::AdjustViewForContent ( )
inline

按内容大小依次调整列表视图中选中和首个项目的索引。

警告
若视图大小变化后不调用此方法调整视图,可能导致选择项越界而行为未定义。
参见
TextList::AdjustViewLength 。
自从
build 392

在文件 ComboList.h 第 257 行定义.

void DropDownList::DetachTopWidget ( )
private

分离顶层子部件。

自从
build 282

在文件 ComboList.cpp 第 211 行定义.

参考 YSL_BEGIN::Detach(),YSLib::UI::FetchContainerPtr() , 以及 lbContent.

参考自 ~DropDownList().

函数调用图:

这是这个函数的调用关系图:

Iterator YSLib::UI::DropDownList::GetBegin ( )
inline
自从
build 356

在文件 ComboList.h 第 223 行定义.

WidgetRange YSLib::UI::DropDownList::GetChildren ( )
inlineoverridevirtual
自从
build 357

重载 YSLib::UI::Widget .

在文件 ComboList.h 第 223 行定义.

size_t YSLib::UI::DropDownList::GetChildrenCount ( ) const
inline

在文件 ComboList.h 第 223 行定义.

GEvent<void( HIndexEvent ::EventArgsType)>& YSLib::UI::DropDownList::GetConfirmed ( )
inline

取项目选中确定事件。

自从
build 283

在文件 ComboList.h 第 243 行定义.

Iterator YSLib::UI::DropDownList::GetEnd ( )
inline

在文件 ComboList.h 第 223 行定义.

const ListType& YSLib::UI::DropDownList::GetList ( ) const
inline
自从
build 392

在文件 ComboList.h 第 226 行定义.

ListType& YSLib::UI::DropDownList::GetListRef ( )
inline
自从
build 392

在文件 ComboList.h 第 228 行定义.

GEvent<void( HIndexEvent ::EventArgsType)>& YSLib::UI::DropDownList::GetSelected ( )
inline

取项目选择状态变更事件。

自从
build 283

在文件 ComboList.h 第 238 行定义.

GEvent<void( HViewEvent ::EventArgsType)>& YSLib::UI::DropDownList::GetViewChanged ( )
inline

取视图变更事件。

自从
build 283

在文件 ComboList.h 第 233 行定义.

IWidget& YSLib::UI::DropDownList::operator[] ( size_t  idx)
inline

在文件 ComboList.h 第 223 行定义.

void DropDownList::Refresh ( PaintEventArgs &&  e)
overridevirtual
void YSLib::UI::DropDownList::SetList ( const shared_ptr< ListType > &  _tempArgName)
inline

设置文本列表。

自从
build 292

在文件 ComboList.h 第 249 行定义.

类成员变量说明

ListBox YSLib::UI::DropDownList::lbContent
protected
自从
build 391

在文件 ComboList.h 第 209 行定义.

参考自 DetachTopWidget() , 以及 Refresh().


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