15 #ifndef BUTTONTHROWER_H
16 #define BUTTONTHROWER_H
18 #include "pandabase.h"
21 #include "modifierButtons.h"
22 #include "buttonEventList.h"
25 #include "eventParameter.h"
44 INLINE
void set_button_down_event(
const string &button_down_event);
45 INLINE
const string &get_button_down_event()
const;
46 INLINE
void set_button_up_event(
const string &button_up_event);
47 INLINE
const string &get_button_up_event()
const;
48 INLINE
void set_button_repeat_event(
const string &button_repeat_event);
49 INLINE
const string &get_button_repeat_event()
const;
50 INLINE
void set_keystroke_event(
const string &keystroke_event);
51 INLINE
const string &get_keystroke_event()
const;
52 INLINE
void set_candidate_event(
const string &candidate_event);
53 INLINE
const string &get_candidate_event()
const;
54 INLINE
void set_move_event(
const string &move_event);
55 INLINE
const string &get_move_event()
const;
56 INLINE
void set_raw_button_down_event(
const string &raw_button_down_event);
57 INLINE
const string &get_raw_button_down_event()
const;
58 INLINE
void set_raw_button_up_event(
const string &raw_button_up_event);
59 INLINE
const string &get_raw_button_up_event()
const;
61 INLINE
void set_prefix(
const string &prefix);
62 INLINE
const string &get_prefix()
const;
63 INLINE
void set_specific_flag(
bool specific_flag);
64 INLINE
bool get_specific_flag()
const;
66 INLINE
void set_time_flag(
bool time_flag);
67 INLINE
bool get_time_flag()
const;
70 int get_num_parameters()
const;
72 MAKE_SEQ(get_parameters, get_num_parameters, get_parameter);
77 INLINE
void set_throw_buttons_active(
bool flag);
78 INLINE
bool get_throw_buttons_active()
const;
84 void clear_throw_buttons();
87 virtual void write(ostream &out,
int indent_level = 0)
const;
90 void do_specific_event(
const string &event_name,
double time);
91 void do_general_event(
const ButtonEvent &button_event,
92 const string &event_name);
95 string _button_down_event;
96 string _button_up_event;
97 string _button_repeat_event;
98 string _keystroke_event;
99 string _candidate_event;
101 string _raw_button_up_event;
102 string _raw_button_down_event;
114 bool _throw_buttons_active;
124 int _button_events_input;
127 int _button_events_output;
134 static void init_type() {
135 DataNode::init_type();
136 register_type(_type_handle,
"ButtonThrower",
137 DataNode::get_class_type());
140 return get_class_type();
142 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
148 #include "buttonThrower.I"
The fundamental type of node for the data graph.
An optional parameter associated with an event.
TypeHandle is the identifier used to differentiate C++ class types.
Encapsulates the data generated from (or sent into) any particular DataNode.
This object supervises the traversal of the data graph and the moving of data from one DataNode to it...