TDME2 1.9.121
Public Types | Public Member Functions | Static Public Attributes | Private Attributes | Friends | List of all members
GUIKeyboardEvent Class Referencefinal

GUI keyboard event. More...

#include <tdme/gui/events/GUIKeyboardEvent.h>

Collaboration diagram for GUIKeyboardEvent:
Collaboration graph

Public Types

enum  GUIKeyboardEventType { KEYBOARDEVENT_NONE , KEYBOARDEVENT_KEY_PRESSED , KEYBOARDEVENT_KEY_RELEASED , KEYBOARDEVENT_KEY_TYPED }
 

Public Member Functions

 GUIKeyboardEvent ()
 Public constructor. More...
 
 ~GUIKeyboardEvent ()
 Destructor. More...
 
int64_t getTime ()
 
void setTime (int64_t time)
 Time in milliseconds. More...
 
GUIKeyboardEventType getType ()
 
void setType (GUIKeyboardEventType type)
 Set type. More...
 
int32_t getKeyCode ()
 
void setKeyCode (int32_t code)
 Set key code. More...
 
char getKeyChar ()
 
void setKeyChar (char keyChar)
 Set key char. More...
 
bool isMetaDown ()
 
void setMetaDown (bool metaDown)
 Set meta down. More...
 
bool isControlDown ()
 
void setControlDown (bool controlDown)
 Set control down. More...
 
bool isAltDown ()
 
void setAltDown (bool altDown)
 Set alt down. More...
 
bool isShiftDown ()
 
void setShiftDown (bool shiftDown)
 Set shift down. More...
 
bool isProcessed ()
 
void setProcessed (bool processed)
 Set event processed. More...
 

Static Public Attributes

static constexpr int32_t KEYCODE_TAB { KEYBOARD_KEYCODE_TAB }
 
static constexpr int32_t KEYCODE_TAB_SHIFT { KEYBOARD_KEYCODE_TAB_SHIFT }
 
static constexpr int32_t KEYCODE_BACKSPACE { KEYBOARD_KEYCODE_BACKSPACE }
 
static constexpr int32_t KEYCODE_RETURN { KEYBOARD_KEYCODE_RETURN }
 
static constexpr int32_t KEYCODE_DELETE { KEYBOARD_KEYCODE_DELETE }
 
static constexpr int32_t KEYCODE_SPACE { KEYBOARD_KEYCODE_SPACE }
 
static constexpr int32_t KEYCODE_LEFT { KEYBOARD_KEYCODE_LEFT }
 
static constexpr int32_t KEYCODE_UP { KEYBOARD_KEYCODE_UP }
 
static constexpr int32_t KEYCODE_RIGHT { KEYBOARD_KEYCODE_RIGHT }
 
static constexpr int32_t KEYCODE_DOWN { KEYBOARD_KEYCODE_DOWN }
 
static constexpr int32_t KEYCODE_POS1 { KEYBOARD_KEYCODE_POS1 }
 
static constexpr int32_t KEYCODE_END { KEYBOARD_KEYCODE_END }
 
static constexpr int32_t KEYCODE_ESCAPE { KEYBOARD_KEYCODE_ESCAPE }
 
static constexpr int32_t KEYCODE_F1 { KEYBOARD_KEYCODE_F1 }
 
static constexpr int32_t KEYCODE_F2 { KEYBOARD_KEYCODE_F2 }
 
static constexpr int32_t KEYCODE_F3 { KEYBOARD_KEYCODE_F3 }
 
static constexpr int32_t KEYCODE_F4 { KEYBOARD_KEYCODE_F4 }
 
static constexpr int32_t KEYCODE_F5 { KEYBOARD_KEYCODE_F5 }
 
static constexpr int32_t KEYCODE_F6 { KEYBOARD_KEYCODE_F6 }
 
static constexpr int32_t KEYCODE_F7 { KEYBOARD_KEYCODE_F7 }
 
static constexpr int32_t KEYCODE_F8 { KEYBOARD_KEYCODE_F8 }
 
static constexpr int32_t KEYCODE_F9 { KEYBOARD_KEYCODE_F9 }
 
static constexpr int32_t KEYCODE_F10 { KEYBOARD_KEYCODE_F10 }
 
static constexpr int32_t KEYCODE_F11 { KEYBOARD_KEYCODE_F11 }
 
static constexpr int32_t KEYCODE_F12 { KEYBOARD_KEYCODE_F12 }
 
static constexpr int32_t KEYCODE_LEFT_ALT { KEYBOARD_KEYCODE_LEFT_ALT }
 
static constexpr int32_t KEYCODE_LEFT_CONTROL { KEYBOARD_KEYCODE_LEFT_CTRL }
 
static constexpr int32_t KEYCODE_LEFT_SHIFT { KEYBOARD_KEYCODE_LEFT_SHIFT }
 
static constexpr int32_t KEYCODE_RIGHT_ALT { KEYBOARD_KEYCODE_RIGHT_ALT }
 
static constexpr int32_t KEYCODE_RIGHT_CONTROL { KEYBOARD_KEYCODE_RIGHT_CTRL }
 
static constexpr int32_t KEYCODE_RIGHT_SHIFT { KEYBOARD_KEYCODE_RIGHT_SHIFT }
 

Private Attributes

int64_t time
 
GUIKeyboardEventType type { KEYBOARDEVENT_NONE }
 
int32_t keyCode
 
char keyChar
 
bool metaDown
 
bool controlDown
 
bool altDown
 
bool shiftDown
 
bool processed
 

Friends

class GUIKeyboardEvent_Type
 

Detailed Description

GUI keyboard event.

Author
Andreas Drewke
Version
$Id$

Definition at line 12 of file GUIKeyboardEvent.h.

Member Enumeration Documentation

◆ GUIKeyboardEventType

Enumerator
KEYBOARDEVENT_NONE 
KEYBOARDEVENT_KEY_PRESSED 
KEYBOARDEVENT_KEY_RELEASED 
KEYBOARDEVENT_KEY_TYPED 

Definition at line 48 of file GUIKeyboardEvent.h.

Constructor & Destructor Documentation

◆ GUIKeyboardEvent()

Public constructor.

Definition at line 6 of file GUIKeyboardEvent.cpp.

◆ ~GUIKeyboardEvent()

Destructor.

Definition at line 19 of file GUIKeyboardEvent.cpp.

Member Function Documentation

◆ getKeyChar()

char getKeyChar ( )
inline
Returns
key char

Definition at line 125 of file GUIKeyboardEvent.h.

◆ getKeyCode()

int32_t getKeyCode ( )
inline
Returns
key code

Definition at line 110 of file GUIKeyboardEvent.h.

◆ getTime()

int64_t getTime ( )
inline
Returns
time in milliseconds

Definition at line 80 of file GUIKeyboardEvent.h.

◆ getType()

GUIKeyboardEventType getType ( )
inline
Returns
type

Definition at line 95 of file GUIKeyboardEvent.h.

◆ isAltDown()

bool isAltDown ( )
inline
Returns
is alt down

Definition at line 170 of file GUIKeyboardEvent.h.

◆ isControlDown()

bool isControlDown ( )
inline
Returns
control down

Definition at line 155 of file GUIKeyboardEvent.h.

◆ isMetaDown()

bool isMetaDown ( )
inline
Returns
is meta down

Definition at line 140 of file GUIKeyboardEvent.h.

◆ isProcessed()

bool isProcessed ( )
inline
Returns
event has been processed already

Definition at line 200 of file GUIKeyboardEvent.h.

◆ isShiftDown()

bool isShiftDown ( )
inline
Returns
is shift down

Definition at line 185 of file GUIKeyboardEvent.h.

◆ setAltDown()

void setAltDown ( bool  altDown)
inline

Set alt down.

Parameters
altDownalt down

Definition at line 178 of file GUIKeyboardEvent.h.

◆ setControlDown()

void setControlDown ( bool  controlDown)
inline

Set control down.

Parameters
controlDowncontrol down

Definition at line 163 of file GUIKeyboardEvent.h.

◆ setKeyChar()

void setKeyChar ( char  keyChar)
inline

Set key char.

Parameters
keyCharkey char

Definition at line 133 of file GUIKeyboardEvent.h.

◆ setKeyCode()

void setKeyCode ( int32_t  code)
inline

Set key code.

Parameters
codecode

Definition at line 118 of file GUIKeyboardEvent.h.

◆ setMetaDown()

void setMetaDown ( bool  metaDown)
inline

Set meta down.

Parameters
metaDownmeta down

Definition at line 148 of file GUIKeyboardEvent.h.

◆ setProcessed()

void setProcessed ( bool  processed)
inline

Set event processed.

Parameters
processedprocessed

Definition at line 208 of file GUIKeyboardEvent.h.

◆ setShiftDown()

void setShiftDown ( bool  shiftDown)
inline

Set shift down.

Parameters
shiftDownshiftDown

Definition at line 193 of file GUIKeyboardEvent.h.

◆ setTime()

void setTime ( int64_t  time)
inline

Time in milliseconds.

Parameters
timetime

Definition at line 88 of file GUIKeyboardEvent.h.

◆ setType()

void setType ( GUIKeyboardEventType  type)
inline

Set type.

Parameters
typetype

Definition at line 103 of file GUIKeyboardEvent.h.

Friends And Related Function Documentation

◆ GUIKeyboardEvent_Type

friend class GUIKeyboardEvent_Type
friend

Definition at line 213 of file GUIKeyboardEvent.h.

Member Data Documentation

◆ altDown

bool altDown
private

Definition at line 62 of file GUIKeyboardEvent.h.

◆ controlDown

bool controlDown
private

Definition at line 61 of file GUIKeyboardEvent.h.

◆ keyChar

char keyChar
private

Definition at line 59 of file GUIKeyboardEvent.h.

◆ keyCode

int32_t keyCode
private

Definition at line 58 of file GUIKeyboardEvent.h.

◆ KEYCODE_BACKSPACE

constexpr int32_t KEYCODE_BACKSPACE { KEYBOARD_KEYCODE_BACKSPACE }
staticconstexpr

Definition at line 18 of file GUIKeyboardEvent.h.

◆ KEYCODE_DELETE

constexpr int32_t KEYCODE_DELETE { KEYBOARD_KEYCODE_DELETE }
staticconstexpr

Definition at line 20 of file GUIKeyboardEvent.h.

◆ KEYCODE_DOWN

constexpr int32_t KEYCODE_DOWN { KEYBOARD_KEYCODE_DOWN }
staticconstexpr

Definition at line 25 of file GUIKeyboardEvent.h.

◆ KEYCODE_END

constexpr int32_t KEYCODE_END { KEYBOARD_KEYCODE_END }
staticconstexpr

Definition at line 27 of file GUIKeyboardEvent.h.

◆ KEYCODE_ESCAPE

constexpr int32_t KEYCODE_ESCAPE { KEYBOARD_KEYCODE_ESCAPE }
staticconstexpr

Definition at line 28 of file GUIKeyboardEvent.h.

◆ KEYCODE_F1

constexpr int32_t KEYCODE_F1 { KEYBOARD_KEYCODE_F1 }
staticconstexpr

Definition at line 29 of file GUIKeyboardEvent.h.

◆ KEYCODE_F10

constexpr int32_t KEYCODE_F10 { KEYBOARD_KEYCODE_F10 }
staticconstexpr

Definition at line 38 of file GUIKeyboardEvent.h.

◆ KEYCODE_F11

constexpr int32_t KEYCODE_F11 { KEYBOARD_KEYCODE_F11 }
staticconstexpr

Definition at line 39 of file GUIKeyboardEvent.h.

◆ KEYCODE_F12

constexpr int32_t KEYCODE_F12 { KEYBOARD_KEYCODE_F12 }
staticconstexpr

Definition at line 40 of file GUIKeyboardEvent.h.

◆ KEYCODE_F2

constexpr int32_t KEYCODE_F2 { KEYBOARD_KEYCODE_F2 }
staticconstexpr

Definition at line 30 of file GUIKeyboardEvent.h.

◆ KEYCODE_F3

constexpr int32_t KEYCODE_F3 { KEYBOARD_KEYCODE_F3 }
staticconstexpr

Definition at line 31 of file GUIKeyboardEvent.h.

◆ KEYCODE_F4

constexpr int32_t KEYCODE_F4 { KEYBOARD_KEYCODE_F4 }
staticconstexpr

Definition at line 32 of file GUIKeyboardEvent.h.

◆ KEYCODE_F5

constexpr int32_t KEYCODE_F5 { KEYBOARD_KEYCODE_F5 }
staticconstexpr

Definition at line 33 of file GUIKeyboardEvent.h.

◆ KEYCODE_F6

constexpr int32_t KEYCODE_F6 { KEYBOARD_KEYCODE_F6 }
staticconstexpr

Definition at line 34 of file GUIKeyboardEvent.h.

◆ KEYCODE_F7

constexpr int32_t KEYCODE_F7 { KEYBOARD_KEYCODE_F7 }
staticconstexpr

Definition at line 35 of file GUIKeyboardEvent.h.

◆ KEYCODE_F8

constexpr int32_t KEYCODE_F8 { KEYBOARD_KEYCODE_F8 }
staticconstexpr

Definition at line 36 of file GUIKeyboardEvent.h.

◆ KEYCODE_F9

constexpr int32_t KEYCODE_F9 { KEYBOARD_KEYCODE_F9 }
staticconstexpr

Definition at line 37 of file GUIKeyboardEvent.h.

◆ KEYCODE_LEFT

constexpr int32_t KEYCODE_LEFT { KEYBOARD_KEYCODE_LEFT }
staticconstexpr

Definition at line 22 of file GUIKeyboardEvent.h.

◆ KEYCODE_LEFT_ALT

constexpr int32_t KEYCODE_LEFT_ALT { KEYBOARD_KEYCODE_LEFT_ALT }
staticconstexpr

Definition at line 41 of file GUIKeyboardEvent.h.

◆ KEYCODE_LEFT_CONTROL

constexpr int32_t KEYCODE_LEFT_CONTROL { KEYBOARD_KEYCODE_LEFT_CTRL }
staticconstexpr

Definition at line 42 of file GUIKeyboardEvent.h.

◆ KEYCODE_LEFT_SHIFT

constexpr int32_t KEYCODE_LEFT_SHIFT { KEYBOARD_KEYCODE_LEFT_SHIFT }
staticconstexpr

Definition at line 43 of file GUIKeyboardEvent.h.

◆ KEYCODE_POS1

constexpr int32_t KEYCODE_POS1 { KEYBOARD_KEYCODE_POS1 }
staticconstexpr

Definition at line 26 of file GUIKeyboardEvent.h.

◆ KEYCODE_RETURN

constexpr int32_t KEYCODE_RETURN { KEYBOARD_KEYCODE_RETURN }
staticconstexpr

Definition at line 19 of file GUIKeyboardEvent.h.

◆ KEYCODE_RIGHT

constexpr int32_t KEYCODE_RIGHT { KEYBOARD_KEYCODE_RIGHT }
staticconstexpr

Definition at line 24 of file GUIKeyboardEvent.h.

◆ KEYCODE_RIGHT_ALT

constexpr int32_t KEYCODE_RIGHT_ALT { KEYBOARD_KEYCODE_RIGHT_ALT }
staticconstexpr

Definition at line 44 of file GUIKeyboardEvent.h.

◆ KEYCODE_RIGHT_CONTROL

constexpr int32_t KEYCODE_RIGHT_CONTROL { KEYBOARD_KEYCODE_RIGHT_CTRL }
staticconstexpr

Definition at line 45 of file GUIKeyboardEvent.h.

◆ KEYCODE_RIGHT_SHIFT

constexpr int32_t KEYCODE_RIGHT_SHIFT { KEYBOARD_KEYCODE_RIGHT_SHIFT }
staticconstexpr

Definition at line 46 of file GUIKeyboardEvent.h.

◆ KEYCODE_SPACE

constexpr int32_t KEYCODE_SPACE { KEYBOARD_KEYCODE_SPACE }
staticconstexpr

Definition at line 21 of file GUIKeyboardEvent.h.

◆ KEYCODE_TAB

constexpr int32_t KEYCODE_TAB { KEYBOARD_KEYCODE_TAB }
staticconstexpr

Definition at line 16 of file GUIKeyboardEvent.h.

◆ KEYCODE_TAB_SHIFT

constexpr int32_t KEYCODE_TAB_SHIFT { KEYBOARD_KEYCODE_TAB_SHIFT }
staticconstexpr

Definition at line 17 of file GUIKeyboardEvent.h.

◆ KEYCODE_UP

constexpr int32_t KEYCODE_UP { KEYBOARD_KEYCODE_UP }
staticconstexpr

Definition at line 23 of file GUIKeyboardEvent.h.

◆ metaDown

bool metaDown
private

Definition at line 60 of file GUIKeyboardEvent.h.

◆ processed

bool processed
private

Definition at line 64 of file GUIKeyboardEvent.h.

◆ shiftDown

bool shiftDown
private

Definition at line 63 of file GUIKeyboardEvent.h.

◆ time

int64_t time
private

Definition at line 56 of file GUIKeyboardEvent.h.

◆ type

Definition at line 57 of file GUIKeyboardEvent.h.


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