source: git/src/guicontrol.h @ c3b20c5

line_contentsstereotravis-osx
Last change on this file since c3b20c5 was c3b20c5, checked in by Olly Betts <olly@…>, 5 years ago

src/: Merge OnStepOnceAnticlockwiseUpdate?() and
OnStepOnceClockwiseUpdate?().

  • Property mode set to 100644
File size: 6.4 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,2014 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 {
41        drag_NONE,
42        drag_MAIN,
43        drag_COMPASS,
44        drag_ELEV,
45        drag_SCALE,
46        drag_ZOOM
47    } m_LastDrag;
48
49    enum { lock_NONE, lock_ROTATE, lock_SCALE } m_ScaleRotateLock;
50
51    bool m_ReverseControls;
52
53    void HandleRotate(wxPoint);
54    void HandleTilt(wxPoint);
55    void HandleTranslate(wxPoint);
56    void HandleScaleRotate(wxPoint);
57    void HandleTiltRotate(wxPoint);
58
59    void HandCursor();
60    void RestoreCursor();
61
62    void HandleNonDrag(const wxPoint & point);
63
64public:
65    GUIControl();
66
67    void SetView(GfxCore* view);
68
69    bool MouseDown() const;
70
71    void OnDefaults();
72    void OnPlan();
73    void OnElevation();
74    void OnDisplayOverlappingNames();
75    void OnColourByDepth();
76    void OnColourByDate();
77    void OnColourByError();
78    void OnShowCrosses();
79    void OnShowStationNames();
80    void OnShowSurveyLegs();
81    void OnHideSplays();
82    void OnShowSplaysNormal();
83    void OnShowSplaysFaded();
84    void OnShowSurface();
85    void OnMoveEast();
86    void OnMoveNorth();
87    void OnMoveSouth();
88    void OnMoveWest();
89    void OnToggleRotation();
90    void OnReverseControls();
91    void OnSlowDown(bool accel = false);
92    void OnSpeedUp(bool accel = false);
93    void OnStepOnceAnticlockwise(bool accel = false);
94    void OnStepOnceClockwise(bool accel = false);
95    void OnHigherViewpoint(bool accel = false);
96    void OnLowerViewpoint(bool accel = false);
97    void OnShiftDisplayDown(bool accel = false);
98    void OnShiftDisplayLeft(bool accel = false);
99    void OnShiftDisplayRight(bool accel = false);
100    void OnShiftDisplayUp(bool accel = false);
101    void OnZoomIn(bool accel = false);
102    void OnZoomOut(bool accel = false);
103    void OnToggleScalebar();
104    void OnToggleColourKey();
105    void OnViewCompass();
106    void OnViewClino();
107    void OnViewGrid();
108    void OnReverseDirectionOfRotation();
109    void OnShowEntrances();
110    void OnShowFixedPts();
111    void OnShowExportedPts();
112    void OnCancelDistLine();
113    void OnMouseMove(wxMouseEvent& event);
114    void OnLButtonDown(wxMouseEvent& event);
115    void OnLButtonUp(wxMouseEvent& event);
116    void OnMButtonDown(wxMouseEvent& event);
117    void OnMButtonUp(wxMouseEvent& event);
118    void OnRButtonDown(wxMouseEvent& event);
119    void OnRButtonUp(wxMouseEvent& event);
120    void OnMouseWheel(wxMouseEvent& event);
121    void OnKeyPress(wxKeyEvent &e);
122
123    void OnDisplayOverlappingNamesUpdate(wxUpdateUIEvent&);
124    void OnColourByDepthUpdate(wxUpdateUIEvent&);
125    void OnColourByDateUpdate(wxUpdateUIEvent&);
126    void OnColourByErrorUpdate(wxUpdateUIEvent&);
127    void OnShowCrossesUpdate(wxUpdateUIEvent&);
128    void OnShowStationNamesUpdate(wxUpdateUIEvent&);
129    void OnShowSurveyLegsUpdate(wxUpdateUIEvent&);
130    void OnSplaysUpdate(wxUpdateUIEvent&);
131    void OnHideSplaysUpdate(wxUpdateUIEvent&);
132    void OnShowSplaysNormalUpdate(wxUpdateUIEvent&);
133    void OnShowSplaysFadedUpdate(wxUpdateUIEvent&);
134    void OnShowSurfaceUpdate(wxUpdateUIEvent&);
135    void OnMoveEastUpdate(wxUpdateUIEvent&);
136    void OnMoveNorthUpdate(wxUpdateUIEvent&);
137    void OnMoveSouthUpdate(wxUpdateUIEvent&);
138    void OnMoveWestUpdate(wxUpdateUIEvent&);
139    void OnToggleRotationUpdate(wxUpdateUIEvent&);
140    void OnReverseControlsUpdate(wxUpdateUIEvent&);
141    void OnReverseDirectionOfRotationUpdate(wxUpdateUIEvent&);
142    void OnSlowDownUpdate(wxUpdateUIEvent&);
143    void OnSpeedUpUpdate(wxUpdateUIEvent&);
144    void OnStepOnceUpdate(wxUpdateUIEvent&);
145    void OnDefaultsUpdate(wxUpdateUIEvent&);
146    void OnElevationUpdate(wxUpdateUIEvent&);
147    void OnHigherViewpointUpdate(wxUpdateUIEvent&);
148    void OnLowerViewpointUpdate(wxUpdateUIEvent&);
149    void OnPlanUpdate(wxUpdateUIEvent&);
150    void OnShiftDisplayDownUpdate(wxUpdateUIEvent&);
151    void OnShiftDisplayLeftUpdate(wxUpdateUIEvent&);
152    void OnShiftDisplayRightUpdate(wxUpdateUIEvent&);
153    void OnShiftDisplayUpUpdate(wxUpdateUIEvent&);
154    void OnZoomInUpdate(wxUpdateUIEvent&);
155    void OnZoomOutUpdate(wxUpdateUIEvent&);
156    void OnToggleScalebarUpdate(wxUpdateUIEvent&);
157    void OnToggleColourKeyUpdate(wxUpdateUIEvent&);
158    void OnViewCompassUpdate(wxUpdateUIEvent&);
159    void OnViewClinoUpdate(wxUpdateUIEvent&);
160    void OnViewGridUpdate(wxUpdateUIEvent&);
161    void OnShowEntrancesUpdate(wxUpdateUIEvent&);
162    void OnShowExportedPtsUpdate(wxUpdateUIEvent&);
163    void OnShowFixedPtsUpdate(wxUpdateUIEvent&);
164
165    void OnIndicatorsUpdate(wxUpdateUIEvent&);
166    void OnCancelDistLineUpdate(wxUpdateUIEvent&);
167
168    void OnViewPerspective();
169    void OnViewPerspectiveUpdate(wxUpdateUIEvent& cmd);
170
171    void OnViewSmoothShading();
172    void OnViewSmoothShadingUpdate(wxUpdateUIEvent& cmd);
173
174    void OnViewTextured();
175    void OnViewTexturedUpdate(wxUpdateUIEvent& cmd);
176
177    void OnViewFog();
178    void OnViewFogUpdate(wxUpdateUIEvent& cmd);
179
180    void OnViewSmoothLines();
181    void OnViewSmoothLinesUpdate(wxUpdateUIEvent& cmd);
182
183    void OnToggleMetric();
184    void OnToggleMetricUpdate(wxUpdateUIEvent& cmd);
185
186    void OnToggleDegrees();
187    void OnToggleDegreesUpdate(wxUpdateUIEvent& cmd);
188
189    void OnTogglePercent();
190    void OnTogglePercentUpdate(wxUpdateUIEvent& cmd);
191
192    void OnToggleTubes();
193    void OnToggleTubesUpdate(wxUpdateUIEvent& cmd);
194
195    void OnViewFullScreenUpdate(wxUpdateUIEvent&);
196    void OnViewFullScreen();
197
198    void OnViewBoundingBoxUpdate(wxUpdateUIEvent&);
199    void OnViewBoundingBox();
200};
201
202#endif
Note: See TracBrowser for help on using the repository browser.