32class EXPCL_PANDA_DEVICE VirtualMouse :
public DataNode {
34 explicit VirtualMouse(
const std::string &name);
44 int _mouse_x, _mouse_y;
45 int _win_width, _win_height;
57 int _pixel_size_output;
59 int _button_events_output;
61 PT(EventStoreVec2) _pixel_xy;
62 PT(EventStoreVec2) _pixel_size;
63 PT(EventStoreVec2) _xy;
71 static void init_type() {
72 DataNode::init_type();
74 DataNode::get_class_type());
77 return get_class_type();
79 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
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.
TypeHandle is the identifier used to differentiate C++ class types.
void set_window_size(int width, int height)
Sets the size of the "window" in which the mouse rolls.
void release_button(ButtonHandle button)
Simulates the button being released.
void set_mouse_pos(int x, int y)
Sets the current mouse pixel location, where (0,0) is the upper left, and (width-1,...
void set_mouse_on(bool flag)
Sets whether the mouse should appear to be within the window or not.
void press_button(ButtonHandle button)
Simulates a mouse or keyboard button being depressed.
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(),...