00001
00026 #ifndef INC_MGUI_TOOLNODE_H
00027 #define INC_MGUI_TOOLNODE_H
00028
00029 #ifndef INC_MGUI_TOOLBASE_H
00030 #include <mgui/toolbase.h>
00031 #endif
00032
00033 #ifndef INC_MI32_POLYLINE_H
00034 #include <mi32/polyline.h>
00035 #endif
00036
00037 namespace MGUI {
00038
00039
00040
00042 class TOOL_NODE : public MGUI::TOOL_BASE {
00043 public:
00044
00046 explicit TOOL_NODE (
00047 TOOLCANVAS *canvas
00048 );
00049
00051 virtual ~TOOL_NODE ();
00052
00054 const DPOINT3D& GetNode (
00055 POLYLINELIST& LineList
00056 ) const;
00057
00060 void SetLinePercentage (
00061 double LinePercentage
00062 );
00063
00066 void SetMarker (
00067 MARKER marker,
00068 UINT16 size = 0
00069 );
00070
00072 void SetNode (
00073 const DPOINT3D& node,
00074 const POLYLINELIST& LineList
00075 );
00076
00077 private:
00078 #ifndef GENERATING_DOXYGEN_OUTPUT
00080 enum ZONE {
00081 ZONE_NoFunction = 0,
00082 ZONE_Outside
00083 };
00084 struct LINE;
00085
00087 MARKER m_marker;
00088 UINT16 m_markersize;
00090 DPOINT3D m_Node;
00091 POLYLINELIST m_LineList;
00092 SIMPLE_ARRAY<LINE> m_LineState;
00094 ZONE m_CursorZone;
00095 double m_LinePercentage;
00096
00098 class MANUAL_NODE;
00099 friend class MANUAL_NODE;
00100 class FORM_NODE;
00101 FORM_NODE* m_pFormNode;
00102
00104 void ComputeCursorZone (const DPOINT2D&);
00105 void DrawLineMarkers (MGD::CONTEXT*, const POLYLINE&, LINE&);
00106 void MoveNode (const DPOINT3D& node);
00107 void UpdateLines (const DPOINT3D& node);
00108
00110 virtual MGUI::FORM* v_CreateControlForm (LAYOUT_PANE_BASE& ParentPane, CTRLOPT ctrlopt);
00111 virtual MANUAL_BASE* v_CreateManualBase ();
00112 virtual void v_DoDraw ();
00113 virtual void v_DoMove (double dx, double dy, ADJUSTFLAGS flags);
00114 virtual bool v_OnPointerButtonDown (MGUI::POINT Point, POINTERBUTTON button, KEYSTATE keystate);
00115 virtual void v_OnPointerMove (MGUI::POINT Point, POINTERBUTTON button, KEYSTATE keystate);
00116 #endif // GENERATING_DOXYGEN_OUTPUT
00117
00118 };
00119
00120
00121
00122 }
00123
00124 #endif // INC_MGUI_TOOLNODE_H