]> git.saurik.com Git - wxWidgets.git/blame - contrib/include/wx/ogl/linesp.h
Applied patch [ 1117207 ] changed the test for SQL_C_WCHAR
[wxWidgets.git] / contrib / include / wx / ogl / linesp.h
CommitLineData
1fc25a89
JS
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
2ba06d5a 9// Licence: wxWindows licence
1fc25a89
JS
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _OGL_LINESP_H_
13#define _OGL_LINESP_H_
14
ab7ce33c 15#if defined(__GNUG__) && !defined(__APPLE__)
1fc25a89
JS
16#pragma interface "linesp.h"
17#endif
18
5f331691
RD
19
20class WXDLLIMPEXP_OGL wxLineShape;
21class WXDLLIMPEXP_OGL wxLineControlPoint: public wxControlPoint
1fc25a89
JS
22{
23 DECLARE_DYNAMIC_CLASS(wxLineControlPoint)
5f331691 24 friend class WXDLLIMPEXP_OGL wxLineShape;
1fc25a89
JS
25 public:
26
27 wxLineControlPoint(wxShapeCanvas *the_canvas = NULL, wxShape *object = NULL, double size = 0.0,
28 double x = 0.0, double y = 0.0, int the_type = 0);
29 ~wxLineControlPoint();
30
31 void OnDraw(wxDC& dc);
32 void OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
33 void OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
34 void OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
35
36 // Obsolete (left-dragging now moves attachment point to new relative position OR new
37 // attachment id)
38#if 0
39 void OnDragRight(bool draw, double x, double y, int keys=0, int attachment = 0);
40 void OnBeginDragRight(double x, double y, int keys=0, int attachment = 0);
41 void OnEndDragRight(double x, double y, int keys=0, int attachment = 0);
42#endif
43
44public:
45
46 int m_type;
47 wxRealPoint* m_point; // Line point
48 wxRealPoint m_originalPos;
49
50};
51
52/*
53 * Temporary arc label object
54 */
5f331691
RD
55
56class WXDLLIMPEXP_OGL wxLabelShape: public wxRectangleShape
1fc25a89
JS
57{
58 DECLARE_DYNAMIC_CLASS(wxLabelShape)
59
60 public:
61 wxLabelShape(wxLineShape *parent = NULL, wxShapeRegion *region = NULL, double w = 0.0, double h = 0.0);
62 ~wxLabelShape();
63
64 void OnDraw(wxDC& dc);
65 void OnDrawContents(wxDC& dc);
66 void OnLeftClick(double x, double y, int keys = 0, int attachment = 0);
67 void OnRightClick(double x, double y, int keys = 0, int attachment = 0);
68 void OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
69 void OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
70 void OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
2ba06d5a 71 bool OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
1fc25a89
JS
72
73public:
74 wxLineShape* m_lineShape;
75 wxShapeRegion* m_shapeRegion;
76
77};
78
79/*
80 * Get the point on the given line (x1, y1) (x2, y2)
81 * distance 'length' along from the end,
82 * returned values in x and y
83 */
84
85void GetPointOnLine(double x1, double y1, double x2, double y2,
86 double length, double *x, double *y);
87
88#endif
89 // _OGL_LINESP_H_
90