00001 00030 #ifndef INC_MGUI_FORM_COORD_H 00031 #define INC_MGUI_FORM_COORD_H 00032 00033 #ifndef INC_MGUI_FORMBTXT_H 00034 #include <mgui/formbtxt.h> 00035 #endif 00036 00037 #ifndef INC_MGUI_COMBOBOX_H 00038 #include <mgui/combobox.h> 00039 #endif 00040 00041 #ifndef INC_MI32_SPATREF_H 00042 #include <mi32/spatref.h> 00043 #endif 00044 00045 namespace MGUI { 00046 00047 //=================================================================================================================== 00049 class FORM_EDIT_COORD : public MGUI::FORM_COMPOSITE { 00050 public: 00051 enum FLAGS { 00052 FLAG_Default = 0x0000, 00053 FLAG_EditZCoord = 0x0001, 00054 FLAG_ShowCRS = 0x0002 00055 }; 00056 00058 FORM_EDIT_COORD ( 00059 ); 00060 00062 virtual ~FORM_EDIT_COORD ( 00063 ); 00064 00066 void Clear ( 00067 bool notify = true 00068 ); 00069 00071 void Create ( 00072 MGUI::LAYOUT_PANE_BASE& ParentPane, 00073 MGUI::LAYOUT_SIZEALIGN sizealign = MGUI::LAYOUT_SIZEALIGN_FixedSize, 00074 FLAGS flags = FLAG_Default 00075 ); 00076 00078 CTRL_LABEL& GetLabelX () 00079 { return (m_XLabel); } 00080 00082 CTRL_LABEL& GetLabelY () 00083 { return (m_YLabel); } 00084 00086 CTRL_LABEL& GetLabelZ () 00087 { return (m_ZLabel); } 00088 00090 const DPOINT3D& GetValue ( 00091 ) const { return (m_Point); } 00092 00094 const SPATREF::COORDREFSYS& GetCoordRefSys ( 00095 ) const { return (m_CoordRefSys); } 00096 00098 bool HasValues ( 00099 ); 00100 00102 void SetDelegateOnChangeValue ( 00103 DELEGATE_VOID_NOPARMS delegate 00104 ) { m_DelegateOnChangeValue = delegate; } 00105 00108 void SetValue ( 00109 const DPOINT2D& Point, 00110 bool notify = true 00111 ); 00112 00115 void SetValue ( 00116 const DPOINT3D& Point, 00117 bool notify = true 00118 ); 00119 00122 void SetCoordRefSys ( 00123 const SPATREF::COORDREFSYS& CoordRefSys, 00124 bool notify = true 00125 ); 00126 00127 00128 private: 00129 #ifndef GENERATING_DOXYGEN_OUTPUT 00130 SPATREF::COORDREFSYS m_CoordRefSys; 00131 DPOINT3D m_Point; 00132 bool m_bIs3D; 00133 DELEGATE_VOID_NOPARMS m_DelegateOnChangeCoordRefSys; 00134 DELEGATE_VOID_NOPARMS m_DelegateOnChangeValue; 00135 00136 FORM_BUTTONTEXT m_BtxCoordRefSys; 00137 00138 LAYOUT_PANE m_XPane; 00139 CTRL_LABEL m_XLabel; 00140 CTRL_EDIT_NUMBER m_XPrompt; 00141 00142 LAYOUT_PANE m_YPane; 00143 CTRL_LABEL m_YLabel; 00144 CTRL_EDIT_NUMBER m_YPrompt; 00145 00146 LAYOUT_PANE m_ZPane; 00147 CTRL_LABEL m_ZLabel; 00148 CTRL_EDIT_NUMBER m_ZPrompt; 00149 00150 void NotifyChangeValue (); 00151 void OnValueChanged (); 00152 void OnBtnCoordRefSys (); 00153 void UpdateProjection (); 00154 #endif // GENERATING_DOXYGEN_OUTPUT 00155 }; 00156 00157 //=================================================================================================================== 00158 00159 } // End of MGUI namespace 00160 00161 #endif // INC_MGUI_FORM_COORD_H
1.6.1