This represents a collection of MouseWatcherRegions that may be managed as a group. More...
#include "mouseWatcherGroup.h"
List of all members.
This represents a collection of MouseWatcherRegions that may be managed as a group.
Definition at line 32 of file mouseWatcherGroup.h.
Adds the indicated region to the set of regions in the group.
It is an error to add the same region to the set more than once.
Definition at line 55 of file mouseWatcherGroup.cxx.
Removes all the regions from the group.
Definition at line 146 of file mouseWatcherGroup.cxx.
References NodePath::node(), and PandaNode::remove_all_children().
[protected, virtual]
The protected implementation of hide_regions().
This assumes the lock is already held.
Reimplemented in MouseWatcher.
Definition at line 383 of file mouseWatcherGroup.cxx.
References NodePath::remove_node().
Referenced by do_show_regions(), hide_regions(), MouseWatcher::remove_group(), and MouseWatcher::replace_group().
[protected]
The internal implementation of remove_region(); assumes the lock is already held.
Definition at line 323 of file mouseWatcherGroup.cxx.
References NodePath::node(), and PandaNode::remove_child().
Referenced by remove_region(), and MouseWatcher::remove_region().
The protected implementation of show_regions().
Definition at line 365 of file mouseWatcherGroup.cxx.
References NodePath::attach_new_node(), do_hide_regions(), do_update_regions(), and NodePath::set_bin().
Referenced by MouseWatcher::replace_group(), and show_regions().
Sorts all the regions in this group into pointer order.
Assumes the lock is already held.
Definition at line 309 of file mouseWatcherGroup.cxx.
Referenced by MouseWatcher::remove_group(), MouseWatcher::replace_group(), and sort_regions().
Internally regenerates the show_regions() visualization.
Definition at line 399 of file mouseWatcherGroup.cxx.
References LightMutexDirect::debug_is_locked(), NodePath::node(), and PandaNode::remove_all_children().
Referenced by do_show_regions(), MouseWatcher::replace_group(), set_color(), and update_regions().
Returns a pointer to the first region found with the indicated name.
If multiple regions share the same name, the one that is returned is indeterminate.
Definition at line 126 of file mouseWatcherGroup.cxx.
Returns the number of regions in the group.
Definition at line 191 of file mouseWatcherGroup.cxx.
Returns the nth region of the group; returns NULL if there is no nth region.
Note that this is not thread-safe; another thread might have removed the nth region before you called this method.
Definition at line 206 of file mouseWatcherGroup.cxx.
Returns true if the indicated region has already been added to the MouseWatcherGroup, false otherwise.
Definition at line 89 of file mouseWatcherGroup.cxx.
Stops the visualization created by a previous call to show_regions().
Definition at line 281 of file mouseWatcherGroup.cxx.
References do_hide_regions().
Referenced by MouseWatcher::do_hide_regions().
Returns true if the group has already been sorted, false otherwise.
Definition at line 179 of file mouseWatcherGroup.cxx.
Removes the indicated region from the group.
Returns true if it was successfully removed, or false if it wasn't there in the first place.
Definition at line 113 of file mouseWatcherGroup.cxx.
References do_remove_region().
Specifies the color used to draw the region rectangles for the regions visualized by show_regions().
Definition at line 265 of file mouseWatcherGroup.cxx.
References do_update_regions().
Enables the visualization of all of the regions handled by this MouseWatcherGroup.
The supplied NodePath should be the root of the 2-d scene graph for the window.
Definition at line 250 of file mouseWatcherGroup.cxx.
References do_show_regions().
Referenced by MouseWatcher::add_group(), and MouseWatcher::do_show_regions().
Definition at line 167 of file mouseWatcherGroup.cxx.
References do_sort_regions().
Refreshes the visualization created by show_regions().
Definition at line 295 of file mouseWatcherGroup.cxx.