cgv
Loading...
Searching...
No Matches
choice_event.h
1#pragma once
2
3#include "event.h"
4#include "shortcut.h"
5
6#include "lib_begin.h"
7
8namespace cgv {
9 namespace gui {
10
13 {
14 CET_GRAB_FOCUS,
15 CET_LOOSE_FOCUS,
16 CET_SELECTED,
17 CET_UNSELECTED
18 };
19
21 extern CGV_API std::string get_choice_type_string(ChoiceEventType type);
22
24 class CGV_API choice_event : public event
25 {
26 protected:
29 public:
31 choice_event(ChoiceEventType _type, unsigned char _modifiers = 0, unsigned char _toggle_keys = 0, double _time = 0);
33 void stream_out(std::ostream& os) const;
35 void stream_in(std::istream& is);
39 void set_type(ChoiceEventType _type);
40 };
41
42 }
43}
44
45#include <cgv/config/lib_end.h>
ChoiceEventType get_type() const
return whether type of choice event
ChoiceEventType type
store type of choice event
void stream_out(std::ostream &os) const
write to stream
void set_type(ChoiceEventType _type)
set the type of the choice event
void stream_in(std::istream &is)
read from stream
choice_event(ChoiceEventType _type, unsigned char _modifiers=0, unsigned char _toggle_keys=0, double _time=0)
construct a choice
event(unsigned int _kind=EID_NONE, unsigned char _modifiers=0, unsigned char _toggle_keys=0, double _time=0)
construct event from its kind
Definition event.cxx:20
namespace that holds the abstract gui interface
Definition vr_calib.cxx:10
ChoiceEventType
different choice event types
std::string get_choice_type_string(ChoiceEventType type)
convert a choice event type into a readable string
namespace for compile time type information
Definition bool32_t.h:7
this header is dependency free
Definition print.h:11