dl
dl::Cpt 命名空间参考

子组件命名空间 更多...

class  Drag
 拖拽组件 更多...
 
class  ElementData
 元素通用属性(默认左上对齐,便于理解) 更多...
 
class  Function
 由于this指针在构造完成之前无效,不能在初始化列表构造 更多...
 
class  Lang
 语言本地化 更多...
 
class  Variable
 变量,注意模板参数 需要实例化后不重复 更多...
 

类型定义

using IsPickup = Function<std::function<bool()>, str_uid("IsPickup")>
 ---------------------------—具体组件----------------------------------—
 
using IsSelect = Function<std::function<bool()>, str_uid("IsSelect")>
 选择
 
using IsClick = Function<std::function<bool()>, str_uid("IsClick")>
 点击
 
using IsDown = Function<std::function<bool()>, str_uid("IsDown")>
 按下状态
 
using GetCoor = Function<std::function<dl::Coor* ()>, str_uid("GetCoor")>
 返回坐标系
 
using GetOrder = Function<std::function<float()>, str_uid("GetOrder")>
 返回order
 
using Update = Function<std::function<void()>, str_uid("Update")>
 逻辑
 
using Render = Function<std::function<void()>, str_uid("Render")>
 绘制
 
using SetOrder = Function<std::function<void(float)>, str_uid("SetOrder")>
 设置order
 
using SetSelect = Function<std::function<void(bool)>, str_uid("SetSelect")>
 设置是否选择
 
using DeleteThis = Function<std::function<void()>, str_uid("DeleteThis")>
 删除自身
 
using Clone = Function<std::function<Components* ()>, str_uid("Clone")>
 克隆
 
using RenderDebug = Function<std::function<void()>, str_uid("RenderD")>
 调试绘图
 
using SetSize = Function<std::function<void(const Position& size)>, str_uid("SetSize")>
 设置大小
 
using GetSize = Function<std::function<Position(void)>, str_uid("GetSize")>
 获取大小
 
using CustomTag = Variable<int, str_uid("CustomTag")>
 
using CustomName = Variable<std::string, str_uid("CustomName")>
 

函数

template<typename T>
std::vector< T * > GetComp (std::vector< Components * > &vec)
 从vector<Components*>返回指定类型的所有组件
 
template<typename T>
TGetFirst (std::vector< Components * > &vec)
 从vector<Components*>返回指定类型的第一个元素
 
template<typename T>
TGetN (std::vector< Components * > &vec, size_t n)
 从vector<Components*>返回指定类型的第n个元素
 

详细描述

子组件命名空间

类型定义说明

◆ Clone

using dl::Cpt::Clone = Function<std::function<Components* ()>, str_uid("Clone")>

克隆

在文件 dl_component_use.h34 行定义.

◆ CustomName

using dl::Cpt::CustomName = Variable<std::string, str_uid("CustomName")>

在文件 dl_component_use.h39 行定义.

◆ CustomTag

using dl::Cpt::CustomTag = Variable<int, str_uid("CustomTag")>

在文件 dl_component_use.h38 行定义.

◆ DeleteThis

using dl::Cpt::DeleteThis = Function<std::function<void()>, str_uid("DeleteThis")>

删除自身

在文件 dl_component_use.h33 行定义.

◆ GetCoor

using dl::Cpt::GetCoor = Function<std::function<dl::Coor* ()>, str_uid("GetCoor")>

返回坐标系

在文件 dl_component_use.h27 行定义.

◆ GetOrder

using dl::Cpt::GetOrder = Function<std::function<float()>, str_uid("GetOrder")>

返回order

在文件 dl_component_use.h28 行定义.

◆ GetSize

using dl::Cpt::GetSize = Function<std::function<Position(void)>, str_uid("GetSize")>

获取大小

在文件 dl_component_use.h37 行定义.

◆ IsClick

using dl::Cpt::IsClick = Function<std::function<bool()>, str_uid("IsClick")>

点击

在文件 dl_component_use.h25 行定义.

◆ IsDown

using dl::Cpt::IsDown = Function<std::function<bool()>, str_uid("IsDown")>

按下状态

在文件 dl_component_use.h26 行定义.

◆ IsPickup

using dl::Cpt::IsPickup = Function<std::function<bool()>, str_uid("IsPickup")>

---------------------------—具体组件----------------------------------—

拾取

在文件 dl_component_use.h23 行定义.

◆ IsSelect

using dl::Cpt::IsSelect = Function<std::function<bool()>, str_uid("IsSelect")>

选择

在文件 dl_component_use.h24 行定义.

◆ Render

using dl::Cpt::Render = Function<std::function<void()>, str_uid("Render")>

绘制

在文件 dl_component_use.h30 行定义.

◆ RenderDebug

using dl::Cpt::RenderDebug = Function<std::function<void()>, str_uid("RenderD")>

调试绘图

在文件 dl_component_use.h35 行定义.

◆ SetOrder

using dl::Cpt::SetOrder = Function<std::function<void(float)>, str_uid("SetOrder")>

设置order

在文件 dl_component_use.h31 行定义.

◆ SetSelect

using dl::Cpt::SetSelect = Function<std::function<void(bool)>, str_uid("SetSelect")>

设置是否选择

在文件 dl_component_use.h32 行定义.

◆ SetSize

using dl::Cpt::SetSize = Function<std::function<void(const Position& size)>, str_uid("SetSize")>

设置大小

在文件 dl_component_use.h36 行定义.

◆ Update

using dl::Cpt::Update = Function<std::function<void()>, str_uid("Update")>

逻辑

在文件 dl_component_use.h29 行定义.

函数说明

◆ GetComp()

template<typename T>
std::vector< T * > dl::Cpt::GetComp ( std::vector< Components * > & vec)

从vector<Components*>返回指定类型的所有组件

在文件 dl_component.h295 行定义.

◆ GetFirst()

template<typename T>
T * dl::Cpt::GetFirst ( std::vector< Components * > & vec)

从vector<Components*>返回指定类型的第一个元素

在文件 dl_component.h311 行定义.

◆ GetN()

template<typename T>
T * dl::Cpt::GetN ( std::vector< Components * > & vec,
size_t n )

从vector<Components*>返回指定类型的第n个元素

在文件 dl_component.h325 行定义.