73 event(
unsigned int _kind = EID_NONE,
unsigned char _modifiers = 0,
unsigned char _toggle_keys = 0,
double _time = 0);
77 virtual void stream_out(std::ostream& os)
const;
79 virtual void stream_in(std::istream& is);
81 virtual void* get_device_id()
const;
83 void set_kind(
unsigned char _kind);
85 unsigned get_kind()
const;
88 void set_flags(
unsigned char _flags);
90 unsigned get_flags()
const;
92 void set_modifiers(
unsigned char _modifiers);
94 unsigned char get_modifiers()
const;
96 void set_toggle_keys(
unsigned char _toggle_keys);
98 unsigned char get_toggle_keys()
const;
100 void set_time(
const double& _time);
102 double get_time()
const;
115extern CGV_API
void stream_in_toggle_keys(std::istream& is,
unsigned char& toggle_keys);
123#include <cgv/config/lib_end.h>
unsigned char kind
store which kind of event we have
unsigned char toggle_keys
store the active toggle keys
unsigned char modifiers
store the active modifiers
double time
store the time of the event in seconds
unsigned char flags
store event flags
unsigned char stream_in_modifiers(std::istream &is)
read modifiers in string format from a stream and set the passed reference to EventModifier s ored to...
std::string get_modifier_string(EventModifier modifiers)
convert a modifier combination into a readable string ending on a '+' sign if not empty,...
unsigned char & ref_current_modifiers()
read out the current modifiers
EventToggleKeys
define constants for toggle keys
@ ETK_SCROLL_LOCK
scroll lock
EventModifier
define constants for event modifiers
@ EM_META
meta modifier (windows or mac key)
EventId
define the ids of the most common events
@ EID_NONE
undefined event id
@ EID_POSE
id for a 6D pose change events
@ EID_STICK
id of a stick event describing a two axis controller that optionally can be touched and pressed
@ EID_KEY
id for key event
@ EID_LIFETIME
id for nui life time
@ EID_MOUSE
id for mouse event
@ EID_ACTION
id for nui action events
@ EID_CHOICE
id for focus or selection change events
@ EID_THROTTLE
id of throttle event describing a one axis controller
@ EID_APPROACH
id for nui approach events
std::string get_toggle_keys_string(EventToggleKeys toggle_keys)
convert a toggle key combination into a readable string separated by '+' signs, i....
@ EF_DND
whether mouse has a drag and drop target attached
@ EF_MULTI
whether event is tagged with id of the device that generated the event
@ EF_NUI
whether event is nature user interface event
@ EF_VR
whether event is from VR kit
@ EF_PAD
whether event is from gamepad