00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef PGTOP_H
00016 #define PGTOP_H
00017
00018 #include "pandabase.h"
00019
00020 #include "pgMouseWatcherGroup.h"
00021
00022 #include "pandaNode.h"
00023 #include "mouseWatcher.h"
00024 #include "pointerTo.h"
00025
00026 class GraphicsStateGuardian;
00027 class PGMouseWatcherGroup;
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043 class EXPCL_PANDA_PGUI PGTop : public PandaNode {
00044 PUBLISHED:
00045 PGTop(const string &name);
00046 virtual ~PGTop();
00047
00048 protected:
00049 INLINE PGTop(const PGTop ©);
00050
00051 public:
00052 virtual PandaNode *make_copy() const;
00053 virtual bool cull_callback(CullTraverser *trav, CullTraverserData &data);
00054 virtual bool is_renderable() const;
00055
00056 PUBLISHED:
00057 void set_mouse_watcher(MouseWatcher *watcher);
00058 INLINE MouseWatcher *get_mouse_watcher() const;
00059 INLINE MouseWatcherGroup *get_group() const;
00060
00061 INLINE void set_start_sort(int start_sort);
00062 INLINE int get_start_sort() const;
00063
00064 public:
00065
00066 INLINE void add_region(MouseWatcherRegion *region);
00067 INLINE void clear_regions();
00068
00069 private:
00070 PT(MouseWatcher) _watcher;
00071 PT(PGMouseWatcherGroup) _watcher_group;
00072 int _start_sort;
00073
00074 public:
00075 static TypeHandle get_class_type() {
00076 return _type_handle;
00077 }
00078 static void init_type() {
00079 PandaNode::init_type();
00080 register_type(_type_handle, "PGTop",
00081 PandaNode::get_class_type());
00082 }
00083 virtual TypeHandle get_type() const {
00084 return get_class_type();
00085 }
00086 virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
00087
00088 private:
00089 static TypeHandle _type_handle;
00090
00091 friend class PGMouseWatcherGroup;
00092 };
00093
00094 #include "pgTop.I"
00095
00096 #endif