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

下拉列表。 More...

#include <ComboList.h>

Inheritance diagram for YSLib::Components::DropDownList:
Collaboration diagram for YSLib::Components::DropDownList:

Public Types

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

Public Member Functions

 DropDownList (const Rect &={}, const shared_ptr< ListType > &={})
 
 DropDownList (DropDownList &&)=default
 
 ~DropDownList () override
 析构:分离顶层子部件。
 
Iterator GetBegin ()
 
Iterator GetEnd ()
 
WidgetRange GetChildren () override
 
IWidgetoperator[] (size_t idx) ynoexcept
 
size_t GetChildrenCount () const ynothrow
 
ListTypeGetList () const 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 Refresh (PaintEventArgs &&) override
 刷新:按指定参数绘制界面并更新状态。
 
- Public Member Functions inherited from YSLib::Components::Button
 Button (const Rect &={}, const Drawing::Font &={})
 构造:使用指定边界和字体。
 
 Button (Button &&)=default
 
- Public Member Functions inherited from YSLib::Components::Thumb
 Thumb (const Rect &={}, Drawing::Hue=180)
 构造:使用指定边界和色调。
 
 Thumb (Thumb &&)=default
 
bool IsPressed () const ynothrow
 判断按钮当前是否处于按下状态。
 
- Public Member Functions inherited from YSLib::Components::Control
 Control (const Rect &={})
 构造:使用指定边界,默认背景(同 Widget 默认构造)。
 
 Control (const Rect &, NoBackgroundTag)
 构造:使用指定边界,无背景。
 
 Control (const Control &)
 复制构造:除容器为空外深复制。
 
 Control (Control &&)=default
 
virtual IWidgetGetBoundControlPtr (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 RendererGetRenderer () const ynothrow
 取渲染器。
 
virtual ViewGetView () const ynothrow
 取部件视图。
 
virtual AControllerGetController () 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 Member Functions inherited from YSLib::Components::IWidget
virtual ~IWidget ()
 

Protected Attributes

ListBox boxList
 

Private Member Functions

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

Additional Inherited Members

- Public Attributes inherited from YSLib::Components::Control
std::function< IWidget *(const
KeyInput &)> 
BoundControlPtr
 按键-指针设备输入事件组映射。
 
- Protected Member Functions inherited from YSLib::Components::Thumb
 Thumb (const Rect &, NoBackgroundTag)
 无背景构造:使用指定边界。
 

Detailed Description

下拉列表。

Note
顶层容器不可转换至 Panel 时忽略列表。
Since
build 282

Definition at line 176 of file ComboList.h.

Member Typedef Documentation

视图事件委托类型。

See Also
TextList::HViewEvent
Since
build 283

Definition at line 191 of file ComboList.h.

视图参数类型。

See Also
TextList::ViewArgs
Since
build 283

Definition at line 185 of file ComboList.h.

Constructor & Destructor Documentation

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

析构:分离顶层子部件。

Since
build 283

Definition at line 202 of file ComboList.cpp.

References DetachTopWidget().

Here is the call graph for this function:

Member Function Documentation

void DropDownList::DetachTopWidget ( )
private

分离顶层子部件。

Since
build 282

Definition at line 208 of file ComboList.cpp.

References boxList, YSL_BEGIN::Detach(), and YSLib::Components::FetchContainerPtr().

Referenced by ~DropDownList().

Here is the call graph for this function:

Here is the caller graph for this function:

Iterator YSLib::Components::DropDownList::GetBegin ( )
inline
Since
build 356

Definition at line 210 of file ComboList.h.

WidgetRange YSLib::Components::DropDownList::GetChildren ( )
inlineoverridevirtual
Since
build 357

Reimplemented from YSLib::Components::Widget.

Definition at line 210 of file ComboList.h.

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

Definition at line 210 of file ComboList.h.

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

取项目选中确定事件。

Since
build 283

Definition at line 227 of file ComboList.h.

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

Definition at line 210 of file ComboList.h.

ListType& YSLib::Components::DropDownList::GetList ( ) const
inline

Definition at line 212 of file ComboList.h.

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

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

Since
build 283

Definition at line 222 of file ComboList.h.

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

取视图变更事件。

Since
build 283

Definition at line 217 of file ComboList.h.

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

Definition at line 210 of file ComboList.h.

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

设置文本列表。

Since
build 292

Definition at line 233 of file ComboList.h.

Member Data Documentation

ListBox YSLib::Components::DropDownList::boxList
protected

Definition at line 196 of file ComboList.h.

Referenced by DetachTopWidget(), and Refresh().


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