Panda3D
 All Classes Functions Variables Enumerations
pgMouseWatcherGroup.h
1 // Filename: pgMouseWatcherGroup.h
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 #ifndef PGMOUSEWATCHERGROUP_H
16 #define PGMOUSEWATCHERGROUP_H
17 
18 #include "pandabase.h"
19 
20 #include "mouseWatcherGroup.h"
21 #include "pointerTo.h"
22 
23 class PGTop;
24 
25 ////////////////////////////////////////////////////////////////////
26 // Class : PGMouseWatcherGroup
27 // Description : This is a specialization on MouseWatcherGroup, to
28 // associate it with a PGTop. Originally we had PGTop
29 // multiply inheriting from NamedNode and
30 // MouseWatcherGroup, but this causes problems with
31 // circular reference counts.
32 ////////////////////////////////////////////////////////////////////
33 class EXPCL_PANDA_PGUI PGMouseWatcherGroup : public MouseWatcherGroup {
34 public:
35  INLINE PGMouseWatcherGroup(PGTop *top);
36  virtual ~PGMouseWatcherGroup();
37 
38  INLINE void clear_top(PGTop *top);
39 
40 private:
41  PGTop *_top;
42 
43 public:
44  static TypeHandle get_class_type() {
45  return _type_handle;
46  }
47  static void init_type() {
48  MouseWatcherGroup::init_type();
49  register_type(_type_handle, "PGMouseWatcherGroup",
50  MouseWatcherGroup::get_class_type());
51  }
52  virtual TypeHandle get_type() const {
53  return get_class_type();
54  }
55  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
56 
57 private:
58  static TypeHandle _type_handle;
59 };
60 
61 #include "pgMouseWatcherGroup.I"
62 
63 #endif
The "top" node of the new Panda GUI system.
Definition: pgTop.h:43
This represents a collection of MouseWatcherRegions that may be managed as a group.
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