14#ifndef BUTTONTHROWER_H
15#define BUTTONTHROWER_H
35class EXPCL_PANDA_TFORM ButtonThrower :
public DataNode {
37 explicit ButtonThrower(
const std::string &name);
65 INLINE
void set_prefix(
const std::string &prefix);
97 virtual void write(std::ostream &out,
int indent_level = 0)
const;
100 void do_specific_event(
const std::string &event_name,
double time);
101 void do_general_event(
const ButtonEvent &button_event,
102 const std::string &event_name);
105 std::string _button_down_event;
106 std::string _button_up_event;
107 std::string _button_repeat_event;
108 std::string _keystroke_event;
109 std::string _candidate_event;
110 std::string _move_event;
111 std::string _raw_button_up_event;
112 std::string _raw_button_down_event;
118 typedef pvector<EventParameter> ParameterList;
119 ParameterList _parameters;
121 typedef pvector<ModifierButtons> ThrowButtonDef;
122 typedef pmap<ButtonHandle, ThrowButtonDef> ThrowButtons;
123 ThrowButtons _throw_buttons;
124 bool _throw_buttons_active;
134 int _button_events_input;
137 int _button_events_output;
144 static void init_type() {
145 DataNode::init_type();
147 DataNode::get_class_type());
149 virtual TypeHandle get_type()
const {
150 return get_class_type();
152 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
155 static TypeHandle _type_handle;
This object supervises the traversal of the data graph and the moving of data from one DataNode to it...
Encapsulates the data generated from (or sent into) any particular DataNode.
An optional parameter associated with an event.
TypeHandle is the identifier used to differentiate C++ class types.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...