You.i Engine
CYIFocusEvent Class Reference

Detailed Description

Focus events represent when a view receives or loses focus.

Focus events are available in all event phases. Event handlers interested in the capture or bubble phases of focus events can use the focus target and related target to see how the focus is changing: interesting cases may be between descendants and between a descendant and an unrelated target.

Possible event types are CYIEvent::Type::FocusIn and CYIEvent::Type::FocusOut.
See also

#include <event/YiFocusEvent.h>

Inheritance diagram for CYIFocusEvent:

Public Member Functions

 CYIFocusEvent (CYIEvent::Type eventType)
 CYIFocusEvent (const CYIFocusEvent &rOther)=default
virtual ~CYIFocusEvent ()
virtual std::unique_ptr< CYIEventClone () const override
- Public Member Functions inherited from CYIEvent
 CYIEvent (CYIEvent::Type eventType)
 CYIEvent (const CYIEvent &rOther)
virtual ~CYIEvent ()
const CYIStringGetName () const
CYIEvent::Type GetType () const
void SetType (CYIEvent::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
bool IsAccessibilityEvent () const
std::unique_ptr< CYIAccessibilityEventCloneAsAccessibilityEvent () const
bool IsGestureEvent () const
std::unique_ptr< CYIGestureEventCloneAsGestureEvent () const
bool IsSwipeGestureEvent () const
bool IsScrubGestureEvent () const
std::unique_ptr< CYISwipeGestureEventCloneAsSwipeGestureEvent () const
void SetTarget (const CYIEventTarget *pTarget)
const std::shared_ptr< CYIEventTargetProxy > & GetTargetProxy () const

Public Attributes

std::shared_ptr< CYISceneNodeProxym_pFocusTarget
std::shared_ptr< CYISceneNodeProxym_pRelatedFocusTarget
- Public Attributes inherited from CYIEvent
uint64_t m_eventTimeMs
Phase m_phase
bool m_canCancel
bool m_canBubble
bool m_canCapture
bool m_stopPropagation
bool m_handled

Additional Inherited Members

- Public Types inherited from CYIEvent
enum  Type : uint8_t {
  Type::None = 0,
 The event type of the CYIEvent class instance. More...
enum  Phase : uint8_t {
  Phase::None = 0,
 The current processing phase of the event. More...
enum  Priority {
  Priority::Highest = 2,
  Priority::High = 1,
  Priority::Normal = 0,
  Priority::Low = -1,
  Priority::Lowest = -2,
  Priority::Default = Normal
 Priority of the event in the event queue. More...

Constructor & Destructor Documentation

◆ CYIFocusEvent() [1/2]

CYIFocusEvent::CYIFocusEvent ( CYIEvent::Type  eventType)

Constructs a focus event from eventType. Will assert if the type is not a focus event.

◆ CYIFocusEvent() [2/2]

CYIFocusEvent::CYIFocusEvent ( const CYIFocusEvent rOther)

◆ ~CYIFocusEvent()

virtual CYIFocusEvent::~CYIFocusEvent ( )

Member Function Documentation

◆ Clone()

virtual std::unique_ptr<CYIEvent> CYIFocusEvent::Clone ( ) const

Reimplemented from CYIEvent.

Member Data Documentation

◆ m_pFocusTarget

std::shared_ptr<CYISceneNodeProxy> CYIFocusEvent::m_pFocusTarget

For focus in events, the focus target is the node receiving focus, and for focus out events, it is the node losing focus.

◆ m_pRelatedFocusTarget

std::shared_ptr<CYISceneNodeProxy> CYIFocusEvent::m_pRelatedFocusTarget

For focus in events, the related target is the node losing focus, and for focus out events, it is the node receiving focus.

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