|
YSTest
PreAlpha_b500_20140530
The YSLib Test Project
|
输入计时器。 更多...
#include <ygui.h>


Public 类型 | |
| enum | HeldStateType { Free = 0, Pressed = 1, Held = 2 } |
| 输入保持状态。 更多... | |
| using | Duration = Timers::Duration |
Public 成员函数 | |
| InputTimer (const Duration &=Timers::TimeSpan(1000U)) | |
| bool | RefreshHeld (HeldStateType &, const Duration &=Timers::TimeSpan(240), const Duration &=Timers::TimeSpan(120)) |
| 重复检测输入接触保持状态。 更多... | |
| size_t | RefreshClick (size_t, const Duration &=Timers::TimeSpan(400)) |
| 重复检测连续点击状态。 更多... | |
| void | ResetInput () |
| 复位输入计时状态。 更多... | |
Public 成员函数 继承自 YSLib::Timers::Timer | |
| Timer (const Duration &={}, bool=true) | |
| 构造:使用时间间隔和激活状态。 更多... | |
| virtual | DefDeDtor (Timer) DefGetter(const ynothrow |
| PDefH (void, Delay, const Duration &d) ImplExpr(nBase+ | |
| 延时。 更多... | |
| Duration | RefreshDelta () |
| 刷新:对于非零时间间隔判断有效性并都更新时间基点。 更多... | |
| Duration | RefreshRemainder () |
| 刷新:对于非零时间间隔判断有效性并都更新时间基点。 更多... | |
额外继承的成员函数 | |
Public 属性 继承自 YSLib::Timers::Timer | |
| Duration | Interval |
| 重复刷新有效的最小时间间隔。 更多... | |
| virtual | TimePoint |
| virtual | BaseTick |
Protected 属性 继承自 YSLib::Timers::Timer | |
| TimePoint | nBase |
| 时间基点:计时的起点。 更多... | |
| YSLib::UI::InputTimer::InputTimer | ( | const Duration & | d = Timers::TimeSpan(1000U) | ) |
| size_t YSLib::UI::InputTimer::RefreshClick | ( | size_t | s, |
| const Duration & | delay = Timers::TimeSpan(400) |
||
| ) |
重复检测连续点击状态。
参考 YSLib::Timers::Timer::Activate, YSLib::Timers::Timer::Interval , 以及 YB_UNLIKELY.
参考自 YReader::ShlTextReader::OnClick().

| bool YSLib::UI::InputTimer::RefreshHeld | ( | HeldStateType & | s, |
| const Duration & | initial_delay = Timers::TimeSpan(240), |
||
| const Duration & | repeated_delay = Timers::TimeSpan(120) |
||
| ) |
重复检测输入接触保持状态。
参考 YSLib::Timers::Timer::Activate, Free, Held, YSLib::Timers::Timer::Interval, Pressed, YB_UNLIKELY , 以及 yunseq.

| void YSLib::UI::InputTimer::ResetInput | ( | ) |
复位输入计时状态。
参考 YSLib::Timers::Timer::Interval.
参考自 YSLib::UI::GUIState::Reset() , 以及 YSLib::UI::GUIState::ResetHeldState().
