4 // Handlers for events relating to the display of a survey.
6 // Copyright (C) 2000-2002,2005 Mark R. Shinwell
7 // Copyright (C) 2001-2004,2006,2014,2015 Olly Betts
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.
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.
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
34 enum { NO_DRAG
= 0, LEFT_DRAG
, MIDDLE_DRAG
, RIGHT_DRAG
} dragging
;
37 wxPoint m_DragRealStart
;
49 enum { lock_NONE
, lock_ROTATE
, lock_SCALE
} m_ScaleRotateLock
;
51 bool m_ReverseControls
;
53 void HandleRotate(wxPoint
);
54 void HandleTilt(wxPoint
);
55 void HandleTranslate(wxPoint
);
56 void HandleScaleRotate(wxPoint
);
57 void HandleTiltRotate(wxPoint
);
62 void HandleNonDrag(const wxPoint
& point
);
67 void SetView(GfxCore
* view
);
69 bool MouseDown() const;
74 void OnDisplayOverlappingNames();
75 void OnColourByDepth();
76 void OnColourByDate();
77 void OnColourByError();
78 void OnColourByHError();
79 void OnColourByVError();
80 void OnColourByGradient();
81 void OnColourByLength();
82 void OnColourBySurvey();
83 void OnColourByStyle();
85 void OnShowStationNames();
86 void OnShowSurveyLegs();
88 void OnShowSplaysDashed();
89 void OnShowSplaysFaded();
90 void OnShowSplaysNormal();
92 void OnShowDupesDashed();
93 void OnShowDupesFaded();
94 void OnShowDupesNormal();
100 void OnToggleRotation();
101 void OnReverseControls();
102 void OnSlowDown(bool accel
= false);
103 void OnSpeedUp(bool accel
= false);
104 void OnStepOnceAnticlockwise(bool accel
= false);
105 void OnStepOnceClockwise(bool accel
= false);
106 void OnHigherViewpoint(bool accel
= false);
107 void OnLowerViewpoint(bool accel
= false);
108 void OnShiftDisplayDown(bool accel
= false);
109 void OnShiftDisplayLeft(bool accel
= false);
110 void OnShiftDisplayRight(bool accel
= false);
111 void OnShiftDisplayUp(bool accel
= false);
112 void OnZoomIn(bool accel
= false);
113 void OnZoomOut(bool accel
= false);
114 void OnToggleScalebar();
115 void OnToggleColourKey();
116 void OnViewCompass();
119 void OnReverseDirectionOfRotation();
120 void OnShowEntrances();
121 void OnShowFixedPts();
122 void OnShowExportedPts();
123 void OnCancelDistLine();
124 void OnMouseMove(wxMouseEvent
& event
);
125 void OnLButtonDown(wxMouseEvent
& event
);
126 void OnLButtonUp(wxMouseEvent
& event
);
127 void OnMButtonDown(wxMouseEvent
& event
);
128 void OnMButtonUp(wxMouseEvent
& event
);
129 void OnRButtonDown(wxMouseEvent
& event
);
130 void OnRButtonUp(wxMouseEvent
& event
);
131 void OnMouseWheel(wxMouseEvent
& event
);
132 void OnKeyPress(wxKeyEvent
&e
);
134 void OnDisplayOverlappingNamesUpdate(wxUpdateUIEvent
&);
135 void OnColourByUpdate(wxUpdateUIEvent
&);
136 void OnColourByDepthUpdate(wxUpdateUIEvent
&);
137 void OnColourByDateUpdate(wxUpdateUIEvent
&);
138 void OnColourByErrorUpdate(wxUpdateUIEvent
&);
139 void OnColourByHErrorUpdate(wxUpdateUIEvent
&);
140 void OnColourByVErrorUpdate(wxUpdateUIEvent
&);
141 void OnColourByGradientUpdate(wxUpdateUIEvent
&);
142 void OnColourByLengthUpdate(wxUpdateUIEvent
&);
143 void OnColourBySurveyUpdate(wxUpdateUIEvent
&);
144 void OnColourByStyleUpdate(wxUpdateUIEvent
&);
145 void OnShowCrossesUpdate(wxUpdateUIEvent
&);
146 void OnShowStationNamesUpdate(wxUpdateUIEvent
&);
147 void OnShowSurveyLegsUpdate(wxUpdateUIEvent
&);
148 void OnSplaysUpdate(wxUpdateUIEvent
&);
149 void OnHideSplaysUpdate(wxUpdateUIEvent
&);
150 void OnShowSplaysDashedUpdate(wxUpdateUIEvent
&);
151 void OnShowSplaysFadedUpdate(wxUpdateUIEvent
&);
152 void OnShowSplaysNormalUpdate(wxUpdateUIEvent
&);
153 void OnDupesUpdate(wxUpdateUIEvent
&);
154 void OnHideDupesUpdate(wxUpdateUIEvent
&);
155 void OnShowDupesDashedUpdate(wxUpdateUIEvent
&);
156 void OnShowDupesFadedUpdate(wxUpdateUIEvent
&);
157 void OnShowDupesNormalUpdate(wxUpdateUIEvent
&);
158 void OnShowSurfaceUpdate(wxUpdateUIEvent
&);
159 void OnMoveEastUpdate(wxUpdateUIEvent
&);
160 void OnMoveNorthUpdate(wxUpdateUIEvent
&);
161 void OnMoveSouthUpdate(wxUpdateUIEvent
&);
162 void OnMoveWestUpdate(wxUpdateUIEvent
&);
163 void OnToggleRotationUpdate(wxUpdateUIEvent
&);
164 void OnReverseControlsUpdate(wxUpdateUIEvent
&);
165 void OnReverseDirectionOfRotationUpdate(wxUpdateUIEvent
&);
166 void OnDefaultsUpdate(wxUpdateUIEvent
&);
167 void OnElevationUpdate(wxUpdateUIEvent
&);
168 void OnPlanUpdate(wxUpdateUIEvent
&);
169 void OnToggleScalebarUpdate(wxUpdateUIEvent
&);
170 void OnToggleColourKeyUpdate(wxUpdateUIEvent
&);
171 void OnViewCompassUpdate(wxUpdateUIEvent
&);
172 void OnViewClinoUpdate(wxUpdateUIEvent
&);
173 void OnViewGridUpdate(wxUpdateUIEvent
&);
174 void OnShowEntrancesUpdate(wxUpdateUIEvent
&);
175 void OnShowExportedPtsUpdate(wxUpdateUIEvent
&);
176 void OnShowFixedPtsUpdate(wxUpdateUIEvent
&);
178 void OnIndicatorsUpdate(wxUpdateUIEvent
&);
179 void OnCancelDistLineUpdate(wxUpdateUIEvent
&);
181 void OnViewPerspective();
182 void OnViewPerspectiveUpdate(wxUpdateUIEvent
& cmd
);
184 void OnViewSmoothShading();
185 void OnViewSmoothShadingUpdate(wxUpdateUIEvent
& cmd
);
187 void OnViewTextured();
188 void OnViewTexturedUpdate(wxUpdateUIEvent
& cmd
);
191 void OnViewFogUpdate(wxUpdateUIEvent
& cmd
);
193 void OnViewSmoothLines();
194 void OnViewSmoothLinesUpdate(wxUpdateUIEvent
& cmd
);
196 void OnToggleMetric();
197 void OnToggleMetricUpdate(wxUpdateUIEvent
& cmd
);
199 void OnToggleDegrees();
200 void OnToggleDegreesUpdate(wxUpdateUIEvent
& cmd
);
202 void OnTogglePercent();
203 void OnTogglePercentUpdate(wxUpdateUIEvent
& cmd
);
205 void OnToggleTubes();
206 void OnToggleTubesUpdate(wxUpdateUIEvent
& cmd
);
208 void OnViewFullScreenUpdate(wxUpdateUIEvent
&);
209 void OnViewFullScreen();
211 void OnViewBoundingBoxUpdate(wxUpdateUIEvent
&);
212 void OnViewBoundingBox();
214 void OnViewTerrainUpdate(wxUpdateUIEvent
&);
215 void OnViewTerrain();