]> git.saurik.com Git - wxWidgets.git/blob - contrib/include/wx/ogl/linesp.h
generate makefile.unx files using bakefile
[wxWidgets.git] / contrib / include / wx / ogl / linesp.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: linesp.h
3 // Purpose: Lines private header file
4 // Author: Julian Smart
5 // Modified by:
6 // Created: 12/07/98
7 // RCS-ID: $Id$
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _OGL_LINESP_H_
13 #define _OGL_LINESP_H_
14
15
16 class WXDLLIMPEXP_OGL wxLineShape;
17 class WXDLLIMPEXP_OGL wxLineControlPoint: public wxControlPoint
18 {
19 DECLARE_DYNAMIC_CLASS(wxLineControlPoint)
20 friend class WXDLLIMPEXP_OGL wxLineShape;
21 public:
22
23 wxLineControlPoint(wxShapeCanvas *the_canvas = NULL, wxShape *object = NULL, double size = 0.0,
24 double x = 0.0, double y = 0.0, int the_type = 0);
25 ~wxLineControlPoint();
26
27 void OnDraw(wxDC& dc);
28 void OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
29 void OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
30 void OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
31
32 // Obsolete (left-dragging now moves attachment point to new relative position OR new
33 // attachment id)
34 #if 0
35 void OnDragRight(bool draw, double x, double y, int keys=0, int attachment = 0);
36 void OnBeginDragRight(double x, double y, int keys=0, int attachment = 0);
37 void OnEndDragRight(double x, double y, int keys=0, int attachment = 0);
38 #endif
39
40 public:
41
42 int m_type;
43 wxRealPoint* m_point; // Line point
44 wxRealPoint m_originalPos;
45
46 };
47
48 /*
49 * Temporary arc label object
50 */
51
52 class WXDLLIMPEXP_OGL wxLabelShape: public wxRectangleShape
53 {
54 DECLARE_DYNAMIC_CLASS(wxLabelShape)
55
56 public:
57 wxLabelShape(wxLineShape *parent = NULL, wxShapeRegion *region = NULL, double w = 0.0, double h = 0.0);
58 ~wxLabelShape();
59
60 void OnDraw(wxDC& dc);
61 void OnDrawContents(wxDC& dc);
62 void OnLeftClick(double x, double y, int keys = 0, int attachment = 0);
63 void OnRightClick(double x, double y, int keys = 0, int attachment = 0);
64 void OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
65 void OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
66 void OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
67 bool OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
68
69 public:
70 wxLineShape* m_lineShape;
71 wxShapeRegion* m_shapeRegion;
72
73 };
74
75 /*
76 * Get the point on the given line (x1, y1) (x2, y2)
77 * distance 'length' along from the end,
78 * returned values in x and y
79 */
80
81 void GetPointOnLine(double x1, double y1, double x2, double y2,
82 double length, double *x, double *y);
83
84 #endif
85 // _OGL_LINESP_H_
86