clan::KeyEvent Class Reference

Keyboard key event. More...

#include <key_event.h>

+ Inheritance diagram for clan::KeyEvent:

Public Member Functions

 KeyEvent (KeyEventType type, Key key, int repeat_count, const std::string &text, const Pointf &pointer_pos, bool alt_down, bool shift_down, bool ctrl_down, bool cmd_down)
 
bool alt_down () const
 True if the alt key was down. More...
 
bool cmd_down () const
 True if the command key was down. More...
 
bool ctrl_down () const
 True if the control key was down. More...
 
Key key () const
 Key relevant for the event. More...
 
Pointf pointer_pos (View *view) const
 Cursor position returned in local content coordinates for the view specified. More...
 
int repeat_count () const
 Key press repeat counter for key being held down. More...
 
bool shift_down () const
 True if the shift key was down. More...
 
const std::stringtext () const
 Unicode characters generated by this event. More...
 
KeyEventType type () const
 Key event type. More...
 
- Public Member Functions inherited from clan::EventUI
virtual ~EventUI ()
 
std::shared_ptr< Viewcurrent_target ()
 View the event is currently being dispatched to. More...
 
bool default_prevented () const
 Flag if the event default action should be executed after dispatch. More...
 
EventUIPhase phase () const
 Current active event phase during dispatch. More...
 
void prevent_default ()
 Prevent default action from being executed after dispatch. More...
 
bool propagation_stopped () const
 Flag if event propagation should stop. More...
 
void set_timestamp (long long ts)
 Set event timestamp. More...
 
void stop_propagation ()
 Stops event from propagating further. More...
 
std::shared_ptr< Viewtarget ()
 The target view the event is fired for. More...
 
long long timestamp () const
 Timestamp for event in milliseconds since 1970. More...
 

Detailed Description

Keyboard key event.

Constructor & Destructor Documentation

clan::KeyEvent::KeyEvent ( KeyEventType  type,
Key  key,
int  repeat_count,
const std::string text,
const Pointf pointer_pos,
bool  alt_down,
bool  shift_down,
bool  ctrl_down,
bool  cmd_down 
)
inline

Member Function Documentation

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

True if the alt key was down.

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

True if the command key was down.

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

True if the control key was down.

Key clan::KeyEvent::key ( ) const
inline

Key relevant for the event.

Pointf clan::KeyEvent::pointer_pos ( View view) const

Cursor position returned in local content coordinates for the view specified.

int clan::KeyEvent::repeat_count ( ) const
inline

Key press repeat counter for key being held down.

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

True if the shift key was down.

const std::string& clan::KeyEvent::text ( ) const
inline

Unicode characters generated by this event.

KeyEventType clan::KeyEvent::type ( ) const
inline

Key event type.


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