Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

panda/src/pgui/pgMouseWatcherRegion.h

Go to the documentation of this file.
00001 // Filename: pgMouseWatcherRegion.h
00002 // Created by:  drose (02Jul01)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
00008 //
00009 // All use of this software is subject to the terms of the Panda 3d
00010 // Software license.  You should have received a copy of this license
00011 // along with this source code; you will also find a current copy of
00012 // the license at http://www.panda3d.org/license.txt .
00013 //
00014 // To contact the maintainers of this program write to
00015 // panda3d@yahoogroups.com .
00016 //
00017 ////////////////////////////////////////////////////////////////////
00018 
00019 #ifndef PGMOUSEWATCHERREGION_H
00020 #define PGMOUSEWATCHERREGION_H
00021 
00022 #include "pandabase.h"
00023 
00024 #include "mouseWatcherRegion.h"
00025 
00026 class PGItem;
00027 
00028 ////////////////////////////////////////////////////////////////////
00029 //       Class : PGMouseWatcherRegion
00030 // Description : This is a specialization on MouseWatcherRegion, to
00031 //               add a bit more fields that are relevant to the PG
00032 //               system.  Each PGItem corresponds to exactly one
00033 //               PGMouseWatcherRegion.
00034 ////////////////////////////////////////////////////////////////////
00035 class EXPCL_PANDA PGMouseWatcherRegion : public MouseWatcherRegion {
00036 public:
00037   PGMouseWatcherRegion(PGItem *item);
00038   virtual ~PGMouseWatcherRegion();
00039 
00040   virtual void enter(const MouseWatcherParameter &param);
00041   virtual void exit(const MouseWatcherParameter &param);
00042   virtual void within(const MouseWatcherParameter &param);
00043   virtual void without(const MouseWatcherParameter &param);
00044   virtual void press(const MouseWatcherParameter &param);
00045   virtual void release(const MouseWatcherParameter &param);
00046   virtual void keystroke(const MouseWatcherParameter &param);
00047 
00048 private:
00049   PGItem *_item;
00050   static int _next_index;
00051 
00052 public:
00053   static TypeHandle get_class_type() {
00054     return _type_handle;
00055   }
00056   static void init_type() {
00057     MouseWatcherRegion::init_type();
00058     register_type(_type_handle, "PGMouseWatcherRegion",
00059                   MouseWatcherRegion::get_class_type());
00060   }
00061   virtual TypeHandle get_type() const {
00062     return get_class_type();
00063   }
00064   virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
00065 
00066 private:
00067   static TypeHandle _type_handle;
00068 
00069   friend class PGItem;
00070 };
00071 
00072 #include "pgMouseWatcherRegion.I"
00073 
00074 #endif

Generated on Fri May 2 00:42:44 2003 for Panda by doxygen1.3