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

带滚动条的文本列表框。 更多...

#include <ComboList.h>

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

Public 类型

using ListType = TextList::ListType
 
using ViewArgs = TextList::ViewArgs
 
using HViewEvent = TextList::HViewEvent
 
using IndexType = TextList::IndexType
 
using ItemType = TextList::ItemType
 
using iterator = ystdex::subscriptive_iterator< ListBox, IWidget >
 
- Public 类型 继承自 YSLib::UI::ScrollableContainer
using iterator = ystdex::subscriptive_iterator< ScrollableContainer, IWidget >
 

Public 成员函数

 ListBox (const Rect &={}, const shared_ptr< ListType > &={})
 
 DefDeMoveCtor (ListBox) DefWidgetMemberIterationBase(ScrollableContainer
 
tlContent DefPredMem (const ynothrow, Selected, tlContent) PDefH(bool
 
tlContent ListType::size_type i ImplBodyMem (tlContent, Contains, i) DefGetterMem(const ynothrow
 
tlContent ListType::size_type
i tlContent 
DefGetterMem (const ynothrow, ListType::size_type, SelectedIndex, tlContent) DefGetterMem(const ynothrow
 
tlContent ListType::size_type
i tlContent const ListType
tlContent 
DefGetterMem (ynothrow, ListType &, ListRef, tlContent) DefEventGetter(ynothrow
 
tlContent ListType::size_type
i tlContent const ListType
tlContent tlContent
ViewChanged 
DefEventGetter (ynothrow, HIndexEvent, Selected, tlContent.Selected) DefEventGetter(ynothrow
 < 视图变更事件。 更多...
 
tlContent ListType::size_type
i tlContent const ListType
tlContent tlContent
ViewChanged tlContent
Confirmed 
DefSetterMem (const shared_ptr< ListType > &, List, tlContent) PDefH(void
 < 项目选中确定事件。 更多...
 
tlContent ListType::size_type
i tlContent const ListType
tlContent tlContent
ViewChanged tlContent
Confirmed ListType::size_type
ImplBodyMem (tlContent, SetSelected, i) PDefH(void
 按内容大小依次调整列表视图中选中和首个项目的索引。 更多...
 
tlContent ListType::size_type
i tlContent const ListType
tlContent tlContent
ViewChanged tlContent
Confirmed ListType::size_type
ImplBodyMem (tlContent, AdjustViewForContent,) PDefH(void
 调整视图长度。 更多...
 
tlContent ListType::size_type
i tlContent const ListType
tlContent tlContent
ViewChanged tlContent
Confirmed ListType::size_type
ImplBodyMem (tlContent, AdjustViewLength,) PDefH(void
 清除选中项。 更多...
 
tlContent ListType::size_type
i tlContent const ListType
tlContent tlContent
ViewChanged tlContent
Confirmed ListType::size_type
ImplBodyMem (tlContent, ClearSelected,) PDefH(IndexType
 查找项。 更多...
 
tlContent ListType::size_type
i tlContent const ListType
tlContent tlContent
ViewChanged tlContent
Confirmed ListType::size_type
i const ItemType &text 
ImplBodyMem (tlContent, Find, text) PDefH(void
 
tlContent ListType::size_type
i tlContent const ListType
tlContent tlContent
ViewChanged tlContent
Confirmed ListType::size_type
i const ItemType &text 
ImplBodyMem (tlContent, ResetView,) void ResizeForPreferred(const Size &sup
 按指定大小上限和内容调整大小。 更多...
 
- Public 成员函数 继承自 YSLib::UI::ScrollableContainer
 ScrollableContainer (const Rect &={})
 
 DefDeMoveCtor (ScrollableContainer) DefWidgetMemberIteration(hsbHorizontal
 
- Public 成员函数 继承自 YSLib::UI::Widget
 Widget (const Rect &={})
 
 Widget (const Rect &, HBrush, 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 &)
 复制构造:除容器指针为空外深复制。 更多...
 
 DefDelMoveCtor (Widget) virtual ~Widget()
 since build 428 更多...
 
 ImplI (IWidget) DefGetter(override
 
 WidgetRange ()) static HBrush MakeBlankBrush()
 取空白画刷。 更多...
 
 ImplI (IWidget) DefGetter(const override
 
AController *controller_ptr DefGetterMem (const ynothrow, SDst, Height, GetView()) ImplI(IWidget) DefGetter(const override
 
AController *controller_ptr
Renderer *renderer_ptr 
ImplI (IWidget) DefGetter(const override
 
AController *controller_ptr
Renderer *renderer_ptr View
*view_ptr 
DefGetterMem (const ynothrow, SDst, Width, GetView()) DefGetterMem(const ynothrow
 
AController *controller_ptr
Renderer *renderer_ptr View
*view_ptr 
GetView ()) DefGetterMem(const ynothrow
 
AController *controller_ptr
Renderer *renderer_ptr View
*view_ptr 
GetView ()) DefSetterMem(SDst
 
AController *controller_ptr
Renderer *renderer_ptr View
*view_ptr 
GetView ()) DefSetterMem(SDst
 
AController *controller_ptr
Renderer *renderer_ptr View
*view_ptr 
GetView ()) DefSetterMem(SDst
 
AController *controller_ptr
Renderer *renderer_ptr View
*view_ptr 
GetView ()) DefSetterMem(SDst
 
AController *controller_ptr
Renderer *renderer_ptr View
*view_ptr 
GetView ()) void SetRenderer(unique_ptr< Renderer >)
 设置渲染器为指定指针指向的对象,同时更新渲染器状态。 更多...
 
void SetView (unique_ptr< View > &&)
 设置渲染器为指定指针指向的对象,同时更新渲染器状态。 更多...
 
virtual void Refresh (PaintEventArgs &&)
 刷新:按指定参数绘制界面并更新状态。 更多...
 

Public 属性

tlContent Contains
 
tlContent ListType::size_type i HeadIndex
 
tlContent ListType::size_type
i tlContent const ListType 
List
 
tlContent ListType::size_type
i tlContent const ListType
tlContent 
HViewEvent
 
tlContent ListType::size_type
i tlContent const ListType
tlContent 
ViewChanged
 
tlContent ListType::size_type
i tlContent const ListType
tlContent tlContent
ViewChanged 
HIndexEvent
 
tlContent ListType::size_type
i tlContent const ListType
tlContent tlContent
ViewChanged 
Confirmed
 
tlContent ListType::size_type
i tlContent const ListType
tlContent tlContent
ViewChanged tlContent
Confirmed 
SetSelected
 
tlContent ListType::size_type
i tlContent const ListType
tlContent tlContent
ViewChanged tlContent
Confirmed ListType::size_type
AdjustViewForContent
 
tlContent ListType::size_type
i tlContent const ListType
tlContent tlContent
ViewChanged tlContent
Confirmed ListType::size_type
AdjustViewLength
 
tlContent ListType::size_type
i tlContent const ListType
tlContent tlContent
ViewChanged tlContent
Confirmed ListType::size_type
ClearSelected
 
tlContent ListType::size_type
i tlContent const ListType
tlContent tlContent
ViewChanged tlContent
Confirmed ListType::size_type
Find
 
tlContent ListType::size_type
i tlContent const ListType
tlContent tlContent
ViewChanged tlContent
Confirmed ListType::size_type
i const ItemType &text 
ResetView
 
tlContent ListType::size_type
i tlContent const ListType
tlContent tlContent
ViewChanged tlContent
Confirmed ListType::size_type
i const ItemType &text Size 
s = {})
 
- Public 属性 继承自 YSLib::UI::Widget
HBrush Background
 背景。 更多...
 
Color ForeColor = Drawing::ColorSpace::Black
 默认前景色。 更多...
 
 WidgetRange
 
 Children
 
AController Controller
 
AController *controller_ptr
Renderer 
Renderer
 
AController *controller_ptr
Renderer *renderer_ptr View 
View
 
AController *controller_ptr
Renderer *renderer_ptr View
*view_ptr 
SPos
 
AController *controller_ptr
Renderer *renderer_ptr View
*view_ptr 
X
 
AController *controller_ptr
Renderer *renderer_ptr View
*view_ptr 
Y
 
AController *controller_ptr
Renderer *renderer_ptr View
*view_ptr 
Height
 
AController *controller_ptr
Renderer *renderer_ptr View
*view_ptr 
Width
 

Protected 属性

TextList tlContent
 
- Protected 属性 继承自 YSLib::UI::ScrollableContainer
HorizontalScrollBar hsbHorizontal
 控制水平可视区域的水平滚动条。 更多...
 
VerticalScrollBar vsbVertical
 控制竖直可视区域的竖直滚动条。 更多...
 
- Protected 属性 继承自 YSLib::UI::Control
 GetBoundControlPtr
 

额外继承的成员函数

- Protected 成员函数 继承自 YSLib::UI::ScrollableContainer
Size FixLayout (const Size &)
 固定布局。 更多...
 
- Protected 成员函数 继承自 YSLib::UI::Control
 Control (const Rect &, HBrush, Drawing::Color=Drawing::ColorSpace::Black)
 构造:使用指定边界、背景画刷和前景色。 更多...
 
 Control (const Control &)
 复制构造:除容器为空外深复制。 更多...
 
 DefDeMoveCtor (Control) virtual PDefH(IWidget *
 取按键-指针设备输入默认事件组映射。 更多...
 
const KeyInput & ImplRet (nullptr) void OnTouch_Close(CursorEventArgs &&)
 处理屏幕事件:关闭显示。 更多...
 

详细描述

带滚动条的文本列表框。

自从
build 205
待办事项:
实现 Resize 事件调整内容布局。

在文件 ComboList.h48 行定义.

成员类型定义说明

using YSLib::UI::ListBox::HViewEvent = TextList::HViewEvent

在文件 ComboList.h53 行定义.

using YSLib::UI::ListBox::IndexType = TextList::IndexType
自从
build 316

在文件 ComboList.h55 行定义.

using YSLib::UI::ListBox::ItemType = TextList::ItemType
自从
build 316

在文件 ComboList.h57 行定义.

自从
build 460

在文件 ComboList.h59 行定义.

using YSLib::UI::ListBox::ListType = TextList::ListType

在文件 ComboList.h51 行定义.

using YSLib::UI::ListBox::ViewArgs = TextList::ViewArgs

在文件 ComboList.h52 行定义.

构造及析构函数说明

YSLib::UI::ListBox::ListBox ( const Rect r = {},
const shared_ptr< ListType > &  h = {} 
)
explicit

成员函数说明

YSLib::UI::ListBox::DefDeMoveCtor ( ListBox  )
自从
build 357
tlContent ListType::size_type i tlContent const ListType tlContent tlContent ViewChanged YSLib::UI::ListBox::DefEventGetter ( ynothrow  ,
HIndexEvent  ,
Selected  ,
tlContent.  Selected 
)

< 视图变更事件。

参数
Selected项目选择状态变更事件。
tlContent ListType::size_type i tlContent YSLib::UI::ListBox::DefGetterMem ( const ynothrow  ,
ListType::size_type  ,
SelectedIndex  ,
tlContent   
) const
自从
build 392
tlContent ListType::size_type i tlContent const ListType tlContent YSLib::UI::ListBox::DefGetterMem ( ynothrow  ,
ListType ,
ListRef  ,
tlContent   
)
自从
build 392
tlContent YSLib::UI::ListBox::DefPredMem ( const ynothrow  ,
Selected  ,
tlContent   
)
tlContent ListType::size_type i tlContent const ListType tlContent tlContent ViewChanged tlContent Confirmed YSLib::UI::ListBox::DefSetterMem ( const shared_ptr< ListType > &  ,
List  ,
tlContent   
)

< 项目选中确定事件。

设置文本列表。

自从
build 292

设置选中项。

参见
TextList::SetSelected
自从
build 285。
tlContent ListType::size_type i YSLib::UI::ListBox::ImplBodyMem ( tlContent  ,
Contains  ,
 
) const
tlContent ListType::size_type i tlContent const ListType tlContent tlContent ViewChanged tlContent Confirmed ListType::size_type i YSLib::UI::ListBox::ImplBodyMem ( tlContent  ,
SetSelected  ,
 
)

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

警告
若视图大小变化后不调用此方法调整视图,可能导致选择项越界而行为未定义。
参见
TextList::AdjustViewLength
自从
build 392
tlContent ListType::size_type i tlContent const ListType tlContent tlContent ViewChanged tlContent Confirmed ListType::size_type i YSLib::UI::ListBox::ImplBodyMem ( tlContent  ,
AdjustViewForContent   
)

调整视图长度。

参见
TextList::AdjustViewLength
自从
build 285
tlContent ListType::size_type i tlContent const ListType tlContent tlContent ViewChanged tlContent Confirmed ListType::size_type i YSLib::UI::ListBox::ImplBodyMem ( tlContent  ,
AdjustViewLength   
)

清除选中项。

参见
TextList::ClearSelected
自从
build 285
tlContent ListType::size_type i tlContent const ListType tlContent tlContent ViewChanged tlContent Confirmed ListType::size_type i YSLib::UI::ListBox::ImplBodyMem ( tlContent  ,
ClearSelected   
)

查找项。

参见
TextList::Find
自从
build 316
tlContent ListType::size_type i tlContent const ListType tlContent tlContent ViewChanged tlContent Confirmed ListType::size_type i const ItemType& text YSLib::UI::ListBox::ImplBodyMem ( tlContent  ,
Find  ,
text   
)
tlContent ListType::size_type i tlContent const ListType tlContent tlContent ViewChanged tlContent Confirmed ListType::size_type i const ItemType& text YSLib::UI::ListBox::ImplBodyMem ( tlContent  ,
ResetView   
) const

按指定大小上限和内容调整大小。

参数
sup指定调整的大小的上限,当为 Size() 时忽略大小限制。
s指定大小,分量为 0 时对应分量大小由内容确定(其中宽度含边距)。
自从
build 337

类成员变量说明

tlContent ListType::size_type i tlContent const ListType tlContent tlContent ViewChanged tlContent Confirmed ListType::size_type i YSLib::UI::ListBox::AdjustViewForContent

在文件 ComboList.h114 行定义.

tlContent ListType::size_type i tlContent const ListType tlContent tlContent ViewChanged tlContent Confirmed ListType::size_type i YSLib::UI::ListBox::AdjustViewLength

在文件 ComboList.h122 行定义.

tlContent ListType::size_type i tlContent const ListType tlContent tlContent ViewChanged tlContent Confirmed ListType::size_type i YSLib::UI::ListBox::ClearSelected

在文件 ComboList.h130 行定义.

tlContent ListType::size_type i tlContent const ListType tlContent tlContent ViewChanged YSLib::UI::ListBox::Confirmed

在文件 ComboList.h92 行定义.

tlContent YSLib::UI::ListBox::Contains

在文件 ComboList.h78 行定义.

参考自 YSLib::UI::FileBox::FileBox().

tlContent ListType::size_type i tlContent const ListType tlContent tlContent ViewChanged tlContent Confirmed ListType::size_type i YSLib::UI::ListBox::Find

在文件 ComboList.h138 行定义.

tlContent ListType::size_type i YSLib::UI::ListBox::HeadIndex

在文件 ComboList.h81 行定义.

tlContent ListType::size_type i tlContent const ListType tlContent tlContent ViewChanged YSLib::UI::ListBox::HIndexEvent

在文件 ComboList.h92 行定义.

在文件 ComboList.h88 行定义.

tlContent ListType::size_type i tlContent const ListType YSLib::UI::ListBox::List

在文件 ComboList.h85 行定义.

tlContent ListType::size_type i tlContent const ListType tlContent tlContent ViewChanged tlContent Confirmed ListType::size_type i const ItemType& text YSLib::UI::ListBox::ResetView

在文件 ComboList.h141 行定义.

参考自 YSLib::UI::FileBox::FileBox().

tlContent ListType::size_type i tlContent const ListType tlContent tlContent ViewChanged tlContent Confirmed ListType::size_type i const ItemType& text Size YSLib::UI::ListBox::s = {})

在文件 ComboList.h151 行定义.

tlContent ListType::size_type i tlContent const ListType tlContent tlContent ViewChanged tlContent Confirmed YSLib::UI::ListBox::SetSelected

在文件 ComboList.h105 行定义.

TextList YSLib::UI::ListBox::tlContent
protected

在文件 ComboList.h66 行定义.

参考自 ListBox().

tlContent ListType::size_type i tlContent const ListType tlContent YSLib::UI::ListBox::ViewChanged

在文件 ComboList.h88 行定义.


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