|
cgv
|
class to represent choice events that include focus change and selection change events More...
#include <choice_event.h>
Public Member Functions | |
| choice_event (ChoiceEventType _type, unsigned char _modifiers=0, unsigned char _toggle_keys=0, double _time=0) | |
| construct a choice | |
| void | stream_out (std::ostream &os) const |
| write to stream | |
| void | stream_in (std::istream &is) |
| read from stream | |
| ChoiceEventType | get_type () const |
| return whether type of choice event | |
| void | set_type (ChoiceEventType _type) |
| set the type of the choice event | |
Public Member Functions inherited from cgv::gui::event | |
| event (unsigned int _kind=EID_NONE, unsigned char _modifiers=0, unsigned char _toggle_keys=0, double _time=0) | |
| construct event from its kind | |
| virtual | ~event () |
| virtual destructor for events | |
| virtual void * | get_device_id () const |
| return the device id, by default returns 0 | |
| void | set_kind (unsigned char _kind) |
| set the kind of the event | |
| unsigned | get_kind () const |
| return, what kind of event this is, typically a value from the EventId enum | |
| void | set_flags (unsigned char _flags) |
| return the set the event flags | |
| unsigned | get_flags () const |
| return the event flags | |
| void | set_modifiers (unsigned char _modifiers) |
| set the modifiers | |
| unsigned char | get_modifiers () const |
| return the active modifiers as values from EventModifier combined with a logical or-operation | |
| void | set_toggle_keys (unsigned char _toggle_keys) |
| set the state of the toggle keys | |
| unsigned char | get_toggle_keys () const |
| return the state of the toggle keys as values from EventToggleKeys combined with a logical or-operation | |
| void | set_time (const double &_time) |
| set the time of the event | |
| double | get_time () const |
| return the time of the event in seconds | |
Protected Attributes | |
| ChoiceEventType | type |
| store type of choice event | |
Protected Attributes inherited from cgv::gui::event | |
| unsigned char | kind |
| store which kind of event we have | |
| unsigned char | flags |
| store event flags | |
| unsigned char | modifiers |
| store the active modifiers | |
| unsigned char | toggle_keys |
| store the active toggle keys | |
| double | time |
| store the time of the event in seconds | |
class to represent choice events that include focus change and selection change events
Definition at line 24 of file choice_event.h.
| cgv::gui::choice_event::choice_event | ( | ChoiceEventType | _type, |
| unsigned char | _modifiers = 0, |
||
| unsigned char | _toggle_keys = 0, |
||
| double | _time = 0 |
||
| ) |
construct a choice
Definition at line 18 of file choice_event.cxx.
| ChoiceEventType cgv::gui::choice_event::get_type | ( | ) | const |
return whether type of choice event
return whether focus was grabbed
Definition at line 36 of file choice_event.cxx.
References type.
| void cgv::gui::choice_event::set_type | ( | ChoiceEventType | _type | ) |
set the type of the choice event
set the key event action
Definition at line 42 of file choice_event.cxx.
References type.
Referenced by cgv::gui::vr_server::grab_focus().
|
virtual |
read from stream
Reimplemented from cgv::gui::event.
Definition at line 31 of file choice_event.cxx.
|
virtual |
write to stream
Reimplemented from cgv::gui::event.
Definition at line 24 of file choice_event.cxx.
References cgv::gui::get_choice_type_string(), cgv::gui::event::stream_out(), and type.
|
protected |
store type of choice event
Definition at line 28 of file choice_event.h.
Referenced by get_type(), set_type(), and stream_out().