~ubuntu-branches/ubuntu/utopic/pgadmin3/utopic-proposed

« back to all changes in this revision

Viewing changes to pgadmin/include/ogl/linesp.h

  • Committer: Bazaar Package Importer
  • Author(s): Gerfried Fuchs
  • Date: 2011-06-07 23:03:54 UTC
  • mfrom: (1.3.1 upstream) (13 sid)
  • mto: This revision was merged to the branch mainline in revision 14.
  • Revision ID: james.westby@ubuntu.com-20110607230354-3td4j9y71u4ahcvj
Tags: 1.14.0~beta1-1
* New upstream development release, adding Build-Depends on
  postgresql-server-dev-all >= 117~.
* Add Build-Depends on quilt, (un)patch to debian/rules and patch for fixing
  the include for kwlist.h in pgadmin/db/keywords.c.
* Add pg_config --includedir-server output to CPPFLAGS.
* Remove unrecognized configure options: --with-wx-config,
  --with-pgsql-include, --enable-gtk2, --enable-unicode.
* Clean up manually the files that are left behind after the broken
  distclean.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//////////////////////////////////////////////////////////////////////////
 
2
//
 
3
// pgAdmin III - PostgreSQL Tools
 
4
//
 
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
 
8
//
 
9
// linesp.h - Lines private header file
 
10
//
 
11
//////////////////////////////////////////////////////////////////////////
 
12
 
 
13
#ifndef _OGL_LINESP_H_
 
14
#define _OGL_LINESP_H_
 
15
 
 
16
class wxLineShape;
 
17
class wxLineControlPoint: public wxControlPoint
 
18
{
 
19
        DECLARE_DYNAMIC_CLASS(wxLineControlPoint)
 
20
        friend class 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 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(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