|
YSTest
PreAlpha_b380_20130211
The YSLib Test Project
|
图形用户界面公共状态。 More...
#include <ygui.h>


Public Member Functions | |
| GUIState () ynothrow | |
| bool | IsControlEntered () const ynothrow |
| Components::IWidget * | GetKeyDownPtr () const ynothrow |
| Components::IWidget * | GetTouchDownPtr () const ynothrow |
| void | Reset () |
| 复位图形用户界面状态。 | |
| void | ResetHeldState (InputTimer::HeldStateType &) |
| 复位接触保持状态。 | |
| bool | ResponseKeyBase (Components::KeyEventArgs &, Components::VisualEvent) |
| 响应标准按键状态。 | |
| bool | ResponseTouchBase (Components::TouchEventArgs &, Components::VisualEvent) |
| 响应标准按键状态。 | |
| bool | ResponseKey (Components::KeyEventArgs &, Components::VisualEvent) |
| 响应标准按键状态。 | |
| bool | ResponseTouch (Components::TouchEventArgs &, Components::VisualEvent) |
| 响应屏幕接触状态。 | |
Public Attributes | |
| InputTimer::HeldStateType | KeyHeldState |
| 输入接触状态。 | |
| InputTimer::HeldStateType | TouchHeldState |
| Drawing::Vec | DraggingOffset |
| 拖放偏移量。 | |
| InputTimer | HeldTimer |
| 输入接触保持计时器。 | |
| Drawing::Point | ControlLocation |
| Drawing::Point | LastControlLocation |
| 最近两次的指针设备操作时的控件全局位置(屏幕坐标)。 | |
| Components::Styles::Palette | Colors |
| 调色板。 | |
Private Member Functions | |
| void | TryEntering (Components::TouchEventArgs &&) |
| void | TryLeaving (Components::TouchEventArgs &&) |
Private Member Functions inherited from ystdex::noncopyable | |
| noncopyable (const noncopyable &)=delete | |
| 禁止复制构造。 | |
| noncopyable & | operator= (const noncopyable &)=delete |
| 禁止赋值复制。 | |
| noncopyable ()=default | |
protected 构造:默认实现。 | |
| ~noncopyable ()=default | |
protected 析构:默认实现。 | |
Private Member Functions inherited from ystdex::nonmovable | |
| nonmovable (const nonmovable &)=delete | |
| 禁止复制构造。 | |
| nonmovable & | operator= (const nonmovable &)=delete |
| 禁止赋值复制。 | |
| nonmovable ()=default | |
protected 构造:默认实现。 | |
| ~nonmovable ()=default | |
protected 析构:默认实现。 | |
Private Attributes | |
| Components::IWidget * | p_KeyDown |
| Components::IWidget * | p_TouchDown |
| bool | control_entered |
| 记录指针是否在控件内部。 | |
|
inline |
|
inline |
|
inline |
| void GUIState::Reset | ( | ) |
复位图形用户界面状态。
Definition at line 128 of file ygui.cpp.
References ControlLocation, DraggingOffset, YSLib::Components::InputTimer::Free, HeldTimer, YSLib::Drawing::GBinaryGroup< SPos >::Invalid, KeyHeldState, LastControlLocation, p_KeyDown, p_TouchDown, YSLib::Components::InputTimer::Reset(), TouchHeldState, and yunseq.
Referenced by ShlDS::ShlDS().


| void GUIState::ResetHeldState | ( | InputTimer::HeldStateType & | s | ) |
复位接触保持状态。
Definition at line 139 of file ygui.cpp.
References YSLib::Components::InputTimer::Free, HeldTimer, and YSLib::Components::InputTimer::Reset().
Referenced by ResponseKeyBase(), and ResponseTouchBase().


| bool GUIState::ResponseKey | ( | Components::KeyEventArgs & | e, |
| Components::VisualEvent | op | ||
| ) |
响应标准按键状态。
Definition at line 244 of file ygui.cpp.
References YSLib::Components::RoutedEventArgs::Bubble, YSLib::Components::RoutedEventArgs::Direct, YSLib::Components::FetchContainerPtr(), YSLib::Components::FetchFocusingPtr(), YSLib::Components::UIEventArgs::GetSender(), YSLib::Components::RoutedEventArgs::Handled, YSLib::Components::IsEnabled(), YSLib::Components::IsVisible(), ResponseKeyBase(), YSLib::Components::UIEventArgs::SetSender(), YSLib::Components::RoutedEventArgs::Strategy, YSLib::Components::RoutedEventArgs::Tunnel, and YAssert.

| bool GUIState::ResponseKeyBase | ( | Components::KeyEventArgs & | e, |
| Components::VisualEvent | op | ||
| ) |
响应标准按键状态。
Definition at line 166 of file ygui.cpp.
References YSLib::Components::UIEventArgs::GetSender(), YSLib::Components::KeyDown, YSLib::Components::KeyHeld, KeyHeldState, YSLib::Components::KeyUp, p_KeyDown, ResetHeldState(), and YAssert.
Referenced by ResponseKey().


| bool GUIState::ResponseTouch | ( | Components::TouchEventArgs & | e, |
| Components::VisualEvent | op | ||
| ) |
响应屏幕接触状态。
Definition at line 288 of file ygui.cpp.
References YSLib::Components::RoutedEventArgs::Bubble, ControlLocation, YSLib::Components::RoutedEventArgs::Direct, YSLib::Components::FetchContainerPtr(), YSLib::Components::GetLocationOf(), YSLib::Components::UIEventArgs::GetSender(), YSLib::Components::RoutedEventArgs::Handled, YSLib::Components::IsEnabled(), YSLib::Components::IsVisible(), ResponseTouchBase(), YSLib::Components::UIEventArgs::SetSender(), YSLib::Components::RoutedEventArgs::Strategy, YSLib::Components::RoutedEventArgs::Tunnel, and YAssert.

| bool GUIState::ResponseTouchBase | ( | Components::TouchEventArgs & | e, |
| Components::VisualEvent | op | ||
| ) |
响应标准按键状态。
Definition at line 200 of file ygui.cpp.
References DraggingOffset, YSLib::Components::UIEventArgs::GetSender(), YSLib::Drawing::GBinaryGroup< SPos >::Invalid, YSLib::Components::LocateForWidget(), p_TouchDown, ResetHeldState(), YSLib::Components::UIEventArgs::SetSender(), YSLib::Components::TouchDown, YSLib::Components::TouchHeld, TouchHeldState, YSLib::Components::TouchUp, TryEntering(), TryLeaving(), and YAssert.
Referenced by ResponseTouch().


|
private |
Definition at line 146 of file ygui.cpp.
References control_entered.
Referenced by ResponseTouchBase().

|
private |
Definition at line 156 of file ygui.cpp.
References control_entered.
Referenced by ResponseTouchBase().

| Components::Styles::Palette YSLib::Components::GUIState::Colors |
|
private |
| Drawing::Point YSLib::Components::GUIState::ControlLocation |
Definition at line 117 of file ygui.h.
Referenced by Reset(), and ResponseTouch().
| Drawing::Vec YSLib::Components::GUIState::DraggingOffset |
| InputTimer YSLib::Components::GUIState::HeldTimer |
输入接触保持计时器。
Definition at line 116 of file ygui.h.
Referenced by Reset(), and ResetHeldState().
| InputTimer::HeldStateType YSLib::Components::GUIState::KeyHeldState |
输入接触状态。
Definition at line 110 of file ygui.h.
Referenced by Reset(), and ResponseKeyBase().
| Drawing::Point YSLib::Components::GUIState::LastControlLocation |
|
private |
Definition at line 123 of file ygui.h.
Referenced by Reset(), and ResponseKeyBase().
|
private |
Definition at line 124 of file ygui.h.
Referenced by Reset(), and ResponseTouchBase().
| InputTimer::HeldStateType YSLib::Components::GUIState::TouchHeldState |
Definition at line 110 of file ygui.h.
Referenced by Reset(), and ResponseTouchBase().