]>
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
, float size
= 0.0,
27 float x
= 0.0, float y
= 0.0, int the_type
= 0);
28 ~wxLineControlPoint();
30 void OnDraw(wxDC
& dc
);
31 void OnDragLeft(bool draw
, float x
, float y
, int keys
=0, int attachment
= 0);
32 void OnBeginDragLeft(float x
, float y
, int keys
=0, int attachment
= 0);
33 void OnEndDragLeft(float x
, float y
, int keys
=0, int attachment
= 0);
35 void OnDragRight(bool draw
, float x
, float y
, int keys
=0, int attachment
= 0);
36 void OnBeginDragRight(float x
, float y
, int keys
=0, int attachment
= 0);
37 void OnEndDragRight(float x
, float y
, int keys
=0, int attachment
= 0);
42 wxRealPoint
* m_point
; // Line point
47 * Temporary arc label object
50 class wxLabelShape
: public wxRectangleShape
52 DECLARE_DYNAMIC_CLASS(wxLabelShape
)
55 wxLabelShape(wxLineShape
*parent
= NULL
, wxShapeRegion
*region
= NULL
, float w
= 0.0, float h
= 0.0);
58 void OnDraw(wxDC
& dc
);
59 void OnDrawContents(wxDC
& dc
);
60 void OnLeftClick(float x
, float y
, int keys
= 0, int attachment
= 0);
61 void OnRightClick(float x
, float y
, int keys
= 0, int attachment
= 0);
62 void OnDragLeft(bool draw
, float x
, float y
, int keys
=0, int attachment
= 0);
63 void OnBeginDragLeft(float x
, float y
, int keys
=0, int attachment
= 0);
64 void OnEndDragLeft(float x
, float y
, int keys
=0, int attachment
= 0);
65 bool OnMovePre(wxDC
& dc
, float x
, float y
, float old_x
, float old_y
, bool display
= TRUE
);
68 wxLineShape
* m_lineShape
;
69 wxShapeRegion
* m_shapeRegion
;
74 * Get the point on the given line (x1, y1) (x2, y2)
75 * distance 'length' along from the end,
76 * returned values in x and y
79 void GetPointOnLine(float x1
, float y1
, float x2
, float y2
,
80 float length
, float *x
, float *y
);