Panda3D
pgMouseWatcherParameter.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 pgMouseWatcherParameter.h
10  * @author drose
11  * @date 2001-07-05
12  */
13 
14 #ifndef PGMOUSEWATCHERPARAMETER_H
15 #define PGMOUSEWATCHERPARAMETER_H
16 
17 #include "pandabase.h"
18 
19 #include "mouseWatcherParameter.h"
21 
22 /**
23  * This specialization on MouseWatcherParameter allows us to tag on additional
24  * elements to events for the gui system, and also inherits from
25  * TypedWritableReferenceCount so we can attach this thing to an event.
26  */
28  // For now, this must inherit from TypedWritableReferenceCount on the left,
29  // because MSVC++ wants to make that base class be the one at the front of
30  // the structure, not MouseWatcherParameter for some reason, and interrogate
31  // assumes that whichever base class is on the left will be at the front of
32  // the structure.
33 public:
34  INLINE PGMouseWatcherParameter();
36  INLINE void operator = (const MouseWatcherParameter &copy);
37  virtual ~PGMouseWatcherParameter();
38 
39 PUBLISHED:
40  void output(std::ostream &out) const;
41 
42 public:
43  static TypeHandle get_class_type() {
44  return _type_handle;
45  }
46  static void init_type() {
47  TypedWritableReferenceCount::init_type();
48  register_type(_type_handle, "PGMouseWatcherParameter",
49  TypedWritableReferenceCount::get_class_type());
50  }
51  virtual TypeHandle get_type() const {
52  return get_class_type();
53  }
54  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
55 
56 private:
57  static TypeHandle _type_handle;
58 };
59 
61 
62 #endif
This specialization on MouseWatcherParameter allows us to tag on additional elements to events for th...
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
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
A base class for things which need to inherit from both TypedWritable and from ReferenceCount.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:81
This is sent along as a parameter to most events generated for a region to indicate the mouse and but...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.