]>
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"
19 class wxLineControlPoint
: public wxControlPoint
21 DECLARE_DYNAMIC_CLASS(wxLineControlPoint
)
25 wxLineControlPoint(wxShapeCanvas
*the_canvas
= NULL
, wxShape
*object
= NULL
, float size
= 0.0,
26 float x
= 0.0, float y
= 0.0, int the_type
= 0);
27 ~wxLineControlPoint();
29 void OnDraw(wxDC
& dc
);
30 void OnDragLeft(bool draw
, float x
, float y
, int keys
=0, int attachment
= 0);
31 void OnBeginDragLeft(float x
, float y
, int keys
=0, int attachment
= 0);
32 void OnEndDragLeft(float x
, float y
, int keys
=0, int attachment
= 0);
34 void OnDragRight(bool draw
, float x
, float y
, int keys
=0, int attachment
= 0);
35 void OnBeginDragRight(float x
, float y
, int keys
=0, int attachment
= 0);
36 void OnEndDragRight(float x
, float y
, int keys
=0, int attachment
= 0);
41 wxRealPoint
* m_point
; // Line point
46 * Temporary arc label object
49 class wxLabelShape
: public wxRectangleShape
51 DECLARE_DYNAMIC_CLASS(wxLabelShape
)
54 wxLabelShape(wxLineShape
*parent
= NULL
, wxShapeRegion
*region
= NULL
, float w
= 0.0, float h
= 0.0);
57 void OnDraw(wxDC
& dc
);
58 void OnDrawContents(wxDC
& dc
);
59 void OnLeftClick(float x
, float y
, int keys
= 0, int attachment
= 0);
60 void OnRightClick(float x
, float y
, int keys
= 0, int attachment
= 0);
61 void OnDragLeft(bool draw
, float x
, float y
, int keys
=0, int attachment
= 0);
62 void OnBeginDragLeft(float x
, float y
, int keys
=0, int attachment
= 0);
63 void OnEndDragLeft(float x
, float y
, int keys
=0, int attachment
= 0);
64 bool OnMovePre(wxDC
& dc
, float x
, float y
, float old_x
, float old_y
, bool display
= TRUE
);
67 wxLineShape
* m_lineShape
;
68 wxShapeRegion
* m_shapeRegion
;
73 * Get the point on the given line (x1, y1) (x2, y2)
74 * distance 'length' along from the end,
75 * returned values in x and y
78 void GetPointOnLine(float x1
, float y1
, float x2
, float y2
,
79 float length
, float *x
, float *y
);