source: git/src/guicontrol.h @ af50685

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

lib/survex.pot,src/: Add "Colour by Length".

  • Property mode set to 100644
File size: 6.5 KB
RevLine 
[56da40e]1//
2//  guicontrol.h
3//
4//  Handlers for events relating to the display of a survey.
5//
[f4c5932]6//  Copyright (C) 2000-2002,2005 Mark R. Shinwell
[d171c0c]7//  Copyright (C) 2001-2004,2006,2014 Olly Betts
[56da40e]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
[ecbc6c18]21//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
[56da40e]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;
[2a3d328]33
[82c85aa]34    enum { NO_DRAG = 0, LEFT_DRAG, MIDDLE_DRAG, RIGHT_DRAG } dragging;
[56da40e]35
36    wxPoint m_DragStart;
37    wxPoint m_DragRealStart;
38    wxPoint m_DragLast;
39
[dd6af8b]40    enum {
41        drag_NONE,
42        drag_MAIN,
43        drag_COMPASS,
44        drag_ELEV,
45        drag_SCALE,
46        drag_ZOOM
47    } m_LastDrag;
[56da40e]48
[f3ef5d8]49    enum { lock_NONE, lock_ROTATE, lock_SCALE } m_ScaleRotateLock;
[8e1f06d]50
[56da40e]51    bool m_ReverseControls;
52
[e2c1671]53    void HandleRotate(wxPoint);
[56da40e]54    void HandleTilt(wxPoint);
55    void HandleTranslate(wxPoint);
[8e1f06d]56    void HandleScaleRotate(wxPoint);
[dde4fe7]57    void HandleTiltRotate(wxPoint);
[2a3d328]58
[203d2a7]59    void HandCursor();
60    void RestoreCursor();
[56da40e]61
[2072157]62    void HandleNonDrag(const wxPoint & point);
63
[56da40e]64public:
65    GUIControl();
66
67    void SetView(GfxCore* view);
68
[e2c1671]69    bool MouseDown() const;
[2a3d328]70
[56da40e]71    void OnDefaults();
72    void OnPlan();
73    void OnElevation();
74    void OnDisplayOverlappingNames();
[da6c802]75    void OnColourByDepth();
[d4650b3]76    void OnColourByDate();
[c61aa79]77    void OnColourByError();
[af50685]78    void OnColourByLength();
[56da40e]79    void OnShowCrosses();
80    void OnShowStationNames();
81    void OnShowSurveyLegs();
[8666fc7]82    void OnHideSplays();
83    void OnShowSplaysNormal();
84    void OnShowSplaysFaded();
[56da40e]85    void OnShowSurface();
86    void OnMoveEast();
87    void OnMoveNorth();
88    void OnMoveSouth();
89    void OnMoveWest();
90    void OnToggleRotation();
91    void OnReverseControls();
92    void OnSlowDown(bool accel = false);
93    void OnSpeedUp(bool accel = false);
94    void OnStepOnceAnticlockwise(bool accel = false);
95    void OnStepOnceClockwise(bool accel = false);
96    void OnHigherViewpoint(bool accel = false);
97    void OnLowerViewpoint(bool accel = false);
98    void OnShiftDisplayDown(bool accel = false);
99    void OnShiftDisplayLeft(bool accel = false);
100    void OnShiftDisplayRight(bool accel = false);
101    void OnShiftDisplayUp(bool accel = false);
102    void OnZoomIn(bool accel = false);
103    void OnZoomOut(bool accel = false);
104    void OnToggleScalebar();
[97ea48d]105    void OnToggleColourKey();
[56da40e]106    void OnViewCompass();
107    void OnViewClino();
108    void OnViewGrid();
109    void OnReverseDirectionOfRotation();
110    void OnShowEntrances();
111    void OnShowFixedPts();
112    void OnShowExportedPts();
113    void OnCancelDistLine();
114    void OnMouseMove(wxMouseEvent& event);
115    void OnLButtonDown(wxMouseEvent& event);
116    void OnLButtonUp(wxMouseEvent& event);
117    void OnMButtonDown(wxMouseEvent& event);
118    void OnMButtonUp(wxMouseEvent& event);
119    void OnRButtonDown(wxMouseEvent& event);
120    void OnRButtonUp(wxMouseEvent& event);
[34d8d1a]121    void OnMouseWheel(wxMouseEvent& event);
[56da40e]122    void OnKeyPress(wxKeyEvent &e);
123
124    void OnDisplayOverlappingNamesUpdate(wxUpdateUIEvent&);
[da6c802]125    void OnColourByDepthUpdate(wxUpdateUIEvent&);
[d4650b3]126    void OnColourByDateUpdate(wxUpdateUIEvent&);
[c61aa79]127    void OnColourByErrorUpdate(wxUpdateUIEvent&);
[af50685]128    void OnColourByLengthUpdate(wxUpdateUIEvent&);
[56da40e]129    void OnShowCrossesUpdate(wxUpdateUIEvent&);
130    void OnShowStationNamesUpdate(wxUpdateUIEvent&);
131    void OnShowSurveyLegsUpdate(wxUpdateUIEvent&);
[9cb97b7]132    void OnSplaysUpdate(wxUpdateUIEvent&);
[8666fc7]133    void OnHideSplaysUpdate(wxUpdateUIEvent&);
134    void OnShowSplaysNormalUpdate(wxUpdateUIEvent&);
135    void OnShowSplaysFadedUpdate(wxUpdateUIEvent&);
[56da40e]136    void OnShowSurfaceUpdate(wxUpdateUIEvent&);
137    void OnMoveEastUpdate(wxUpdateUIEvent&);
138    void OnMoveNorthUpdate(wxUpdateUIEvent&);
139    void OnMoveSouthUpdate(wxUpdateUIEvent&);
140    void OnMoveWestUpdate(wxUpdateUIEvent&);
141    void OnToggleRotationUpdate(wxUpdateUIEvent&);
142    void OnReverseControlsUpdate(wxUpdateUIEvent&);
143    void OnReverseDirectionOfRotationUpdate(wxUpdateUIEvent&);
144    void OnSlowDownUpdate(wxUpdateUIEvent&);
145    void OnSpeedUpUpdate(wxUpdateUIEvent&);
[c3b20c5]146    void OnStepOnceUpdate(wxUpdateUIEvent&);
[56da40e]147    void OnDefaultsUpdate(wxUpdateUIEvent&);
148    void OnElevationUpdate(wxUpdateUIEvent&);
149    void OnHigherViewpointUpdate(wxUpdateUIEvent&);
150    void OnLowerViewpointUpdate(wxUpdateUIEvent&);
151    void OnPlanUpdate(wxUpdateUIEvent&);
152    void OnShiftDisplayDownUpdate(wxUpdateUIEvent&);
153    void OnShiftDisplayLeftUpdate(wxUpdateUIEvent&);
154    void OnShiftDisplayRightUpdate(wxUpdateUIEvent&);
155    void OnShiftDisplayUpUpdate(wxUpdateUIEvent&);
156    void OnZoomInUpdate(wxUpdateUIEvent&);
157    void OnZoomOutUpdate(wxUpdateUIEvent&);
158    void OnToggleScalebarUpdate(wxUpdateUIEvent&);
[97ea48d]159    void OnToggleColourKeyUpdate(wxUpdateUIEvent&);
[56da40e]160    void OnViewCompassUpdate(wxUpdateUIEvent&);
161    void OnViewClinoUpdate(wxUpdateUIEvent&);
162    void OnViewGridUpdate(wxUpdateUIEvent&);
163    void OnShowEntrancesUpdate(wxUpdateUIEvent&);
164    void OnShowExportedPtsUpdate(wxUpdateUIEvent&);
165    void OnShowFixedPtsUpdate(wxUpdateUIEvent&);
166
167    void OnIndicatorsUpdate(wxUpdateUIEvent&);
168    void OnCancelDistLineUpdate(wxUpdateUIEvent&);
169
[6abab84]170    void OnViewPerspective();
171    void OnViewPerspectiveUpdate(wxUpdateUIEvent& cmd);
172
[d67450e]173    void OnViewSmoothShading();
174    void OnViewSmoothShadingUpdate(wxUpdateUIEvent& cmd);
175
[a517825]176    void OnViewTextured();
177    void OnViewTexturedUpdate(wxUpdateUIEvent& cmd);
178
[c60062d]179    void OnViewFog();
180    void OnViewFogUpdate(wxUpdateUIEvent& cmd);
181
[db452ae]182    void OnViewSmoothLines();
183    void OnViewSmoothLinesUpdate(wxUpdateUIEvent& cmd);
184
[56da40e]185    void OnToggleMetric();
186    void OnToggleMetricUpdate(wxUpdateUIEvent& cmd);
[6abab84]187
[56da40e]188    void OnToggleDegrees();
189    void OnToggleDegreesUpdate(wxUpdateUIEvent& cmd);
[2a3d328]190
[d171c0c]191    void OnTogglePercent();
192    void OnTogglePercentUpdate(wxUpdateUIEvent& cmd);
193
[56da40e]194    void OnToggleTubes();
195    void OnToggleTubesUpdate(wxUpdateUIEvent& cmd);
[2a3d328]196
[b13aee4]197    void OnViewFullScreenUpdate(wxUpdateUIEvent&);
198    void OnViewFullScreen();
[3d420c4]199
[f4c5932]200    void OnViewBoundingBoxUpdate(wxUpdateUIEvent&);
201    void OnViewBoundingBox();
[56da40e]202};
203
204#endif
Note: See TracBrowser for help on using the repository browser.