|
YSTest
PreAlpha_b400_20130424
The YSLib Test Project
|
助手功能。 更多...
|
模块 | |
| Get Unique Pointer | |
| 使用指定类型指针构造 std::unique_ptr 实例。 | |
| Get Shared Pointer | |
| 使用指定类型指针构造 std::shared_ptr 实例。 | |
函数 | |
| template<bool _bIsPositive, typename _tScalar > | |
| _tScalar & | ystdex::xcrease (_tScalar &_x) |
| 编译期选择自增/自减运算。 | |
| template<bool _bIsPositive, typename _tScalar1 , typename _tScalar2 > | |
| _tScalar1 & | ystdex::delta_assign (_tScalar1 &_x, _tScalar2 &_y) |
| 编译期选择加法/减法复合赋值运算。 | |
| template<typename _tIterator1 , typename _tIterator2 > | |
| auto | ystdex::make_move_iterator_pair (_tIterator1 it1, _tIterator2 it2) -> decltype(std::make_pair(std::make_move_iterator(it1), std::make_move_iterator(it2))) |
| 取转移迭代器对。 | |
| template<typename _tRange > | |
| auto | ystdex::make_move_iterator_pair (_tRange &c) -> decltype(ystdex::make_move_iterator_pair(begin(c), end(c))) |
| 取指定序列范围(包含序列容器及内建数组等)的转移迭代器对。 | |
| template<typename _tIterator , typename _fTransformer > | |
| transformed_iterator< typename array_ref_decay< _tIterator > ::type, _fTransformer > | ystdex::make_transform (_tIterator &&i, _fTransformer &&f) |
| 创建转换迭代器。 | |
| template<typename _type , typename... _tParams> | |
| std::unique_ptr< _type > | ystdex::make_unique (_tParams &&...args) |
| 使用 new 和指定参数构造指定类型的 std::unique_ptr 实例。 | |
| template<typename _type , typename... _tParams> | |
| std::shared_ptr< _type > | ystdex::make_shared (_tParams &&...args) |
| 使用 new 和指定参数构造指定类型的 std::shared_ptr 实例。 | |
| template<typename _type > | |
| decay< _type >::type | ystdex::decay_copy (_type &&arg) |
| 退化复制。 | |
| template<typename _type > | |
| qualified_decay< _type >::type | ystdex::decay_forward (_type &&arg) |
| 退化传递。 | |
| Drawing::FontCache & | FetchDefaultFontCache () ynothrow |
| 取默认字体缓存。 | |
| shared_ptr< Shell > | YSLib::FetchShellHandle () ynothrow |
| 取当前应用程序线程空间中活动的 Shell 句柄。 | |
| bool | YSLib::Activate (const shared_ptr< Shell > &hShl) |
| 激活 Shell 对象:控制权转移给此对象以维持单线程运行。 | |
| template<typename _type > | |
| ValueObject | YSLib::MakeValueObjectByPtr (_type *p) |
| 使用指针构造 ValueObject 实例。 | |
| template<VisualEvent _vID> | |
| GEvent< void(typename EventTypeMapping< _vID > ::HandlerType::EventArgsType)> & | YSLib::UI::FetchEvent (VisualEventMap &m) |
| 取控件事件。 | |
| template<VisualEvent _vID> | |
| GEvent< void(typename EventTypeMapping< _vID > ::HandlerType::EventArgsType)> & | YSLib::UI::FetchEvent (AController &controller) |
| 取部件事件。 | |
| template<VisualEvent _vID> | |
| GEvent< void(typename EventTypeMapping< _vID > ::HandlerType::EventArgsType)> & | YSLib::UI::FetchEvent (IWidget &wgt) |
| 取部件事件。 | |
| void | YSLib::UI::RequestFocus (IWidget &wgt) |
| 向部件容器释放获得焦点,成功后向自身发送 GotFocus 事件。 | |
| void | YSLib::UI::ReleaseFocus (IWidget &wgt) |
| 释放焦点,成功后向自身发送 LostFocus 事件。 | |
| IWidget * | YSLib::UI::FetchContainerPtr (const IWidget &wgt) |
| 取部件的容器指针。 | |
| IWidget * | YSLib::UI::FetchFocusingPtr (IWidget &wgt) |
| 取焦点对象指针。 | |
| const Point & | YSLib::UI::GetLocationOf (const IWidget &wgt) |
| 取部件位置。 | |
| const Size & | YSLib::UI::GetSizeOf (const IWidget &wgt) |
| 取部件大小。 | |
| template<typename _type , size_t _vN> | |
| size_t | ystdex::arrlen (_type(&)[_vN]) |
| 计算指定数组类型对象的长度。 | |
| template<typename _type , size_t _vN> | |
| size_t | ystdex::arrlen (_type(&&)[_vN]) |
| template<class _type , class _tHandle > | |
| _type & | HandleToReference (_tHandle h) ythrow(std |
| 句柄转换:对象引用。 | |
| template<class _tShell > | |
| _tShell & | FetchShell () |
| 取指定 Shell 句柄对应的 Shell 引用 。 | |
| template<class _tShl > | |
| shared_ptr< Shell > | FetchStored () |
| 取全局 Shell 句柄。 | |
| template<class _tShl > | |
| void | ReleaseStored () |
| 释放全局 Shell 。 | |
| bool | IsNowShell (const shared_ptr< Shell > &hShl) |
| 判断句柄指定的 Shell 是否为当前线程空间中运行的 Shell 。 | |
| errno_t | NowShellTo (const shared_ptr< Shell > &hShl) |
| 向句柄指定的 Shell 对象转移线程控制权。 | |
| template<class _tShl > | |
| errno_t | NowShellToNew () |
| 向新建 Shell 对象转移控制权。 | |
| template<class _tShl > | |
| errno_t | NowShellToStored () |
| 向全局 Shell 管理器的对象转移控制权。 | |
| void | SetShellTo (const shared_ptr< Shell > &hShl, Messaging::Priority prior=0x80) |
| 通过主消息队列向指定 Shell 对象转移控制权。 | |
| template<class _tShl > | |
| void | SetShellToNew () |
| 通过主消息队列向新建 Shell 对象转移控制权。 | |
| template<class _tShl > | |
| void | SetShellToStored () |
| 通过主消息队列向全局 Shell 管理器内的对象转移控制权。 | |
| template<class _tShl > | |
| void | CallStoredAtOnce () |
| 封装向全局 Shell 管理器内的对象转移控制权。 | |
| template<class _tShl > | |
| void | CallStored () |
| 封装通过消息队列向全局 Shell 管理器内的对象转移控制权。 | |
| void | ResetDesktop (Desktop &dsk, Devices::Screen &scr) |
| 复位桌面。 | |
| Color | GenerateRandomColor () |
| template<typename _tOut , typename _tGen > | |
| void | ScrDraw (_tOut buf, _tGen &&f) |
| 全屏幕描点。 | |
| shared_ptr< Image > | CreateSharedScreenImage (ConstBitmapPtr p) |
| 新建屏幕图像。 | |
| template<typename _tPixel > | |
| _tPixel * | CreateRawBitmap (const _tPixel *s, size_t n) |
| 使用 new 分配空间并复制无压缩位图。 | |
| YF_API void | RemoveGlobalTasks () |
| 从全局消息队列中移除所有后台消息。 | |
| yconstexpr const char * | DefaultTimeFormat ("%04u-%02u-%02u %02u:%02u:%02u") |
| 默认时间格式字符串。 | |
| YF_API const char * | TranslateTime (const std::tm &, const char *=DefaultTimeFormat) |
| 格式化时间字符串。 | |
| YF_API const char * | TranslateTime (const std::time_t &, const char *=DefaultTimeFormat) ythrow(GeneralEvent) |
| auto | YSLib::begin (ValueNode &node) -> decltype(node.GetBegin()) |
| 迭代器包装,用于 range-based for 。 | |
| auto | YSLib::begin (const ValueNode &node) -> decltype(node.GetBegin()) |
| auto | YSLib::end (ValueNode &node) -> decltype(node.GetEnd()) |
| auto | YSLib::end (const ValueNode &node) -> decltype(node.GetEnd()) |
助手功能。
仅帮助简化编码形式或确定接口,并不包含编译期之后逻辑功能实现的代码设施。
|
inline |
激活 Shell 对象:控制权转移给此对象以维持单线程运行。
bool(hShl) 。 参考 FetchAppInstance(),h , 以及 YAssert.
参考自 YSLib::UI::Console::Console(),Execute(),YSL_BEGIN::Init(),NowShellTo(),ShlTextReader::OnKeyDown() , 以及 YSLib::UI::InputTimer::Refresh().


|
inline |
计算指定数组类型对象的长度。
在文件 utility.hpp 第 142 行定义.
参考自 FetchEncodingString() , 以及 ShlTextReader::SettingSession::SettingSession().

|
inline |
在文件 utility.hpp 第 148 行定义.
|
inline |
迭代器包装,用于 range-based for 。
在文件 ValueNode.h 第 184 行定义.
参考 YSLib::ValueNode::GetBegin().
参考自 ystdex::erase_all(),ystdex::erase_all_if(),YSLib::IO::Path::GetRelativePath(),ystdex::make_move_iterator_pair(),YSLib::Messaging::MessageQueue::Peek(),YSLib::Messaging::MessageQueue::Pop() , 以及 ystdex::split().


|
inline |
|
inline |
|
inline |
| _tPixel* CreateRawBitmap | ( | const _tPixel * | s, |
| size_t | n | ||
| ) |
|
inline |
| decay<_type>::type ystdex::decay_copy | ( | _type && | arg | ) |
退化复制。
在文件 utility.hpp 第 114 行定义.
参考自 ystdex::make_array(),YSLib::MakeNode() , 以及 YSLib::UnpackToNode().

| qualified_decay<_type>::type ystdex::decay_forward | ( | _type && | arg | ) |
退化传递。
在文件 utility.hpp 第 128 行定义.
参考自 ystdex::seq_apply() , 以及 ystdex::unseq_apply().

| yconstexpr const char* DefaultTimeFormat | ( | "%04u-%02u-%02u %02u:%02u:%02u" | ) |
默认时间格式字符串。
|
inline |
|
inline |
在文件 ValueNode.h 第 195 行定义.
参考 YSLib::ValueNode::GetEnd().
参考自 ystdex::at(),Delay(),ystdex::erase_all(),ystdex::erase_all_if(),YSLib::IO::Path::GetFilename(),YSLib::IO::Path::GetParentPath(),ystdex::make_move_iterator_pair(),YSLib::IO::Path::operator/=(),YSLib::Messaging::MessageQueue::Remove() , 以及 ystdex::split().


|
inline |
|
inline |
取部件的容器指针。
参考 YSLib::UI::View::ContainerPtr , 以及 YSLib::UI::IWidget::GetView().
参考自 Close(),DecorateAsCloseButton(),DualScreenReader::Detach(),YSLib::UI::DropDownList::DetachTopWidget(),DoReleaseFocus(),DoRequestFocus(),FetchTopLevel(),Invalidate(),IsFocused(),LocateForParentContainer(),LocateForWidget(),LocateOffset(),MoveToBottom(),MoveToLeft(),MoveToRight(),MoveToTop(),YSLib::UI::Panel::operator-=(),YSLib::UI::DropDownList::Refresh(),ReleaseFocusCascade(),RequestFocusCascade(),RequestToTop(),YSLib::UI::GUIState::ResponseKey(),YSLib::UI::GUIState::ResponseTouch(),SetInvalidationToParent() , 以及 YSLib::UI::BufferedRenderer::Validate().


|
inline |
取默认字体缓存。
在文件 GUIApplication.h 第 152 行定义.
参考 FetchGlobalInstance() , 以及 GUIApplication::GetFontCache().
参考自 FetchDefaultTypeface(),FetchFontFamilyNames() , 以及 YSLib::Drawing::FontCache::GetDefaultTypefacePtr().


| GEvent<void( typename EventTypeMapping<_vID>::HandlerType ::EventArgsType)>& YSLib::UI::FetchEvent | ( | VisualEventMap & | m | ) |
取控件事件。
在文件 ycontrol.h 第 137 行定义.
参考 EventT , 以及 GetEvent().

| GEvent<void( typename EventTypeMapping<_vID>::HandlerType ::EventArgsType)>& YSLib::UI::FetchEvent | ( | AController & | controller | ) |
取部件事件。
| _vID | 指定事件类型。 |
| controller | 指定部件的控制器。 |
| BadControl | 异常中立:无事件映射表:由 GetController 抛出。 |
在文件 ycontrol.h 第 154 行定义.
参考 EventT , 以及 YSLib::UI::AController::GetItemRef().

|
inline |
取部件事件。
| _vID | 指定事件类型。 |
| wgt | 指定部件。 |
| BadControl | 异常中立:无事件映射表:由 GetController 抛出。 |
在文件 ycontrol.h 第 171 行定义.
参考 YSLib::UI::IWidget::GetController().

|
inline |
取焦点对象指针。
nullptr 。 参考 YSLib::UI::View::FocusingPtr , 以及 YSLib::UI::IWidget::GetView().
参考自 ClearFocusingOf(),IsFocused(),YSLib::UI::Panel::operator-=() , 以及 YSLib::UI::GUIState::ResponseKey().


|
inline |
取指定 Shell 句柄对应的 Shell 引用 。
在文件 ShellHelper.h 第 159 行定义.
参考 YSLib::FetchShellHandle() , 以及 YAssert.

|
inline |
|
inline |
|
inline |
|
inline |
取部件位置。
参考 YSLib::UI::View::GetLocation() , 以及 YSLib::UI::IWidget::GetView().
参考自 FetchTopLevel(),YSLib::UI::GetBoundsOf(),GetDesktopDownHandle(),Invalidate(),YSLib::UI::LocateContainerOffset(),LocateForParentContainer(),LocateForWidget(),LocateOffset(),MoveToBottom(),MoveToLeft(),MoveToRight(),MoveToTop(),OnTouchHeld(),PaintChild(),YSLib::UI::GUIState::ResponseTouch(),YSLib::UI::ATrack::SetThumbPosition() , 以及 YSLib::UI::BufferedRenderer::Validate().


|
inline |
取部件大小。
参考 YSLib::UI::View::GetSize() , 以及 YSLib::UI::IWidget::GetView().
参考自 DecorateAsCloseButton(),DrawArrow(),DrawThumbBackground(),DrawTrackBackground(),YSLib::UI::ScrollableContainer::FixLayout(),YSLib::UI::GetBoundsOf(),Invalidate(),large_delta(),MoveToBottom(),MoveToRight(),YSLib::UI::BorderBrush::operator()(),PaintChild(),YSLib::UI::ProgressBar::Refresh(),YSLib::UI::CheckBox::Refresh(),YSLib::UI::Label::Refresh(),TextInfoBox::Refresh(),YSLib::UI::Button::Refresh(),YSLib::UI::CheckButton::Refresh(),YSLib::UI::TextList::Refresh(),SetInvalidationOf(),YSLib::UI::Widget::SetRenderer() , 以及 YSLib::UI::ATrack::SetThumbLength().


|
inline |
|
inline |
|
inline |
取转移迭代器对。
在文件 iterator.hpp 第 108 行定义.
参考自 ystdex::make_move_iterator_pair().

|
inline |
取指定序列范围(包含序列容器及内建数组等)的转移迭代器对。
begin 和 end 指定范围迭代器。 在文件 iterator.hpp 第 122 行定义.
参考 YSLib::begin(),YSLib::end() , 以及 ystdex::make_move_iterator_pair().

|
inline |
使用 new 和指定参数构造指定类型的 std::shared_ptr 实例。
| _type | 被指向类型。 |
在文件 memory.hpp 第 242 行定义.
|
inline |
创建转换迭代器。
在文件 iterator.hpp 第 555 行定义.
参考 yforward.
参考自 ystdex::operator|().

|
inline |
使用 new 和指定参数构造指定类型的 std::unique_ptr 实例。
| _type | 被指向类型。 |
在文件 memory.hpp 第 227 行定义.
|
inline |
|
inline |
向句柄指定的 Shell 对象转移线程控制权。
在文件 ShellHelper.h 第 209 行定义.
参考自 ShlReader::Exit(),GetDesktopDownHandle(),NowShellToNew() , 以及 NowShellToStored().


|
inline |
|
inline |
|
inline |
释放焦点,成功后向自身发送 LostFocus 事件。
参考自 Hide(),YSLib::UI::MenuHost::HideRaw() , 以及 ReleaseFocusCascade().


|
inline |
| YF_API void RemoveGlobalTasks | ( | ) |
|
inline |
向部件容器释放获得焦点,成功后向自身发送 GotFocus 事件。
参考自 OnTouchDown_RequestToTopFocused(),RequestFocusCascade(),Show() , 以及 YSLib::UI::MenuHost::ShowRaw().


|
inline |
复位桌面。
销毁每个桌面并在原存储位置创建新的对象。
在文件 ShellHelper.h 第 300 行定义.
参考 YSLib::UI::Styles::Desktop.
参考自 ResetDSDesktops().

| void ScrDraw | ( | _tOut | buf, |
| _tGen && | f | ||
| ) |
全屏幕描点。
在文件 ShellHelper.h 第 327 行定义.
参考 MainScreenHeight,MainScreenWidth,yforward , 以及 yunseq().
参考自 FetchImage().


|
inline |
通过主消息队列向指定 Shell 对象转移控制权。
在文件 ShellHelper.h 第 241 行定义.
参考自 SetShellToNew() , 以及 SetShellToStored().

|
inline |
|
inline |
| YF_API const char* TranslateTime | ( | const std::tm & | , |
| const char * | = DefaultTimeFormat |
||
| ) |
| YF_API const char* TranslateTime | ( | const std::time_t & | , |
| const char * | = DefaultTimeFormat |
||
| ) |
|
inline |
编译期选择自增/自减运算。
在文件 functional.hpp 第 341 行定义.