]> git.saurik.com Git - wxWidgets.git/blame_incremental - contrib/include/wx/ogl/linesp.h
implement SetFocusFromKbd() to select all text in the controls whose dialog code...
[wxWidgets.git] / contrib / include / wx / ogl / linesp.h
... / ...
CommitLineData
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 wxLineShape;
20class wxLineControlPoint: public wxControlPoint
21{
22 DECLARE_DYNAMIC_CLASS(wxLineControlPoint)
23 friend class wxLineShape;
24 public:
25
26 wxLineControlPoint(wxShapeCanvas *the_canvas = NULL, wxShape *object = NULL, double size = 0.0,
27 double x = 0.0, double y = 0.0, int the_type = 0);
28 ~wxLineControlPoint();
29
30 void OnDraw(wxDC& dc);
31 void OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
32 void OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
33 void OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
34
35 // Obsolete (left-dragging now moves attachment point to new relative position OR new
36 // attachment id)
37#if 0
38 void OnDragRight(bool draw, double x, double y, int keys=0, int attachment = 0);
39 void OnBeginDragRight(double x, double y, int keys=0, int attachment = 0);
40 void OnEndDragRight(double x, double y, int keys=0, int attachment = 0);
41#endif
42
43public:
44
45 int m_type;
46 wxRealPoint* m_point; // Line point
47 wxRealPoint m_originalPos;
48
49};
50
51/*
52 * Temporary arc label object
53 */
54
55class wxLabelShape: public wxRectangleShape
56{
57 DECLARE_DYNAMIC_CLASS(wxLabelShape)
58
59 public:
60 wxLabelShape(wxLineShape *parent = NULL, wxShapeRegion *region = NULL, double w = 0.0, double h = 0.0);
61 ~wxLabelShape();
62
63 void OnDraw(wxDC& dc);
64 void OnDrawContents(wxDC& dc);
65 void OnLeftClick(double x, double y, int keys = 0, int attachment = 0);
66 void OnRightClick(double x, double y, int keys = 0, int attachment = 0);
67 void OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
68 void OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
69 void OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
70 bool OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
71
72public:
73 wxLineShape* m_lineShape;
74 wxShapeRegion* m_shapeRegion;
75
76};
77
78/*
79 * Get the point on the given line (x1, y1) (x2, y2)
80 * distance 'length' along from the end,
81 * returned values in x and y
82 */
83
84void GetPointOnLine(double x1, double y1, double x2, double y2,
85 double length, double *x, double *y);
86
87#endif
88 // _OGL_LINESP_H_
89