Panda3D
pgMouseWatcherGroup.h
Go to the documentation of this file.
1 /**
2  * PANDA 3D SOFTWARE
3  * Copyright (c) Carnegie Mellon University. All rights reserved.
4  *
5  * All use of this software is subject to the terms of the revised BSD
6  * license. You should have received a copy of this license along
7  * with this source code in a file named "LICENSE."
8  *
9  * @file pgMouseWatcherGroup.h
10  * @author drose
11  * @date 2001-07-09
12  */
13 
14 #ifndef PGMOUSEWATCHERGROUP_H
15 #define PGMOUSEWATCHERGROUP_H
16 
17 #include "pandabase.h"
18 
19 #include "mouseWatcherGroup.h"
20 #include "pointerTo.h"
21 
22 class PGTop;
23 
24 /**
25  * This is a specialization on MouseWatcherGroup, to associate it with a
26  * PGTop. Originally we had PGTop multiply inheriting from NamedNode and
27  * MouseWatcherGroup, but this causes problems with circular reference counts.
28  */
29 class EXPCL_PANDA_PGUI PGMouseWatcherGroup : public MouseWatcherGroup {
30 public:
31  INLINE PGMouseWatcherGroup(PGTop *top);
32  virtual ~PGMouseWatcherGroup();
33 
34  INLINE void clear_top(PGTop *top);
35 
36 private:
37  PGTop *_top;
38 
39 public:
40  static TypeHandle get_class_type() {
41  return _type_handle;
42  }
43  static void init_type() {
44  MouseWatcherGroup::init_type();
45  register_type(_type_handle, "PGMouseWatcherGroup",
46  MouseWatcherGroup::get_class_type());
47  }
48  virtual TypeHandle get_type() const {
49  return get_class_type();
50  }
51  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
52 
53 private:
54  static TypeHandle _type_handle;
55 };
56 
57 #include "pgMouseWatcherGroup.I"
58 
59 #endif
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.
The "top" node of the new Panda GUI system.
Definition: pgTop.h:38
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:81
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(),...
Definition: register_type.I:22