1
//////////////////////////////////////////////////////////////////////////
3
// pgAdmin III - PostgreSQL Tools
5
// Portions Copyright (C) 1998 - 2011, Julian Smart
6
// Portions Copyright (C) 2011, The pgAdmin Development Team
7
// This software is released under the PostgreSQL Licence
9
// linesp.h - Lines private header file
11
//////////////////////////////////////////////////////////////////////////
13
#ifndef _OGL_LINESP_H_
14
#define _OGL_LINESP_H_
17
class wxLineControlPoint: public wxControlPoint
19
DECLARE_DYNAMIC_CLASS(wxLineControlPoint)
20
friend class wxLineShape;
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();
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);
32
// Obsolete (left-dragging now moves attachment point to new relative position OR new
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);
43
wxRealPoint *m_point; // Line point
44
wxRealPoint m_originalPos;
49
* Temporary arc label object
52
class wxLabelShape: public wxRectangleShape
54
DECLARE_DYNAMIC_CLASS(wxLabelShape)
57
wxLabelShape(wxLineShape *parent = NULL, wxShapeRegion *region = NULL, double w = 0.0, double h = 0.0);
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(double x, double y, double old_x, double old_y, bool display = TRUE);
70
wxLineShape *m_lineShape;
71
wxShapeRegion *m_shapeRegion;
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
81
void GetPointOnLine(double x1, double y1, double x2, double y2,
82
double length, double *x, double *y);