This represents a collection of MouseWatcherRegions that may be managed as a group. The implementation for this is in MouseWatcherBase; this class exists so that we can inherit from ReferenceCount.
More...
|
Public Member Functions inherited from MouseWatcherBase |
| addRegion (MouseWatcherRegion region) |
| 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. More...
|
|
| clearRegions () |
| Removes all the regions from the group. More...
|
|
MouseWatcherRegion | findRegion (str name) |
| 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. More...
|
|
int | getNumRegions () |
| Returns the number of regions in the group. More...
|
|
MouseWatcherRegion | getRegion (int n) |
| 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. More...
|
|
list | getRegions () |
|
bool | hasRegion (MouseWatcherRegion region) |
| Returns true if the indicated region has already been added to the MouseWatcherBase, false otherwise. More...
|
|
| hideRegions () |
| Stops the visualization created by a previous call to show_regions(). More...
|
|
bool | isSorted () |
| Returns true if the group has already been sorted, false otherwise. More...
|
|
| output (Ostream out) |
|
bool | removeRegion (MouseWatcherRegion region) |
| 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. More...
|
|
| setColor (const LColor color) |
| Specifies the color used to draw the region rectangles for the regions visualized by show_regions(). More...
|
|
| showRegions (const NodePath render2d, str bin_name, int draw_order) |
| Enables the visualization of all of the regions handled by this MouseWatcherBase. The supplied NodePath should be the root of the 2-d scene graph for the window. More...
|
|
| sortRegions () |
| Sorts all the regions in this group into pointer order. More...
|
|
| updateRegions () |
| Refreshes the visualization created by show_regions(). More...
|
|
| write (Ostream out, int indent_level) |
|
Public Member Functions inherited from ReferenceCount |
int | getRefCount () |
| Returns the current reference count. More...
|
|
| ref () |
| Explicitly increments the reference count. User code should avoid using ref() and unref() directly, which can result in missed reference counts. Instead, let a PointerTo object manage the reference counting automatically. More...
|
|
bool | testRefCountIntegrity () |
| Does some easy checks to make sure that the reference count isn't completely bogus. Returns true if ok, false otherwise. More...
|
|
bool | testRefCountNonzero () |
| Does some easy checks to make sure that the reference count isn't zero, or completely bogus. Returns true if ok, false otherwise. More...
|
|
bool | unref () |
| Explicitly decrements the reference count. Note that the object will not be implicitly deleted by unref() simply because the reference count drops to zero. (Having a member function delete itself is problematic.) However, see the helper function unref_delete(). More...
|
|
This represents a collection of MouseWatcherRegions that may be managed as a group. The implementation for this is in MouseWatcherBase; this class exists so that we can inherit from ReferenceCount.