mgui/toolselp.h

Go to the documentation of this file.
00001 /**
00002  * \file mgui/toolselp.h
00003  * \brief MGUI::TOOL_SELECTPOINT class definition
00004  *
00005  * \if NODOC
00006  * $Id: toolselp.h_v 1.3 2003/10/03 19:58:19 linux32build!build Exp $
00007  *
00008  * $Log: toolselp.h_v $
00009  * Revision 1.3  2003/10/03 19:58:19  linux32build!build
00010  * Doxygen
00011  *
00012  * Revision 1.2  2003/09/15 13:49:32  fileserver!dwilliss
00013  * Doxygen
00014  *
00015  * Revision 1.1  2003/01/10 23:09:28  mju
00016  * Initial revision
00017  *
00018  * \endif
00019 **/
00020 
00021 #ifndef  INC_MGUI_TOOLSELP_H
00022 #define  INC_MGUI_TOOLSELP_H
00023 
00024 #ifndef  INC_MGUI_TOOLBASE_H
00025 #include <mgui/toolbase.h>
00026 #endif
00027 
00028 namespace MGUI {
00029 
00030 
00031 //!   TOOL_SELECTPOINT - Point selection tool (no visible graphics)
00032 //!
00033 class TOOL_SELECTPOINT : public TOOL_LIMITED {
00034    public:
00035 
00036       //! Constructor.
00037       explicit TOOL_SELECTPOINT (
00038          TOOLCANVAS *canvas
00039          );
00040 
00041       //! Destructor.
00042       virtual ~TOOL_SELECTPOINT ();
00043 
00044       //! Get tool point.
00045       const DPOINT2D& GetPoint (
00046          ) const { return (m_point); }
00047 
00048    private:
00049       #ifndef GENERATING_DOXYGEN_OUTPUT
00050       //! Enumeration constants
00051       enum ZONE {
00052          ZONE_NoFunction = 0,
00053          ZONE_Outside,
00054          };
00055 
00056       class CONTROLFORM : public MGUI::CTRL {
00057          public:
00058             CONTROLFORM (
00059                );
00060             virtual ~CONTROLFORM (
00061                );
00062          private:
00063          };
00064 
00065       //! Tool position values
00066       DPOINT2D m_point;                //!< Tool position
00067 
00068       //! Values used during interaction
00069       ZONE m_CursorZone;                  //!< Current cursor zone
00070 
00071       //! Methods
00072       void ComputeCursorZone (const DPOINT2D&);
00073       void UpdateCursor () const;
00074 
00075       //! TOOL_BASE overrides.
00076       virtual void v_DoDraw (MGD::CONTEXT*);
00077       virtual void v_DoMove (double dx, double dy, ADJUSTFLAGS flags);
00078       virtual void v_OnLButtonDown (MGUI::POINT point, KEYSTATE keystate);
00079       virtual void v_OnMouseMove (MGUI::POINT point, KEYSTATE keystate);
00080       #endif // GENERATING_DOXYGEN_OUTPUT
00081    };
00082 
00083 
00084 }  // End namespace MGUI
00085 
00086 
00087 #endif   // INC_MGUI_TOOLSELP_H

Generated on Thu Aug 12 06:18:30 2004 for TNTsdk by doxygen 1.3.4-20031026