formpjpt.h

Go to the documentation of this file.
00001 /**
00002  * \file formpjpt.h <mi32/formpjpt.h>
00003  * \brief MXFORM_PROJPOINT class definition.
00004  *
00005  * \if NODOC
00006  * $Id: formpjpt.h_v 1.3 2004/06/30 13:25:54 mju Exp $
00007  *
00008  * $Log: formpjpt.h_v $
00009  * Revision 1.3  2004/06/30 13:25:54  mju
00010  * Use spatref.
00011  *
00012  * Revision 1.2  2003/09/15 13:49:56  fileserver!dwilliss
00013  * Doxygen
00014  *
00015  * Revision 1.1  2000/09/20 16:28:50  mju
00016  * Initial revision
00017  *
00018  * \endif
00019 **/
00020 
00021 #ifndef  INC_MI32_FORMTBFL_H
00022 #define  INC_MI32_FORMTBFL_H
00023 
00024 #ifndef  INC_MI32_MXFORM_H
00025 #include <mi32/mxform.h>
00026 #endif
00027 
00028 #ifndef  INC_MI32_POINT_H
00029 #include <mi32/point.h>
00030 #endif
00031 
00032 #ifndef  INC_MI32_SPATREF_H
00033 #include <mi32/spatref.h>
00034 #endif
00035 
00036 class MXFORM_PROJPOINT : public MXFORM {
00037    public:
00038 
00039       MXFORM_PROJPOINT (
00040          );
00041 
00042       virtual ~MXFORM_PROJPOINT (
00043          );
00044 
00045       //! Clear current point.
00046       //! Does not call the OnChangePoint() method.
00047       void ClearPoint (
00048          );
00049 
00050       //! Create the form.
00051       Widget Create (
00052          Widget pwidget,                        //!< Parent widget
00053          const Arg *arglist,                    //!< Attachment parameters
00054          int argcount                           //!< Number of attachment parameters
00055          );
00056 
00057       //! Get current point.
00058       //! @return Point coordinates in current projection, meters or decimal degrees.
00059       const DPOINT2D& GetPoint (
00060          ) const {
00061          return (m_Point);
00062          }
00063 
00064       //! Get current Coordinate Reference System.
00065       //! @return Projection parameters.
00066       const SPATREF::COORDREFSYS& GetCoordRefSys (
00067          ) const {
00068          return (m_CoordRefSys);
00069          }
00070 
00071       //! Determine if has valid point coordinates.
00072       bool HasPoint (
00073          ) const {
00074          return (m_HasPoint);
00075          }
00076 
00077       //! Set point coordinates in current projection.
00078       void SetPoint (
00079          const DPOINT2D& point,                 //!< Coordinates in decimal degrees or meters
00080          bool notify = false                    //!< Call OnChangePoint() method
00081          );
00082 
00083       //! Set projection.
00084       //! If a point is currently set an attempt will be made to convert it from
00085       //! the previous projection to the new projection.  If the conversion fails
00086       //! the point fields will be cleared.
00087       //! The OnChangePoint() is not called by this method.
00088       void SetCoordRefSys (
00089          const SPATREF::COORDREFSYS& proj,               //!< New projection parameters
00090          bool notify = false                    //!< Call OnChangeCoordRefSys() method
00091          );
00092 
00093    protected:
00094 
00095       //! Called when point is changed.
00096       //! Derived class must call superclass OnChangePoint() method BEFORE
00097       //! performing its own processing.
00098       virtual void OnChangePoint (
00099          );
00100 
00101       //! Called when CRS is changed.
00102       //! Derived class must call superclass OnChangeCoordRefSys() method BEFORE
00103       //! performing its own processing.
00104       virtual void OnChangeCoordRefSys (
00105          );
00106 
00107    private:
00108       #ifndef GENERATING_DOXYGEN_OUTPUT
00109 
00110       SPATREF::COORDREFSYS m_CoordRefSys;
00111       DPOINT2D m_Point;
00112       bool m_HasPoint;
00113       Widget m_CoordRefSysNameXeT;
00114       Widget m_LongitudeL;
00115       Widget m_LatitudeL;
00116       Widget m_NorthL;
00117       Widget m_EastL;
00118       Widget m_PointYP;
00119       Widget m_PointXP;
00120 
00121       void UpdateControlsForCRS ();
00122 
00123       static void CB_CoordRefSys (Widget, MXFORM_PROJPOINT*, void*);
00124 
00125       static void PCB_ChangePoint (
00126          MxPromptCallbackStruct *cbs,
00127          MXFORM_PROJPOINT *form
00128          );
00129 
00130       MXPRMTCB_ADD(MXFORM_PROJPOINT);
00131 
00132       // UNIMPLEMENTED / UNSUPPORTED
00133       MXFORM_PROJPOINT (const MXFORM_PROJPOINT&);
00134       MXFORM_PROJPOINT& operator= (const MXFORM_PROJPOINT&);
00135       #endif // GENERATING_DOXYGEN_OUTPUT
00136    };
00137 
00138 #endif   //!< INC_MI32_FORMTBFL_H

Generated on Tue Dec 14 13:18:22 2004 for TNTsdk by  doxygen 1.3.8-20040913