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);
37 ChoiceEventType get_type() const;
39 void set_type(ChoiceEventType _type);
40 };
41
42 }
43}
44
45#include <cgv/config/lib_end.h>
class to represent choice events that include focus change and selection change events
ChoiceEventType type
store type of choice event
ChoiceEventType
different choice event types
std::string get_choice_type_string(ChoiceEventType type)
convert a choice event type into a readable string
the cgv namespace
Definition print.h:11