source: git/src/guicontrol.h @ 53496ab3

RELEASE/1.2debug-cidebug-ci-sanitisersstereowalls-data
Last change on this file since 53496ab3 was 9cb97b7, checked in by Olly Betts <olly@…>, 10 years ago

src/: Rename internal references to "show splays" to just "splays"
to reflect the change in the menu item name.

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