pgMouseWatcherGroup.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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. #ifndef PGMOUSEWATCHERGROUP_H
  14. #define PGMOUSEWATCHERGROUP_H
  15. #include "pandabase.h"
  16. #include "mouseWatcherGroup.h"
  17. #include "pointerTo.h"
  18. class PGTop;
  19. /**
  20. * This is a specialization on MouseWatcherGroup, to associate it with a
  21. * PGTop. Originally we had PGTop multiply inheriting from NamedNode and
  22. * MouseWatcherGroup, but this causes problems with circular reference counts.
  23. */
  24. class EXPCL_PANDA_PGUI PGMouseWatcherGroup : public MouseWatcherGroup {
  25. public:
  26. INLINE PGMouseWatcherGroup(PGTop *top);
  27. virtual ~PGMouseWatcherGroup();
  28. INLINE void clear_top(PGTop *top);
  29. private:
  30. PGTop *_top;
  31. public:
  32. static TypeHandle get_class_type() {
  33. return _type_handle;
  34. }
  35. static void init_type() {
  36. MouseWatcherGroup::init_type();
  37. register_type(_type_handle, "PGMouseWatcherGroup",
  38. MouseWatcherGroup::get_class_type());
  39. }
  40. virtual TypeHandle get_type() const {
  41. return get_class_type();
  42. }
  43. virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
  44. private:
  45. static TypeHandle _type_handle;
  46. };
  47. #include "pgMouseWatcherGroup.I"
  48. #endif