00001
00058 #ifndef INC_MGUI_TOOLPOINT_H
00059 #define INC_MGUI_TOOLPOINT_H
00060
00061 #ifndef INC_MGUI_TOOLGPS_H
00062 #include <mgui/toolgps.h>
00063 #endif
00064
00065
00066 #ifndef GENERATING_DOXYGEN_OUTPUT
00067 struct POINTSTYLE;
00068 namespace RVC {
00069 class STYLEPATTERN_SYMBOL;
00070 }
00071 #endif
00072
00073
00074 namespace MGUI {
00075
00076
00077
00079 class TOOL_POINT : public MGUI::TOOL_GPS {
00080 public:
00081
00082 typedef fastdelegate::FastDelegate<bool(CHANGESEQ, DPOINT3D&)> DELEGATE_ONSETPOINT;
00083
00085 explicit TOOL_POINT (
00086 TOOLCANVAS *canvas
00087 );
00088
00090 virtual ~TOOL_POINT ();
00091
00093 TOOL_POINT& operator= (
00094 const DPOINT2D& rhs
00095 );
00096
00098 TOOL_POINT& operator= (
00099 const DPOINT3D& rhs
00100 );
00101
00103 const DPOINT3D& GetPoint (
00104 ) const { return (m_point); }
00105
00109 void SetDelegateOnSetPoint (
00110 DELEGATE_ONSETPOINT delegate
00111 ) { m_DelegateOnSetPoint = delegate; }
00112
00116 void SetMarker (
00117 MARKER marker,
00118 UINT16 size = 0
00119 );
00120
00123 void SetPointStyle (
00124 const POINTSTYLE& style,
00125 const RVC::STYLEPATTERN_SYMBOL *pSymbol = 0
00126 );
00127
00128 private:
00129 #ifndef GENERATING_DOXYGEN_OUTPUT
00131 enum ZONE {
00132 ZONE_NoFunction = 0,
00133 ZONE_Outside,
00134 };
00135
00136 MARKER m_marker;
00137 UINT16 m_markersize;
00138 POINTSTYLE *m_pStyle;
00139 RVC::STYLEPATTERN_SYMBOL *m_pSymbol;
00140
00141 DPOINT3D m_point;
00142
00143 ZONE m_CursorZone;
00144
00145 DELEGATE_ONSETPOINT m_DelegateOnSetPoint;
00146
00147
00148 class MANUAL_POINT;
00149 friend class MANUAL_POINT;
00150 class FORM_POINT;
00151 FORM_POINT *m_pFormPoint;
00152
00153
00154 void ComputeCursorZone (const DPOINT2D&);
00155
00156
00157 virtual MGUI::FORM* v_CreateControlForm (LAYOUT_PANE_BASE& ParentPane, CTRLOPT ctrlopt);
00158 virtual MANUAL_BASE* v_CreateManualBase ();
00159 virtual void v_DoDraw ();
00160 virtual void v_DoMove (double dx, double dy, ADJUSTFLAGS flags);
00161 virtual int v_GenerateRegion (REGION2D& region) const;
00162 virtual bool v_OnPointerButtonDown (MGUI::POINT point, POINTERBUTTON button, KEYSTATE keystate);
00163 virtual void v_OnPointerMove (MGUI::POINT point, POINTERBUTTON button, KEYSTATE keystate);
00164
00165
00166 virtual void v_OnGPSCoordinate (const DPOINT3D& point);
00167
00168 #endif // GENERATING_DOXYGEN_OUTPUT
00169
00170 };
00171
00172
00173
00174 }
00175
00176 #endif // INC_MGUI_TOOLPOINT_H