14#ifndef MOUSEWATCHERBASE_H
15#define MOUSEWATCHERBASE_H
32class EXPCL_PANDA_TFORM MouseWatcherBase {
35 virtual ~MouseWatcherBase();
53 void output(std::ostream &out)
const;
54 void write(std::ostream &out,
int indent_level = 0)
const;
56#if !defined(NDEBUG) || !defined(CPPPARSER)
58 const std::string &bin_name,
int draw_order);
66 void do_sort_regions();
70 virtual void do_show_regions(
const NodePath &render2d,
71 const std::string &bin_name,
int draw_order);
72 virtual void do_hide_regions();
73 void do_update_regions();
97 Vizzes _vizzes_disabled;
98 bool _show_regions_disabled =
false;
99 NodePath _show_regions_root_disabled;
100 LColor _color_disabled;
107 static void init_type() {
112 static TypeHandle _type_handle;
114 friend class MouseWatcher;
115 friend class BlobWatcher;
This is a standard, non-reentrant mutex, similar to the Mutex class.
bool remove_region(MouseWatcherRegion *region)
Removes the indicated region from the group.
get_num_regions
Returns the number of regions in the group.
is_sorted
Returns true if the group has already been sorted, false otherwise.
void clear_regions()
Removes all the regions from the group.
void add_region(PT(MouseWatcherRegion) region)
Adds the indicated region to the set of regions in the group.
void show_regions(const NodePath &render2d, const std::string &bin_name, int draw_order)
Enables the visualization of all of the regions handled by this MouseWatcherBase.
void sort_regions()
Sorts all the regions in this group into pointer order.
MouseWatcherRegion * find_region(const std::string &name) const
Returns a pointer to the first region found with the indicated name.
get_region
Returns the nth region of the group; returns NULL if there is no nth region.
void set_color(const LColor &color)
Specifies the color used to draw the region rectangles for the regions visualized by show_regions().
void update_regions()
Refreshes the visualization created by show_regions().
void hide_regions()
Stops the visualization created by a previous call to show_regions().
bool has_region(MouseWatcherRegion *region) const
Returns true if the indicated region has already been added to the MouseWatcherBase,...
This is the class that defines a rectangular region on the screen for the MouseWatcher.
NodePath is the fundamental system for disambiguating instances, and also provides a higher-level int...
A basic node of the scene graph or data graph.
TypeHandle is the identifier used to differentiate C++ class types.
A specialization of ordered_vector that emulates a standard STL set: one copy of each element is allo...
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.
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(),...