You.i Engine
CYIEvent Class Reference

Detailed Description

Base class for events.

Events are sent to targets via CYIEventDispatcher - targets are CYIEventTarget classes.

#include <event/YiEvent.h>

Inheritance diagram for CYIEvent:

Public Member Functions

 CYIEvent (YI_EVENT_TYPE eventType)
 
 CYIEvent (const CYIEvent &rOther)
 
virtual ~CYIEvent ()
 
virtual std::unique_ptr< CYIEventClone () const
 
const CYIStringGetName () const
 
YI_EVENT_TYPE GetType () const
 
void SetType (YI_EVENT_TYPE eventType)
 
bool IsActionEvent () const
 
std::unique_ptr< CYIActionEventCloneAsActionEvent () const
 
bool IsKeyEvent () const
 
std::unique_ptr< CYIKeyEventCloneAsKeyEvent () const
 
bool IsFocusEvent () const
 
std::unique_ptr< CYIFocusEventCloneAsFocusEvent () const
 
bool IsTrackpadEvent () const
 
std::unique_ptr< CYITrackpadEventCloneAsTrackpadEvent () const
 
- Public Member Functions inherited from CYIScriptableObject
 CYIScriptableObject ()
 
 CYIScriptableObject (const CYIScriptableObject &other)
 
CYIScriptableObjectoperator= (const CYIScriptableObject &other)
 
virtual ~CYIScriptableObject ()
 
CYIBindingImplementationGetBindingImplementation () const
 
void SetBindingImplementation (CYIBindingImplementation *pBindingImplementation)
 
virtual const CYIRuntimeTypeInfoGetRuntimeTypeInfoForScriptObject () const
 

Public Attributes

CYIEventTargetm_pTarget
 
CYIEventTargetm_pCurrentTarget
 
YI_EVENT_PHASE m_ePhase
 
bool m_bCanCancel
 
bool m_bCanBubble
 
bool m_bCanCapture
 
bool m_bStopPropagation
 
bool m_bHandled
 
uint64_t m_uEventTimeMs
 

Constructor & Destructor Documentation

CYIEvent::CYIEvent ( YI_EVENT_TYPE  eventType)
CYIEvent::CYIEvent ( const CYIEvent rOther)
virtual CYIEvent::~CYIEvent ( )
virtual

Member Function Documentation

virtual std::unique_ptr<CYIEvent> CYIEvent::Clone ( ) const
virtual
std::unique_ptr<CYIActionEvent> CYIEvent::CloneAsActionEvent ( ) const

Returns a clone of the CYIActionEvent if this event is a CYIActionEvent, otherwise returns null.

See also
CYIActionEvent
std::unique_ptr<CYIFocusEvent> CYIEvent::CloneAsFocusEvent ( ) const

Returns a clone of the CYIFocusEvent if this event is a CYIFocusEvent, otherwise returns null.

See also
CYIFocusEvent
std::unique_ptr<CYIKeyEvent> CYIEvent::CloneAsKeyEvent ( ) const

Returns a clone of the CYIKeyEvent if this event is a CYIKeyEvent, otherwise returns null.

See also
CYIKeyEvent
std::unique_ptr<CYITrackpadEvent> CYIEvent::CloneAsTrackpadEvent ( ) const

Returns a clone of the CYITrackpadEvent if this event is a CYITrackpadEvent, otherwise returns null.

See also
CYITrackpadEvent
const CYIString& CYIEvent::GetName ( ) const

Returns the name of the event if it exists and UNKNOWN otherwise.

YI_EVENT_TYPE CYIEvent::GetType ( ) const
inline

Returns the type of the event.

bool CYIEvent::IsActionEvent ( ) const
inline

Returns true if this event is an action event and false otherwise.

See also
CYIActionEvent
bool CYIEvent::IsFocusEvent ( ) const
inline

Returns true if this event is a focus event and false otherwise.

See also
CYIFocusEvent
bool CYIEvent::IsKeyEvent ( ) const
inline

Returns true if this event is a key event and false otherwise.

See also
CYIKeyEvent
bool CYIEvent::IsTrackpadEvent ( ) const
inline

Returns true if this event is a trackpad event and false otherwise.

See also
CYITrackpadEvent
void CYIEvent::SetType ( YI_EVENT_TYPE  eventType)

Sets the type of the event.

Member Data Documentation

bool CYIEvent::m_bCanBubble

Whether this event can undergo the bubble phase.

bool CYIEvent::m_bCanCancel

Whether this event can be cancelled (propagation stopped).

bool CYIEvent::m_bCanCapture

Whether this event can undergo the capture phase.

bool CYIEvent::m_bHandled

Whether or not than event has been handled by a previous handler.

bool CYIEvent::m_bStopPropagation

When set to true the event will not undergo further processing.

YI_EVENT_PHASE CYIEvent::m_ePhase

The current event processing phase.

CYIEventTarget* CYIEvent::m_pCurrentTarget

The event's current target.

CYIEventTarget* CYIEvent::m_pTarget

The event's ultimate target.

uint64_t CYIEvent::m_uEventTimeMs

system time for the event, in milliseconds.


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