YSTest
PreAlpha_b371_20130102
The YSLib Test Project
|
助手功能/函数。 更多...
函数 | |
template<bool _bIsPositive, typename _tScalar1 , typename _tScalar2 > | |
_tScalar1 & | ystdex::delta_assign (_tScalar1 &_x, _tScalar2 &_y) |
编译期选择加法/减法复合赋值运算。 | |
Drawing::FontCache & | FetchDefaultFontCache () |
取默认字体缓存。 | |
Devices::Screen & | FetchDefaultScreen () |
取默认屏幕。 | |
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::Components::FetchEvent (VisualEventMap &m) |
取控件事件。 | |
template<VisualEvent _vID> | |
GEvent< void(typename EventTypeMapping< _vID > ::HandlerType::EventArgsType)> & | YSLib::Components::FetchEvent (AController &controller) |
取部件事件。 | |
template<VisualEvent _vID> | |
GEvent< void(typename EventTypeMapping< _vID > ::HandlerType::EventArgsType)> & | YSLib::Components::FetchEvent (IWidget &wgt) |
取部件事件。 | |
void | YSLib::Components::RequestFocus (IWidget &wgt) |
向部件容器释放获得焦点,成功后向自身发送 GotFocus 事件。 | |
void | YSLib::Components::ReleaseFocus (IWidget &wgt) |
释放焦点,成功后向自身发送 LostFocus 事件。 | |
IWidget * | YSLib::Components::FetchContainerPtr (const IWidget &wgt) |
取部件的容器指针。 | |
IWidget * | YSLib::Components::FetchFocusingPtr (IWidget &wgt) |
取焦点对象指针。 | |
const Point & | YSLib::Components::GetLocationOf (const IWidget &wgt) |
取部件位置。 | |
const Size & | YSLib::Components::GetSizeOf (const IWidget &wgt) |
取部件大小。 | |
变量 | |
YSL_END | |
Shell 快捷操作。 | |
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 p=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 管理器内的对象转移控制权。 | |
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() , 以及 YAssert.
参考自 YSLib::Components::Console::Console(),YSL_BEGIN::Init(),main(),NowShellTo(),ShlTextReader::OnKeyDown() , 以及 YSLib::Components::InputTimer::Refresh().
|
inline |
迭代器包装,用于 range-based for 。
在文件 ValueNode.h 第 178 行定义.
参考自 YSLib::IO::Path::GetRelativePath(),YSLib::Messaging::MessageQueue::Peek() , 以及 YSLib::Messaging::MessageQueue::Pop().
|
inline |
在文件 ValueNode.h 第 183 行定义.
|
inline |
|
inline |
_tPixel* CreateRawBitmap | ( | const _tPixel * | s, |
size_t | n | ||
) |
|
inline |
新建屏幕图像。
在文件 ShellHelper.h 第 275 行定义.
参考 MainScreenHeight() , 以及 MainScreenWidth().
yconstexpr const char* DefaultTimeFormat | ( | "%04u-%02u-%02u %02u:%02u:%02u" | ) |
默认时间格式字符串。
|
inline |
|
inline |
在文件 ValueNode.h 第 189 行定义.
参考自 Delay(),YSLib::IO::Path::GetFilename(),YSLib::IO::Path::GetParentPath(),YSLib::IO::Path::operator/=() , 以及 YSLib::Messaging::MessageQueue::Remove().
|
inline |
在文件 ValueNode.h 第 194 行定义.
|
inline |
取部件的容器指针。
参考 YSLib::Components::IWidget::GetView() , 以及 YSLib::Components::View::pContainer.
参考自 Close(),DecorateAsCloseButton(),DualScreenReader::Detach(),YSLib::Components::DropDownList::DetachTopWidget(),DoReleaseFocus(),DoRequestFocus(),FetchTopLevel(),Invalidate(),IsFocused(),LocateForParentContainer(),LocateForWidget(),LocateOffset(),MoveToBottom(),MoveToLeft(),MoveToRight(),MoveToTop(),YSLib::Components::Panel::operator-=(),YSLib::Components::DropDownList::Refresh(),ReleaseFocusCascade(),RequestFocusCascade(),RequestToTop(),YSLib::Components::GUIState::ResponseKey(),YSLib::Components::GUIState::ResponseTouch(),SetInvalidationToParent() , 以及 YSLib::Components::BufferedRenderer::Validate().
|
inline |
取默认字体缓存。
参考 FetchGlobalInstance() , 以及 DSApplication::GetFontCache().
参考自 FetchDefaultTypeface(),YSLib::Drawing::FontCache::GetDefaultTypefacePtr() , 以及 InitializeSystemFontCache().
|
inline |
GEvent<void( typename EventTypeMapping<_vID>::HandlerType ::EventArgsType)>& YSLib::Components::FetchEvent | ( | VisualEventMap & | m | ) |
取控件事件。
在文件 ycontrol.h 第 137 行定义.
参考 EventT , 以及 GetEvent().
GEvent<void( typename EventTypeMapping<_vID>::HandlerType ::EventArgsType)>& YSLib::Components::FetchEvent | ( | AController & | controller | ) |
取部件事件。
_vID | 指定事件类型。 |
controller | 指定部件的控制器。 |
BadControl | 异常中立:无事件映射表:由 GetController 抛出。 |
在文件 ycontrol.h 第 154 行定义.
参考 EventT , 以及 YSLib::Components::AController::GetItemRef().
|
inline |
取部件事件。
_vID | 指定事件类型。 |
wgt | 指定部件。 |
BadControl | 异常中立:无事件映射表:由 GetController 抛出。 |
在文件 ycontrol.h 第 171 行定义.
参考 YSLib::Components::IWidget::GetController().
|
inline |
取焦点对象指针。
nullptr
。 参考 YSLib::Components::IWidget::GetView() , 以及 YSLib::Components::View::pFocusing.
参考自 ClearFocusingOf(),IsFocused(),YSLib::Components::Panel::operator-=() , 以及 YSLib::Components::GUIState::ResponseKey().
|
inline |
取指定 Shell 句柄对应的 Shell 引用 。
在文件 ShellHelper.h 第 109 行定义.
参考 YSLib::FetchShellHandle() , 以及 YAssert.
|
inline |
|
inline |
|
inline |
在文件 ShellHelper.h 第 249 行定义.
参考自 FrmAbout::FrmAbout() , 以及 ShlExplorer::ShlExplorer().
|
inline |
取部件位置。
参考 YSLib::Components::View::GetLocation() , 以及 YSLib::Components::IWidget::GetView().
参考自 FetchTopLevel(),YSLib::Components::GetBoundsOf(),Invalidate(),YSLib::Components::LocateContainerOffset(),LocateForParentContainer(),LocateForWidget(),LocateOffset(),MoveToBottom(),MoveToLeft(),MoveToRight(),MoveToTop(),OnTouchHeld(),PaintChild(),YSLib::Components::GUIState::ResponseTouch(),YSLib::Components::ATrack::SetThumbPosition(),ShlExplorer::ShlExplorer() , 以及 YSLib::Components::BufferedRenderer::Validate().
|
inline |
取部件大小。
参考 YSLib::Components::View::GetSize() , 以及 YSLib::Components::IWidget::GetView().
参考自 DecorateAsCloseButton(),DrawArrow(),DrawThumbBackground(),DrawTrackBackground(),YSLib::Components::ScrollableContainer::FixLayout(),YSLib::Components::GetBoundsOf(),Invalidate(),MoveToBottom(),MoveToRight(),ShlDS::OnGotMessage(),YSLib::Components::BorderBrush::operator()(),PaintChild(),YSLib::Components::ProgressBar::Refresh(),YSLib::Components::CheckBox::Refresh(),TextInfoBox::Refresh(),YSLib::Components::Label::Refresh(),YSLib::Components::Button::Refresh(),YSLib::Components::CheckButton::Refresh(),YSLib::Components::TextList::Refresh(),SetInvalidationOf(),YSLib::Components::Widget::SetRenderer() , 以及 YSLib::Components::ATrack::SetThumbLength().
|
inline |
|
inline |
|
inline |
|
inline |
向句柄指定的 Shell 对象转移线程控制权。
在文件 ShellHelper.h 第 159 行定义.
参考自 NowShellToNew() , 以及 NowShellToStored().
|
inline |
|
inline |
|
inline |
释放焦点,成功后向自身发送 LostFocus 事件。
参考自 Hide(),YSLib::Components::MenuHost::HideRaw() , 以及 ReleaseFocusCascade().
|
inline |
YF_API void RemoveGlobalTasks | ( | ) |
|
inline |
向部件容器释放获得焦点,成功后向自身发送 GotFocus 事件。
参考自 OnTouchDown_RequestToTopFocused(),RequestFocusCascade(),Show() , 以及 YSLib::Components::MenuHost::ShowRaw().
void ScrDraw | ( | _tOut | buf, |
_tGen && | f | ||
) |
全屏幕描点。
在文件 ShellHelper.h 第 263 行定义.
参考 MainScreenHeight(),MainScreenWidth(),yforward , 以及 yunseq.
参考自 FetchImage().
|
inline |
通过主消息队列向指定 Shell 对象转移控制权。
在文件 ShellHelper.h 第 191 行定义.
参考自 ShlReader::Exit(),SetShellToNew(),SetShellToStored() , 以及 ShlExplorer::ShlExplorer().
|
inline |
|
inline |
YF_API const char* TranslateTime | ( | const std::tm & | , |
const char * | = DefaultTimeFormat |
||
) |
格式化时间字符串。
在文件 ShellHelper.cpp 第 83 行定义.
参考自 ShlHexBrowser::ShlHexBrowser() , 以及 TranslateTime().
YF_API const char* TranslateTime | ( | const std::time_t & | , |
const char * | = DefaultTimeFormat |
||
) |