YSTest  PreAlpha_b380_20130211
The YSLib Test Project
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
YSLib::Components::RoutedEventArgs Struct Reference

路由事件参数基类。 More...

#include <ywgtevt.h>

Inheritance diagram for YSLib::Components::RoutedEventArgs:
Collaboration diagram for YSLib::Components::RoutedEventArgs:

Public Types

enum  RoutingStrategy { Bubble = 0, Tunnel = 1, Direct = 2 }
 事件路由策略枚举。 More...
 

Public Member Functions

 RoutedEventArgs (IWidget &wgt, RoutingStrategy strategy=Direct)
 
- Public Member Functions inherited from YSLib::Components::UIEventArgs
 UIEventArgs (IWidget &wgt)
 
 UIEventArgs (const UIEventArgs &)=default
 复制构造:默认实现。
 
UIEventArgsoperator= (const UIEventArgs &)=default
 复制赋值:默认实现。
 
IWidgetGetSender () const ynothrow
 
void SetSender (IWidget &wgt)
 

Public Attributes

RoutingStrategy Strategy
 事件路由策略。
 
bool Handled
 事件已经被处理。
 

Detailed Description

路由事件参数基类。

Warning
非虚析构。
Since
build 195

Definition at line 87 of file ywgtevt.h.

Member Enumeration Documentation

事件路由策略枚举。

Enumerator:
Bubble 

气泡事件:向上遍历视图树时触发。

Tunnel 

隧道事件:向下遍历视图树时触发。

Direct 

直接事件:仅当遍历至目标控件时触发。

Definition at line 91 of file ywgtevt.h.

Constructor & Destructor Documentation

YSLib::Components::RoutedEventArgs::RoutedEventArgs ( IWidget wgt,
RoutingStrategy  strategy = Direct 
)
inline

Definition at line 101 of file ywgtevt.h.

Member Data Documentation

bool YSLib::Components::RoutedEventArgs::Handled

事件已经被处理。

Definition at line 99 of file ywgtevt.h.

Referenced by YSLib::Components::GUIState::ResponseKey(), and YSLib::Components::GUIState::ResponseTouch().

RoutingStrategy YSLib::Components::RoutedEventArgs::Strategy

事件路由策略。

Definition at line 98 of file ywgtevt.h.

Referenced by YSLib::Components::GUIState::ResponseKey(), and YSLib::Components::GUIState::ResponseTouch().


The documentation for this struct was generated from the following file: