YSTest
PreAlpha_b500_20140530
The YSLib Test Project
|
序列视图类模板。 更多...
#include <viewer.hpp>
Public 类型 | |
using | ContainerType = _tCon |
容器类型。 更多... | |
using | SizeType = typename _tCon::size_type |
项目索引类型。 更多... | |
using | DifferenceType = typename _tCon::difference_type |
项目索引差值类型。 更多... | |
Public 成员函数 | |
GSequenceViewer (ContainerType &con) | |
构造:使用指定容器。 更多... | |
PDefHOp (GSequenceViewer &,++,) ImplRet(IncreaseSelected(1)) PDefHOp(GSequenceViewer & | |
ImplRet (IncreaseSelected(-1)) PDefHOp(GSequenceViewer & | |
< 选中项目的索引自减。 更多... | |
int | ImplRet (IncreaseHead(1)) PDefHOp(GSequenceViewer & |
< 视图中首个项目的索引自增。 更多... | |
int int | ImplRet (IncreaseHead(-1)) DefPred(const ynothrow |
< 视图中首个项目的索引自减。 更多... | |
int int is_selected bool | Contains (SizeType i) const |
判断是否在有效范围内包含指定项目索引。 更多... | |
DefGetter (const ynothrow, SizeType, Total, p_con->size()) DefGetter(const ynothrow | |
length | DefGetter (const ynothrow, SizeType, HeadIndex, head) DefGetter(const ynothrow |
length selected | DefGetter (const ynothrow, DifferenceType, Offset, IsSelected()?GetSelectedIndex()-GetHeadIndex():-1) DefGetter(const ynothrow |
length selected | min (GetTotal()-GetHeadIndex(), GetLength())) void SetContainer(ContainerType &con) |
< 取当前视图中有效项目个数。 更多... | |
bool | SetHeadIndex (SizeType t) |
设置视图中首个项目的索引。 更多... | |
bool | SetLength (SizeType l) |
设置长度。 更多... | |
bool | SetSelectedIndex (SizeType t) |
设置选中项目的索引。 更多... | |
bool | AdjustForContent () |
按序列内容大小依次调整选中和首个项目的索引。 更多... | |
Public 属性 | |
int int | Selected |
SizeType | |
Length | |
length | SizeType |
length | SelectedIndex |
length selected | SizeType |
length selected | Valid |
Private 属性 | |
_tCon * | p_con |
序列容器指针。 更多... | |
SizeType | head |
视图中首个项目的索引,大于等于 GetTotal() 时无效。 更多... | |
SizeType | selected |
选中项目的索引,大于等于 GetTotal() 时无效。 更多... | |
SizeType | length |
视图长度:最大可视项目数。 更多... | |
bool | is_selected |
选中状态。 更多... | |
序列视图类模板。
在文件 viewer.hpp 第 46 行定义.
using YSLib::UI::GSequenceViewer< _tCon >::ContainerType = _tCon |
using YSLib::UI::GSequenceViewer< _tCon >::DifferenceType = typename _tCon::difference_type |
项目索引差值类型。
在文件 viewer.hpp 第 56 行定义.
using YSLib::UI::GSequenceViewer< _tCon >::SizeType = typename _tCon::size_type |
项目索引类型。
在文件 viewer.hpp 第 54 行定义.
|
inlineexplicit |
构造:使用指定容器。
GetHeadIndex() == 0 && GetSelectedIndex() == 0 && GetLength() == 1 && !IsSelected()
。 在文件 viewer.hpp 第 84 行定义.
|
inline |
按序列内容大小依次调整选中和首个项目的索引。
(GetTotal() == 0 && !IsSelected()) || (GetSelectedIndex() < GetTotal() && GetHeadIndex() < GetTotal())
。 在文件 viewer.hpp 第 191 行定义.
参考 platform_ex::Reset(), YSLib::UI::GSequenceViewer< _tCon >::selected , 以及 ytest::timing::total().
|
inline |
判断是否在有效范围内包含指定项目索引。
在文件 viewer.hpp 第 108 行定义.
YSLib::UI::GSequenceViewer< _tCon >::DefGetter | ( | const ynothrow | , |
SizeType | , | ||
Total | , | ||
p_con-> | size() | ||
) | const |
size | 取容器中项目个数。 |
length YSLib::UI::GSequenceViewer< _tCon >::DefGetter | ( | const ynothrow | , |
SizeType | , | ||
HeadIndex | , | ||
head | |||
) | const |
length selected YSLib::UI::GSequenceViewer< _tCon >::DefGetter | ( | const ynothrow | , |
DifferenceType | , | ||
Offset | , | ||
IsSelected()?GetSelectedIndex()-GetHeadIndex():- | 1 | ||
) | const |
1 | 取选中的项目相对于视图中首个项目的的索引偏移(未选中时为 -1 )。 |
YSLib::UI::GSequenceViewer< _tCon >::ImplRet | ( | IncreaseSelected(-1) | ) |
< 选中项目的索引自减。
int YSLib::UI::GSequenceViewer< _tCon >::ImplRet | ( | IncreaseHead(1) | ) |
< 视图中首个项目的索引自增。
int int YSLib::UI::GSequenceViewer< _tCon >::ImplRet | ( | IncreaseHead(-1) | ) | const |
< 视图中首个项目的索引自减。
判断是否为选中状态。
|
inline |
YSLib::UI::GSequenceViewer< _tCon >::PDefHOp | ( | GSequenceViewer< _tCon > & | , |
++ | |||
) |
|
inline |
设置视图中首个项目的索引。
在文件 viewer.hpp 第 140 行定义.
参考 YSLib::UI::GSequenceViewer< _tCon >::head , 以及 YSLib::UI::GSequenceViewer< _tCon >::length.
|
inline |
设置长度。
在文件 viewer.hpp 第 158 行定义.
参考 platform_ex::Windows::l , 以及 YSLib::UI::GSequenceViewer< _tCon >::length.
|
inline |
设置选中项目的索引。
在文件 viewer.hpp 第 171 行定义.
参考 YSLib::UI::GSequenceViewer< _tCon >::is_selected , 以及 YSLib::UI::GSequenceViewer< _tCon >::selected.
参考自 YSLib::UI::SelectFirst() , 以及 YSLib::UI::SelectLast().
|
private |
视图中首个项目的索引,大于等于 GetTotal() 时无效。
在文件 viewer.hpp 第 72 行定义.
|
private |
|
private |
视图长度:最大可视项目数。
在文件 viewer.hpp 第 74 行定义.
参考自 YSLib::UI::GSequenceViewer< _tCon >::SetHeadIndex() , 以及 YSLib::UI::GSequenceViewer< _tCon >::SetLength().
YSLib::UI::GSequenceViewer< _tCon >::Length |
在文件 viewer.hpp 第 116 行定义.
|
private |
|
private |
选中项目的索引,大于等于 GetTotal() 时无效。
在文件 viewer.hpp 第 73 行定义.
参考自 YSLib::UI::GSequenceViewer< _tCon >::AdjustForContent() , 以及 YSLib::UI::GSequenceViewer< _tCon >::SetSelectedIndex().
int int YSLib::UI::GSequenceViewer< _tCon >::Selected |
在文件 viewer.hpp 第 102 行定义.
length YSLib::UI::GSequenceViewer< _tCon >::SelectedIndex |
在文件 viewer.hpp 第 118 行定义.
YSLib::UI::GSequenceViewer< _tCon >::SizeType |
在文件 viewer.hpp 第 116 行定义.
length YSLib::UI::GSequenceViewer< _tCon >::SizeType |
在文件 viewer.hpp 第 118 行定义.
length selected YSLib::UI::GSequenceViewer< _tCon >::SizeType |
在文件 viewer.hpp 第 122 行定义.
length selected YSLib::UI::GSequenceViewer< _tCon >::Valid |
在文件 viewer.hpp 第 122 行定义.