dl
dl::UI::ListBox类 参考

ui列表框 更多...

#include <dl_ui_list_box.h>

Public 成员函数

ListBoxClone ()
 
void Update ()
 
void Render ()
 
void SetItemCallback (std::function< void(Panel *item, Value v)> func)
 
template<typename T>
void SetItemData (std::vector< T > &vec)
 
bool IsPickup ()
 
bool IsSelectChange ()
 选中状态变更
 
size_t GetSelectIndex ()
 返回选中下标
 
Value GetSelect ()
 返回选中的数据
 
Value GetSelectClick ()
 返回单击选中的数据
 
Value GetSelectClickDouble ()
 返回双击选中的数据
 
size_t GetSelectIndexClickDouble ()
 返回双击选中下标
 
void SetOrder (float order)
 设置绘制顺序
 
void SetItemLocator (const Locator &loc)
 设置子元素的定位器
 
CoorGetCoor ()
 设置大小
 
ComponentsGetCpt ()
 
void SetScrollK (Float k)
 设置滚轮操作倍数
 
void SetBlankShow (bool show)
 设置没有的元素显示逻辑
 
void SetElementDataAnchor (const Position &anchor)
 
void SetElementDataPos (const Position &offset)
 
void SetElementDataRunAble (bool able)
 
PanelGetPanel ()
 
 ~ListBox ()
 

静态 Public 成员函数

static ListBoxCreate (Panel *item, size_t num)
 创建列表框
 

详细描述

ui列表框

在文件 dl_ui_list_box.h24 行定义.

构造及析构函数说明

◆ ~ListBox()

dl::UI::ListBox::~ListBox ( )

成员函数说明

◆ Clone()

ListBox * dl::UI::ListBox::Clone ( )

◆ Create()

static ListBox * dl::UI::ListBox::Create ( Panel * item,
size_t num )
static

创建列表框

参数
[in]panel元素模板
[in]num显示数量
注解
背景用于裁剪

◆ GetCoor()

Coor * dl::UI::ListBox::GetCoor ( )
inline

设置大小

在文件 dl_ui_list_box.h149 行定义.

◆ GetCpt()

Components * dl::UI::ListBox::GetCpt ( )
inline

在文件 dl_ui_list_box.h151 行定义.

◆ GetPanel()

Panel * dl::UI::ListBox::GetPanel ( )
inline

在文件 dl_ui_list_box.h176 行定义.

◆ GetSelect()

Value dl::UI::ListBox::GetSelect ( )
inline

返回选中的数据

在文件 dl_ui_list_box.h80 行定义.

◆ GetSelectClick()

Value dl::UI::ListBox::GetSelectClick ( )
inline

返回单击选中的数据

在文件 dl_ui_list_box.h90 行定义.

◆ GetSelectClickDouble()

Value dl::UI::ListBox::GetSelectClickDouble ( )
inline

返回双击选中的数据

在文件 dl_ui_list_box.h102 行定义.

◆ GetSelectIndex()

size_t dl::UI::ListBox::GetSelectIndex ( )
inline

返回选中下标

在文件 dl_ui_list_box.h73 行定义.

◆ GetSelectIndexClickDouble()

size_t dl::UI::ListBox::GetSelectIndexClickDouble ( )
inline

返回双击选中下标

在文件 dl_ui_list_box.h114 行定义.

◆ IsPickup()

bool dl::UI::ListBox::IsPickup ( )

◆ IsSelectChange()

bool dl::UI::ListBox::IsSelectChange ( )
inline

选中状态变更

返回值
-1表示未变更

在文件 dl_ui_list_box.h66 行定义.

◆ Render()

void dl::UI::ListBox::Render ( )
inline

在文件 dl_ui_list_box.h39 行定义.

◆ SetBlankShow()

void dl::UI::ListBox::SetBlankShow ( bool show)
inline

设置没有的元素显示逻辑

注解
例如 最大数量设为10,但只有4个元素。 当此变量设为false时,后面6个元素不会显示,这样避免显示背景。

在文件 dl_ui_list_box.h166 行定义.

◆ SetElementDataAnchor()

void dl::UI::ListBox::SetElementDataAnchor ( const Position & anchor)

◆ SetElementDataPos()

void dl::UI::ListBox::SetElementDataPos ( const Position & offset)

◆ SetElementDataRunAble()

void dl::UI::ListBox::SetElementDataRunAble ( bool able)
inline

在文件 dl_ui_list_box.h173 行定义.

◆ SetItemCallback()

void dl::UI::ListBox::SetItemCallback ( std::function< void(Panel *item, Value v)> func)
inline

在文件 dl_ui_list_box.h43 行定义.

◆ SetItemData()

template<typename T>
void dl::UI::ListBox::SetItemData ( std::vector< T > & vec)
inline

在文件 dl_ui_list_box.h49 行定义.

◆ SetItemLocator()

void dl::UI::ListBox::SetItemLocator ( const Locator & loc)
inline

设置子元素的定位器

在文件 dl_ui_list_box.h136 行定义.

◆ SetOrder()

void dl::UI::ListBox::SetOrder ( float order)
inline

设置绘制顺序

在文件 dl_ui_list_box.h125 行定义.

◆ SetScrollK()

void dl::UI::ListBox::SetScrollK ( Float k)
inline

设置滚轮操作倍数

返回值
越大就翻页越快

在文件 dl_ui_list_box.h157 行定义.

◆ Update()

void dl::UI::ListBox::Update ( )

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