clan::PointerEvent Class Reference

Pointer event. More...

#include <pointer_event.h>

+ Inheritance diagram for clan::PointerEvent:

Public Member Functions

 PointerEvent (PointerEventType type, PointerButton button, const Pointf &pos, bool alt_down, bool shift_down, bool ctrl_down, bool cmd_down)
 
bool alt_down () const
 True if the alt key was down.
 
PointerButton button () const
 Pointer button relevant for the event.
 
bool cmd_down () const
 True if the command key was down.
 
bool ctrl_down () const
 True if the control key was down.
 
Pointf pos (const std::shared_ptr< View > &view) const
 
Pointf pos (View *view) const
 Pointer position relative to local view content coordinates.
 
void set_pos (View *view, const Pointf &pos)
 Set event pointer position relative to local view content coordinates.
 
bool shift_down () const
 True if the shift key was down.
 
PointerEventType type () const
 Pointer event type.
 
- Public Member Functions inherited from clan::EventUI
virtual ~EventUI ()
 
std::shared_ptr< Viewcurrent_target ()
 View the event is currently being dispatched to.
 
bool default_prevented () const
 Flag if the event default action should be executed after dispatch.
 
EventUIPhase phase () const
 Current active event phase during dispatch.
 
void prevent_default ()
 Prevent default action from being executed after dispatch.
 
bool propagation_stopped () const
 Flag if event propagation should stop.
 
void set_timestamp (long long ts)
 Set event timestamp.
 
void stop_propagation ()
 Stops event from propagating further.
 
std::shared_ptr< Viewtarget ()
 The target view the event is fired for.
 
long long timestamp () const
 Timestamp for event in milliseconds since 1970.
 

Detailed Description

Pointer event.

Constructor & Destructor Documentation

◆ PointerEvent()

clan::PointerEvent::PointerEvent ( PointerEventType type,
PointerButton button,
const Pointf & pos,
bool alt_down,
bool shift_down,
bool ctrl_down,
bool cmd_down )
inline

Member Function Documentation

◆ alt_down()

bool clan::PointerEvent::alt_down ( ) const
inline

True if the alt key was down.

Referenced by PointerEvent().

◆ button()

PointerButton clan::PointerEvent::button ( ) const
inline

Pointer button relevant for the event.

Referenced by PointerEvent().

◆ cmd_down()

bool clan::PointerEvent::cmd_down ( ) const
inline

True if the command key was down.

Referenced by PointerEvent().

◆ ctrl_down()

bool clan::PointerEvent::ctrl_down ( ) const
inline

True if the control key was down.

Referenced by PointerEvent().

◆ pos() [1/2]

Pointf clan::PointerEvent::pos ( const std::shared_ptr< View > & view) const

◆ pos() [2/2]

Pointf clan::PointerEvent::pos ( View * view) const

Pointer position relative to local view content coordinates.

References clan::EventUI::View.

Referenced by PointerEvent(), and set_pos().

◆ set_pos()

void clan::PointerEvent::set_pos ( View * view,
const Pointf & pos )

Set event pointer position relative to local view content coordinates.

References pos(), and clan::EventUI::View.

◆ shift_down()

bool clan::PointerEvent::shift_down ( ) const
inline

True if the shift key was down.

Referenced by PointerEvent().

◆ type()

PointerEventType clan::PointerEvent::type ( ) const
inline

Pointer event type.

Referenced by PointerEvent().


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