Input event class. More...

#include <input_event.h>

Public Types

enum  Type {
  no_key = 0, pressed = 1, released = 2, doubleclick = 3,
  pointer_moved = 4, axis_moved = 5, proximity_change = 6
}
 Event types. More...
 

Public Member Functions

 InputEvent ()
 Constructs a 'NoKey' key. More...
 
 ~InputEvent ()
 

Public Attributes

bool alt
 State of modifier keys. More...
 
double axis_pos
 Axis position. More...
 
bool ctrl
 
InputDevice device
 Device that event originates from. More...
 
InputCode id
 The exact input. More...
 
int id_offset
 Contains the value (0 to x) for certains InputCode types that have a variable output identifier (for example, joystick button identifers, or joystick axis...) More...
 
Point mouse_device_pos
 Mouse actual position at event time. More...
 
Pointf mouse_pos
 Mouse position at event time. More...
 
int repeat_count
 The repeat count for this event. Contains the number of times the keystroke has auto-repeated as a result of the user holding down the key. More...
 
bool shift
 
std::string str
 Character sequence generated by event. A key press can generate one, none or multiple characters. The reason for this are deadkeys, i.e. press ^ + a and get ^; the first press would generate no key and the second one, in case that the second key being pressed doesn't support the ^ it would generate two characters (i.e. ^ + 5 => "", "^5") More...
 
Type type
 Event type. More...
 

Detailed Description

Input event class.

Member Enumeration Documentation

◆ Type

Event types.

Enumerator
no_key 
pressed 
released 
doubleclick 
pointer_moved 
axis_moved 
proximity_change 

Constructor & Destructor Documentation

◆ InputEvent()

clan::InputEvent::InputEvent ( )

Constructs a 'NoKey' key.

◆ ~InputEvent()

clan::InputEvent::~InputEvent ( )

Member Data Documentation

◆ alt

bool clan::InputEvent::alt

State of modifier keys.

◆ axis_pos

double clan::InputEvent::axis_pos

Axis position.

◆ ctrl

bool clan::InputEvent::ctrl

◆ device

InputDevice clan::InputEvent::device

Device that event originates from.

◆ id

InputCode clan::InputEvent::id

The exact input.

◆ id_offset

int clan::InputEvent::id_offset

Contains the value (0 to x) for certains InputCode types that have a variable output identifier (for example, joystick button identifers, or joystick axis...)

◆ mouse_device_pos

Point clan::InputEvent::mouse_device_pos

Mouse actual position at event time.

◆ mouse_pos

Pointf clan::InputEvent::mouse_pos

Mouse position at event time.

◆ repeat_count

int clan::InputEvent::repeat_count

The repeat count for this event. Contains the number of times the keystroke has auto-repeated as a result of the user holding down the key.

◆ shift

bool clan::InputEvent::shift

◆ str

std::string clan::InputEvent::str

Character sequence generated by event. A key press can generate one, none or multiple characters. The reason for this are deadkeys, i.e. press ^ + a and get ^; the first press would generate no key and the second one, in case that the second key being pressed doesn't support the ^ it would generate two characters (i.e. ^ + 5 => "", "^5")

◆ type

Type clan::InputEvent::type

Event type.


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