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;
115extern CGV_API
void stream_in_toggle_keys(std::istream& is,
unsigned char& toggle_keys);
123#include <cgv/config/lib_end.h>
double get_time() const
return the time of the event in seconds
void set_toggle_keys(unsigned char _toggle_keys)
set the state of the toggle keys
void set_modifiers(unsigned char _modifiers)
set the modifiers
virtual void * get_device_id() const
return the device id, by default returns 0
unsigned get_kind() const
return, what kind of event this is, typically a value from the EventId enum
unsigned char get_toggle_keys() const
return the state of the toggle keys as values from EventToggleKeys combined with a logical or-operati...
virtual void stream_out(std::ostream &os) const
write to stream
unsigned char kind
store which kind of event we have
unsigned char toggle_keys
store the active toggle keys
void set_kind(unsigned char _kind)
set the kind of the event
unsigned char modifiers
store the active modifiers
unsigned get_flags() const
return the event flags
double time
store the time of the event in seconds
unsigned char flags
store event flags
unsigned char get_modifiers() const
return the active modifiers as values from EventModifier combined with a logical or-operation
virtual void stream_in(std::istream &is)
read from stream
void set_flags(unsigned char _flags)
return the set the event flags
event(unsigned int _kind=EID_NONE, unsigned char _modifiers=0, unsigned char _toggle_keys=0, double _time=0)
construct event from its kind
void set_time(const double &_time)
set the time of the event
namespace that holds the abstract gui interface
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
this header is dependency free