Keyboard key event. More...
#include <key_event.h>
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. | |
bool | cmd_down () const |
True if the command key was down. | |
bool | ctrl_down () const |
True if the control key was down. | |
Key | key () const |
Key relevant for the event. | |
Pointf | pointer_pos (View *view) const |
Cursor position returned in local content coordinates for the view specified. | |
int | repeat_count () const |
Key press repeat counter for key being held down. | |
bool | shift_down () const |
True if the shift key was down. | |
const std::string & | text () const |
Unicode characters generated by this event. | |
KeyEventType | type () const |
Key event type. | |
![]() | |
virtual | ~EventUI () |
std::shared_ptr< View > | current_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< View > | target () |
The target view the event is fired for. | |
long long | timestamp () const |
Timestamp for event in milliseconds since 1970. | |
Keyboard key event.
|
inline |
References alt_down(), cmd_down(), ctrl_down(), key(), pointer_pos(), repeat_count(), shift_down(), text(), and type().
|
inline |
True if the alt key was down.
Referenced by KeyEvent().
|
inline |
True if the command key was down.
Referenced by KeyEvent().
|
inline |
True if the control key was down.
Referenced by KeyEvent().
|
inline |
Key relevant for the event.
Referenced by KeyEvent().
Cursor position returned in local content coordinates for the view specified.
References clan::EventUI::View.
Referenced by KeyEvent().
|
inline |
Key press repeat counter for key being held down.
Referenced by KeyEvent().
|
inline |
True if the shift key was down.
Referenced by KeyEvent().
|
inline |
Unicode characters generated by this event.
Referenced by KeyEvent().
|
inline |
Key event type.
Referenced by KeyEvent().