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 OnColourByGradient();
79 void OnColourByLength();
81 void OnShowStationNames();
82 void OnShowSurveyLegs();
84 void OnShowSplaysNormal();
85 void OnShowSplaysFaded();
91 void OnToggleRotation();
92 void OnReverseControls();
93 void OnSlowDown(bool accel
= false);
94 void OnSpeedUp(bool accel
= false);
95 void OnStepOnceAnticlockwise(bool accel
= false);
96 void OnStepOnceClockwise(bool accel
= false);
97 void OnHigherViewpoint(bool accel
= false);
98 void OnLowerViewpoint(bool accel
= false);
99 void OnShiftDisplayDown(bool accel
= false);
100 void OnShiftDisplayLeft(bool accel
= false);
101 void OnShiftDisplayRight(bool accel
= false);
102 void OnShiftDisplayUp(bool accel
= false);
103 void OnZoomIn(bool accel
= false);
104 void OnZoomOut(bool accel
= false);
105 void OnToggleScalebar();
106 void OnToggleColourKey();
107 void OnViewCompass();
110 void OnReverseDirectionOfRotation();
111 void OnShowEntrances();
112 void OnShowFixedPts();
113 void OnShowExportedPts();
114 void OnCancelDistLine();
115 void OnMouseMove(wxMouseEvent
& event
);
116 void OnLButtonDown(wxMouseEvent
& event
);
117 void OnLButtonUp(wxMouseEvent
& event
);
118 void OnMButtonDown(wxMouseEvent
& event
);
119 void OnMButtonUp(wxMouseEvent
& event
);
120 void OnRButtonDown(wxMouseEvent
& event
);
121 void OnRButtonUp(wxMouseEvent
& event
);
122 void OnMouseWheel(wxMouseEvent
& event
);
123 void OnKeyPress(wxKeyEvent
&e
);
125 void OnDisplayOverlappingNamesUpdate(wxUpdateUIEvent
&);
126 void OnColourByUpdate(wxUpdateUIEvent
&);
127 void OnColourByDepthUpdate(wxUpdateUIEvent
&);
128 void OnColourByDateUpdate(wxUpdateUIEvent
&);
129 void OnColourByErrorUpdate(wxUpdateUIEvent
&);
130 void OnColourByGradientUpdate(wxUpdateUIEvent
&);
131 void OnColourByLengthUpdate(wxUpdateUIEvent
&);
132 void OnShowCrossesUpdate(wxUpdateUIEvent
&);
133 void OnShowStationNamesUpdate(wxUpdateUIEvent
&);
134 void OnShowSurveyLegsUpdate(wxUpdateUIEvent
&);
135 void OnSplaysUpdate(wxUpdateUIEvent
&);
136 void OnHideSplaysUpdate(wxUpdateUIEvent
&);
137 void OnShowSplaysNormalUpdate(wxUpdateUIEvent
&);
138 void OnShowSplaysFadedUpdate(wxUpdateUIEvent
&);
139 void OnShowSurfaceUpdate(wxUpdateUIEvent
&);
140 void OnMoveEastUpdate(wxUpdateUIEvent
&);
141 void OnMoveNorthUpdate(wxUpdateUIEvent
&);
142 void OnMoveSouthUpdate(wxUpdateUIEvent
&);
143 void OnMoveWestUpdate(wxUpdateUIEvent
&);
144 void OnToggleRotationUpdate(wxUpdateUIEvent
&);
145 void OnReverseControlsUpdate(wxUpdateUIEvent
&);
146 void OnReverseDirectionOfRotationUpdate(wxUpdateUIEvent
&);
147 void OnDefaultsUpdate(wxUpdateUIEvent
&);
148 void OnElevationUpdate(wxUpdateUIEvent
&);
149 void OnPlanUpdate(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
&);
159 void OnIndicatorsUpdate(wxUpdateUIEvent
&);
160 void OnCancelDistLineUpdate(wxUpdateUIEvent
&);
162 void OnViewPerspective();
163 void OnViewPerspectiveUpdate(wxUpdateUIEvent
& cmd
);
165 void OnViewSmoothShading();
166 void OnViewSmoothShadingUpdate(wxUpdateUIEvent
& cmd
);
168 void OnViewTextured();
169 void OnViewTexturedUpdate(wxUpdateUIEvent
& cmd
);
172 void OnViewFogUpdate(wxUpdateUIEvent
& cmd
);
174 void OnViewSmoothLines();
175 void OnViewSmoothLinesUpdate(wxUpdateUIEvent
& cmd
);
177 void OnToggleMetric();
178 void OnToggleMetricUpdate(wxUpdateUIEvent
& cmd
);
180 void OnToggleDegrees();
181 void OnToggleDegreesUpdate(wxUpdateUIEvent
& cmd
);
183 void OnTogglePercent();
184 void OnTogglePercentUpdate(wxUpdateUIEvent
& cmd
);
186 void OnToggleTubes();
187 void OnToggleTubesUpdate(wxUpdateUIEvent
& cmd
);
189 void OnViewFullScreenUpdate(wxUpdateUIEvent
&);
190 void OnViewFullScreen();
192 void OnViewBoundingBoxUpdate(wxUpdateUIEvent
&);
193 void OnViewBoundingBox();
195 void OnViewTerrainUpdate(wxUpdateUIEvent
&);
196 void OnViewTerrain();