]> git.saurik.com Git - wxWidgets.git/blame - utils/ogl/src/linesp.h
Added missing OGL files; added defaults to wxDocMDIParentFrame; corrected
[wxWidgets.git] / utils / ogl / src / linesp.h
CommitLineData
0fc1a713
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
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _OGL_LINESP_H_
13#define _OGL_LINESP_H_
14
15#ifdef __GNUG__
16#pragma interface "linesp.h"
17#endif
18
19class wxLineControlPoint: public wxControlPoint
20{
21 DECLARE_DYNAMIC_CLASS(wxLineControlPoint)
22
23 public:
24
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();
28
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);
33
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);
37
38public:
39
40 int m_type;
41 wxRealPoint* m_point; // Line point
42
43};
44
45/*
46 * Temporary arc label object
47 */
48
49class wxLabelShape: public wxRectangleShape
50{
51 DECLARE_DYNAMIC_CLASS(wxLabelShape)
52
53 public:
54 wxLabelShape(wxLineShape *parent = NULL, wxShapeRegion *region = NULL, float w = 0.0, float h = 0.0);
55 ~wxLabelShape();
56
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);
65
66public:
67 wxLineShape* m_lineShape;
68 wxShapeRegion* m_shapeRegion;
69
70};
71
72/*
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
76 */
77
78void GetPointOnLine(float x1, float y1, float x2, float y2,
79 float length, float *x, float *y);
80
81#endif
82 // _OGL_LINESP_H_
83