]>
git.saurik.com Git - wxWidgets.git/blob - utils/ogl/src/linesp.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: Lines private header file
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _OGL_LINESP_H_
13 #define _OGL_LINESP_H_
16 #pragma interface "linesp.h"
20 class wxLineControlPoint
: public wxControlPoint
22 DECLARE_DYNAMIC_CLASS(wxLineControlPoint
)
23 friend class wxLineShape
;
26 wxLineControlPoint(wxShapeCanvas
*the_canvas
= NULL
, wxShape
*object
= NULL
, double size
= 0.0,
27 double x
= 0.0, double y
= 0.0, int the_type
= 0);
28 ~wxLineControlPoint();
30 void OnDraw(wxDC
& dc
);
31 void OnDragLeft(bool draw
, double x
, double y
, int keys
=0, int attachment
= 0);
32 void OnBeginDragLeft(double x
, double y
, int keys
=0, int attachment
= 0);
33 void OnEndDragLeft(double x
, double y
, int keys
=0, int attachment
= 0);
35 // Obsolete (left-dragging now moves attachment point to new relative position OR new
38 void OnDragRight(bool draw
, double x
, double y
, int keys
=0, int attachment
= 0);
39 void OnBeginDragRight(double x
, double y
, int keys
=0, int attachment
= 0);
40 void OnEndDragRight(double x
, double y
, int keys
=0, int attachment
= 0);
46 wxRealPoint
* m_point
; // Line point
51 * Temporary arc label object
54 class wxLabelShape
: public wxRectangleShape
56 DECLARE_DYNAMIC_CLASS(wxLabelShape
)
59 wxLabelShape(wxLineShape
*parent
= NULL
, wxShapeRegion
*region
= NULL
, double w
= 0.0, double h
= 0.0);
62 void OnDraw(wxDC
& dc
);
63 void OnDrawContents(wxDC
& dc
);
64 void OnLeftClick(double x
, double y
, int keys
= 0, int attachment
= 0);
65 void OnRightClick(double x
, double y
, int keys
= 0, int attachment
= 0);
66 void OnDragLeft(bool draw
, double x
, double y
, int keys
=0, int attachment
= 0);
67 void OnBeginDragLeft(double x
, double y
, int keys
=0, int attachment
= 0);
68 void OnEndDragLeft(double x
, double y
, int keys
=0, int attachment
= 0);
69 bool OnMovePre(wxDC
& dc
, double x
, double y
, double old_x
, double old_y
, bool display
= TRUE
);
72 wxLineShape
* m_lineShape
;
73 wxShapeRegion
* m_shapeRegion
;
78 * Get the point on the given line (x1, y1) (x2, y2)
79 * distance 'length' along from the end,
80 * returned values in x and y
83 void GetPointOnLine(double x1
, double y1
, double x2
, double y2
,
84 double length
, double *x
, double *y
);