source: git/trunk/src/guicontrol.h @ 7bb8184

Last change on this file since 7bb8184 was 7bb8184, checked in by Olly Betts <olly@…>, 13 years ago

Retagging 1.2.0

git-svn-id: file:///home/survex-svn/survex/tags/1.2.0@3664 4b37db11-9a0c-4f06-9ece-9ab7cdaee568

  • Property mode set to 100644
File size: 6.1 KB
Line 
1//
2//  guicontrol.h
3//
4//  Handlers for events relating to the display of a survey.
5//
6//  Copyright (C) 2000-2002,2005 Mark R. Shinwell
7//  Copyright (C) 2001-2004,2006 Olly Betts
8//
9//  This program is free software; you can redistribute it and/or modify
10//  it under the terms of the GNU General Public License as published by
11//  the Free Software Foundation; either version 2 of the License, or
12//  (at your option) any later version.
13//
14//  This program is distributed in the hope that it will be useful,
15//  but WITHOUT ANY WARRANTY; without even the implied warranty of
16//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17//  GNU General Public License for more details.
18//
19//  You should have received a copy of the GNU General Public License
20//  along with this program; if not, write to the Free Software
21//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
22//
23
24#ifndef guicontrol_h
25#define guicontrol_h
26
27#include "wx.h"
28
29class GfxCore;
30
31class GUIControl {
32    GfxCore* m_View;
33
34    enum { NO_DRAG = 0, LEFT_DRAG, MIDDLE_DRAG, RIGHT_DRAG } dragging;
35
36    wxPoint m_DragStart;
37    wxPoint m_DragRealStart;
38    wxPoint m_DragLast;
39
40    enum { drag_NONE, drag_MAIN, drag_COMPASS, drag_ELEV, drag_SCALE } m_LastDrag;
41
42    enum { NONE, ROTATE, SCALE } m_ScaleRotateLock;
43
44    bool m_ReverseControls;
45
46    void HandleRotate(wxPoint);
47    void HandleTilt(wxPoint);
48    void HandleTranslate(wxPoint);
49    void HandleScaleRotate(wxPoint);
50    void HandleTiltRotate(wxPoint);
51
52    void HandCursor();
53    void RestoreCursor();
54
55    void HandleNonDrag(const wxPoint & point);
56
57public:
58    GUIControl();
59    ~GUIControl();
60
61    void SetView(GfxCore* view);
62
63    bool MouseDown() const;
64
65    void OnDefaults();
66    void OnPlan();
67    void OnElevation();
68    void OnDisplayOverlappingNames();
69    void OnColourByDepth();
70    void OnColourByDate();
71    void OnColourByError();
72    void OnShowCrosses();
73    void OnShowStationNames();
74    void OnShowSurveyLegs();
75    void OnShowSurface();
76    void OnMoveEast();
77    void OnMoveNorth();
78    void OnMoveSouth();
79    void OnMoveWest();
80    void OnToggleRotation();
81    void OnReverseControls();
82    void OnSlowDown(bool accel = false);
83    void OnSpeedUp(bool accel = false);
84    void OnStepOnceAnticlockwise(bool accel = false);
85    void OnStepOnceClockwise(bool accel = false);
86    void OnHigherViewpoint(bool accel = false);
87    void OnLowerViewpoint(bool accel = false);
88    void OnShiftDisplayDown(bool accel = false);
89    void OnShiftDisplayLeft(bool accel = false);
90    void OnShiftDisplayRight(bool accel = false);
91    void OnShiftDisplayUp(bool accel = false);
92    void OnZoomIn(bool accel = false);
93    void OnZoomOut(bool accel = false);
94    void OnToggleScalebar();
95    void OnToggleDepthbar();
96    void OnViewCompass();
97    void OnViewClino();
98    void OnViewGrid();
99    void OnReverseDirectionOfRotation();
100    void OnShowEntrances();
101    void OnShowFixedPts();
102    void OnShowExportedPts();
103    void OnCancelDistLine();
104    void OnMouseMove(wxMouseEvent& event);
105    void OnLButtonDown(wxMouseEvent& event);
106    void OnLButtonUp(wxMouseEvent& event);
107    void OnMButtonDown(wxMouseEvent& event);
108    void OnMButtonUp(wxMouseEvent& event);
109    void OnRButtonDown(wxMouseEvent& event);
110    void OnRButtonUp(wxMouseEvent& event);
111    void OnMouseWheel(wxMouseEvent& event);
112    void OnKeyPress(wxKeyEvent &e);
113
114    void OnDisplayOverlappingNamesUpdate(wxUpdateUIEvent&);
115    void OnColourByDepthUpdate(wxUpdateUIEvent&);
116    void OnColourByDateUpdate(wxUpdateUIEvent&);
117    void OnColourByErrorUpdate(wxUpdateUIEvent&);
118    void OnShowCrossesUpdate(wxUpdateUIEvent&);
119    void OnShowStationNamesUpdate(wxUpdateUIEvent&);
120    void OnShowSurveyLegsUpdate(wxUpdateUIEvent&);
121    void OnShowSurfaceUpdate(wxUpdateUIEvent&);
122    void OnMoveEastUpdate(wxUpdateUIEvent&);
123    void OnMoveNorthUpdate(wxUpdateUIEvent&);
124    void OnMoveSouthUpdate(wxUpdateUIEvent&);
125    void OnMoveWestUpdate(wxUpdateUIEvent&);
126    void OnToggleRotationUpdate(wxUpdateUIEvent&);
127    void OnReverseControlsUpdate(wxUpdateUIEvent&);
128    void OnReverseDirectionOfRotationUpdate(wxUpdateUIEvent&);
129    void OnSlowDownUpdate(wxUpdateUIEvent&);
130    void OnSpeedUpUpdate(wxUpdateUIEvent&);
131    void OnStepOnceAnticlockwiseUpdate(wxUpdateUIEvent&);
132    void OnStepOnceClockwiseUpdate(wxUpdateUIEvent&);
133    void OnDefaultsUpdate(wxUpdateUIEvent&);
134    void OnElevationUpdate(wxUpdateUIEvent&);
135    void OnHigherViewpointUpdate(wxUpdateUIEvent&);
136    void OnLowerViewpointUpdate(wxUpdateUIEvent&);
137    void OnPlanUpdate(wxUpdateUIEvent&);
138    void OnShiftDisplayDownUpdate(wxUpdateUIEvent&);
139    void OnShiftDisplayLeftUpdate(wxUpdateUIEvent&);
140    void OnShiftDisplayRightUpdate(wxUpdateUIEvent&);
141    void OnShiftDisplayUpUpdate(wxUpdateUIEvent&);
142    void OnZoomInUpdate(wxUpdateUIEvent&);
143    void OnZoomOutUpdate(wxUpdateUIEvent&);
144    void OnToggleScalebarUpdate(wxUpdateUIEvent&);
145    void OnToggleDepthbarUpdate(wxUpdateUIEvent&);
146    void OnViewCompassUpdate(wxUpdateUIEvent&);
147    void OnViewClinoUpdate(wxUpdateUIEvent&);
148    void OnViewGridUpdate(wxUpdateUIEvent&);
149    void OnShowEntrancesUpdate(wxUpdateUIEvent&);
150    void OnShowExportedPtsUpdate(wxUpdateUIEvent&);
151    void OnShowFixedPtsUpdate(wxUpdateUIEvent&);
152
153    void OnIndicatorsUpdate(wxUpdateUIEvent&);
154    void OnCancelDistLineUpdate(wxUpdateUIEvent&);
155
156    void OnViewPerspective();
157    void OnViewPerspectiveUpdate(wxUpdateUIEvent& cmd);
158
159    void OnViewSmoothShading();
160    void OnViewSmoothShadingUpdate(wxUpdateUIEvent& cmd);
161
162    void OnViewTextured();
163    void OnViewTexturedUpdate(wxUpdateUIEvent& cmd);
164
165    void OnViewFog();
166    void OnViewFogUpdate(wxUpdateUIEvent& cmd);
167
168    void OnViewSmoothLines();
169    void OnViewSmoothLinesUpdate(wxUpdateUIEvent& cmd);
170
171    void OnToggleMetric();
172    void OnToggleMetricUpdate(wxUpdateUIEvent& cmd);
173
174    void OnToggleDegrees();
175    void OnToggleDegreesUpdate(wxUpdateUIEvent& cmd);
176
177    void OnToggleTubes();
178    void OnToggleTubesUpdate(wxUpdateUIEvent& cmd);
179
180    void OnViewFullScreenUpdate(wxUpdateUIEvent&);
181    void OnViewFullScreen();
182
183    void OnViewBoundingBoxUpdate(wxUpdateUIEvent&);
184    void OnViewBoundingBox();
185};
186
187#endif
Note: See TracBrowser for help on using the repository browser.