Panda3D
pgMouseWatcherGroup.cxx
1 // Filename: pgMouseWatcherGroup.cxx
2 // Created by: drose (09Jul01)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #include "pgMouseWatcherGroup.h"
16 #include "pgTop.h"
17 
18 TypeHandle PGMouseWatcherGroup::_type_handle;
19 
20 ////////////////////////////////////////////////////////////////////
21 // Function: PGMouseWatcherGroup::Destructor
22 // Access: Public, Virtual
23 // Description:
24 ////////////////////////////////////////////////////////////////////
25 PGMouseWatcherGroup::
26 ~PGMouseWatcherGroup() {
27  // When the MouseWatcherGroup destructs for whatever reason, the
28  // PGTop object should lose its MouseWatcher.
29  if (_top != (PGTop *)NULL) {
30  _top->_watcher_group = (PGMouseWatcherGroup *)NULL;
31  _top->set_mouse_watcher((MouseWatcher *)NULL);
32  }
33 }
The "top" node of the new Panda GUI system.
Definition: pgTop.h:43
This TFormer maintains a list of rectangular regions on the screen that are considered special mouse ...
Definition: mouseWatcher.h:68
This is a specialization on MouseWatcherGroup, to associate it with a PGTop.
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85
void set_mouse_watcher(MouseWatcher *watcher)
Sets the MouseWatcher pointer that the PGTop object registers its PG items with.
Definition: pgTop.cxx:158