| [5809313] | 1 | // |
|---|
| 2 | // mainfrm.h |
|---|
| 3 | // |
|---|
| 4 | // Main frame handling for Aven. |
|---|
| 5 | // |
|---|
| [f4c5932] | 6 | // Copyright (C) 2000-2003,2005 Mark R. Shinwell |
|---|
| [f10cf8f] | 7 | // Copyright (C) 2001-2003,2004,2005,2006,2010,2011,2012,2013,2014 Olly Betts |
|---|
| [5809313] | 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 |
|---|
| [5809313] | 22 | // |
|---|
| 23 | |
|---|
| 24 | #ifndef mainfrm_h |
|---|
| 25 | #define mainfrm_h |
|---|
| 26 | |
|---|
| [3ddcad8] | 27 | #include "wx.h" |
|---|
| [0580c6a] | 28 | #include <wx/docview.h> // for m_FileHistory |
|---|
| [1690fa9] | 29 | #include <wx/listctrl.h> |
|---|
| [203d2a7] | 30 | #include <wx/notebook.h> |
|---|
| [ce403f1] | 31 | #include <wx/print.h> |
|---|
| 32 | #include <wx/printdlg.h> |
|---|
| 33 | |
|---|
| [156dc16] | 34 | #include "aventreectrl.h" |
|---|
| [db36155] | 35 | #include "gfxcore.h" |
|---|
| [5876fcb] | 36 | #include "guicontrol.h" |
|---|
| [a405bc1] | 37 | #include "img_hosted.h" |
|---|
| [db36155] | 38 | #include "message.h" |
|---|
| 39 | #include "vector3.h" |
|---|
| [5627cbb] | 40 | #include "aven.h" |
|---|
| [9c3d91e] | 41 | //#include "prefsdlg.h" |
|---|
| [156dc16] | 42 | |
|---|
| [137bf99] | 43 | #include <list> |
|---|
| [3ddcad8] | 44 | #include <vector> |
|---|
| [5809313] | 45 | |
|---|
| [137bf99] | 46 | using namespace std; |
|---|
| [5341d94] | 47 | |
|---|
| [f17e6dc6] | 48 | #include <math.h> |
|---|
| [f10cf8f] | 49 | #include <time.h> |
|---|
| [f17e6dc6] | 50 | |
|---|
| [1690fa9] | 51 | #define MARK_FIRST 1 |
|---|
| 52 | #define MARK_NEXT 2 |
|---|
| [128fac4] | 53 | #define MARK_PREV 3 |
|---|
| [1690fa9] | 54 | |
|---|
| [137bf99] | 55 | enum { |
|---|
| [42c7efe] | 56 | menu_FILE_PAGE_SETUP = 1000, |
|---|
| [045e2af] | 57 | menu_FILE_SCREENSHOT, |
|---|
| [223f1ad] | 58 | menu_FILE_EXPORT, |
|---|
| [1690fa9] | 59 | menu_PRES_NEW, |
|---|
| 60 | menu_PRES_OPEN, |
|---|
| 61 | menu_PRES_SAVE, |
|---|
| 62 | menu_PRES_SAVE_AS, |
|---|
| 63 | menu_PRES_MARK, |
|---|
| [6a4cdcb6] | 64 | menu_PRES_EXPORT_MOVIE, |
|---|
| [128fac4] | 65 | menu_PRES_FREWIND, |
|---|
| 66 | menu_PRES_REWIND, |
|---|
| 67 | menu_PRES_REVERSE, |
|---|
| 68 | menu_PRES_PLAY, |
|---|
| 69 | menu_PRES_FF, |
|---|
| 70 | menu_PRES_FFF, |
|---|
| 71 | menu_PRES_PAUSE, |
|---|
| [137bf99] | 72 | menu_ROTATION_START, |
|---|
| 73 | menu_ROTATION_STOP, |
|---|
| [2d9ed8ad] | 74 | menu_ROTATION_TOGGLE, |
|---|
| [137bf99] | 75 | menu_ROTATION_SPEED_UP, |
|---|
| 76 | menu_ROTATION_SLOW_DOWN, |
|---|
| 77 | menu_ROTATION_REVERSE, |
|---|
| 78 | menu_ROTATION_STEP_CCW, |
|---|
| 79 | menu_ROTATION_STEP_CW, |
|---|
| 80 | menu_ORIENT_MOVE_NORTH, |
|---|
| 81 | menu_ORIENT_MOVE_EAST, |
|---|
| 82 | menu_ORIENT_MOVE_SOUTH, |
|---|
| 83 | menu_ORIENT_MOVE_WEST, |
|---|
| 84 | menu_ORIENT_SHIFT_LEFT, |
|---|
| 85 | menu_ORIENT_SHIFT_RIGHT, |
|---|
| 86 | menu_ORIENT_SHIFT_UP, |
|---|
| 87 | menu_ORIENT_SHIFT_DOWN, |
|---|
| 88 | menu_ORIENT_PLAN, |
|---|
| 89 | menu_ORIENT_ELEVATION, |
|---|
| 90 | menu_ORIENT_HIGHER_VP, |
|---|
| 91 | menu_ORIENT_LOWER_VP, |
|---|
| 92 | menu_ORIENT_DEFAULTS, |
|---|
| 93 | menu_VIEW_SHOW_LEGS, |
|---|
| [9cb97b7] | 94 | menu_VIEW_SPLAYS, |
|---|
| [8666fc7] | 95 | menu_SPLAYS_HIDE, |
|---|
| 96 | menu_SPLAYS_SHOW_FADED, |
|---|
| 97 | menu_SPLAYS_SHOW_NORMAL, |
|---|
| [137bf99] | 98 | menu_VIEW_SHOW_CROSSES, |
|---|
| 99 | menu_VIEW_SHOW_NAMES, |
|---|
| 100 | menu_VIEW_SHOW_SURFACE, |
|---|
| 101 | menu_VIEW_SHOW_OVERLAPPING_NAMES, |
|---|
| [fe444b8] | 102 | menu_VIEW_SHOW_ENTRANCES, |
|---|
| 103 | menu_VIEW_SHOW_FIXED_PTS, |
|---|
| 104 | menu_VIEW_SHOW_EXPORTED_PTS, |
|---|
| [137bf99] | 105 | menu_VIEW_STATUS_BAR, |
|---|
| [c1cf79d] | 106 | menu_VIEW_GRID, |
|---|
| [f4c5932] | 107 | menu_VIEW_BOUNDING_BOX, |
|---|
| [33b2094] | 108 | menu_VIEW_SHOW_TUBES, |
|---|
| [6abab84] | 109 | menu_VIEW_PERSPECTIVE, |
|---|
| [d67450e] | 110 | menu_VIEW_SMOOTH_SHADING, |
|---|
| [a517825] | 111 | menu_VIEW_TEXTURED, |
|---|
| [c60062d] | 112 | menu_VIEW_FOG, |
|---|
| [db452ae] | 113 | menu_VIEW_SMOOTH_LINES, |
|---|
| [b13aee4] | 114 | menu_VIEW_FULLSCREEN, |
|---|
| [da6c802] | 115 | menu_VIEW_COLOUR_BY_DEPTH, |
|---|
| [d4650b3] | 116 | menu_VIEW_COLOUR_BY_DATE, |
|---|
| [c61aa79] | 117 | menu_VIEW_COLOUR_BY_ERROR, |
|---|
| [7a36b67] | 118 | menu_IND_COMPASS, |
|---|
| 119 | menu_IND_CLINO, |
|---|
| [97ea48d] | 120 | menu_IND_COLOUR_KEY, |
|---|
| [7a36b67] | 121 | menu_IND_SCALE_BAR, |
|---|
| 122 | menu_CTL_INDICATORS, |
|---|
| 123 | menu_CTL_SIDE_PANEL, |
|---|
| 124 | menu_CTL_METRIC, |
|---|
| 125 | menu_CTL_DEGREES, |
|---|
| 126 | menu_CTL_REVERSE, |
|---|
| 127 | menu_CTL_CANCEL_DIST_LINE, |
|---|
| [429465a] | 128 | textctrl_FIND, |
|---|
| [1690fa9] | 129 | button_HIDE, |
|---|
| 130 | listctrl_PRES |
|---|
| [137bf99] | 131 | }; |
|---|
| 132 | |
|---|
| [d4650b3] | 133 | class PointInfo : public Point { |
|---|
| [1ee204e] | 134 | int date; |
|---|
| [d4650b3] | 135 | |
|---|
| 136 | public: |
|---|
| [1ee204e] | 137 | PointInfo() : Point(), date(-1) { } |
|---|
| 138 | PointInfo(const img_point & pt) : Point(pt), date(-1) { } |
|---|
| 139 | PointInfo(const img_point & pt, int date_) : Point(pt), date(date_) { } |
|---|
| 140 | PointInfo(const Point & p, int date_) : Point(p), date(date_) { } |
|---|
| 141 | int GetDate() const { return date; } |
|---|
| [d4650b3] | 142 | }; |
|---|
| 143 | |
|---|
| 144 | class XSect : public PointInfo { |
|---|
| [3ddcad8] | 145 | friend class MainFrm; |
|---|
| 146 | Double l, r, u, d; |
|---|
| [fc68ad5] | 147 | Double right_bearing; |
|---|
| [3ddcad8] | 148 | |
|---|
| 149 | public: |
|---|
| [fc68ad5] | 150 | XSect() : PointInfo(), l(0), r(0), u(0), d(0), right_bearing(0) { } |
|---|
| [1ee204e] | 151 | XSect(const Point &p, int date_, |
|---|
| [d4650b3] | 152 | Double l_, Double r_, Double u_, Double d_) |
|---|
| [fc68ad5] | 153 | : PointInfo(p, date_), l(l_), r(r_), u(u_), d(d_), right_bearing(0) { } |
|---|
| [3ddcad8] | 154 | Double GetL() const { return l; } |
|---|
| 155 | Double GetR() const { return r; } |
|---|
| 156 | Double GetU() const { return u; } |
|---|
| 157 | Double GetD() const { return d; } |
|---|
| [fc68ad5] | 158 | Double get_right_bearing() const { return right_bearing; } |
|---|
| 159 | void set_right_bearing(Double right_bearing_) { |
|---|
| 160 | right_bearing = right_bearing_; |
|---|
| 161 | } |
|---|
| [3ddcad8] | 162 | }; |
|---|
| 163 | |
|---|
| [dcbcae0] | 164 | #define LFLAG_NOT_ANON 0x01 |
|---|
| 165 | #define LFLAG_NOT_WALL 0x02 |
|---|
| 166 | #define LFLAG_SURFACE 0x04 |
|---|
| 167 | #define LFLAG_UNDERGROUND 0x08 |
|---|
| 168 | #define LFLAG_EXPORTED 0x10 |
|---|
| 169 | #define LFLAG_FIXED 0x20 |
|---|
| 170 | #define LFLAG_ENTRANCE 0x40 |
|---|
| 171 | #define LFLAG_HIGHLIGHTED 0x80 |
|---|
| [fa42426] | 172 | |
|---|
| 173 | class LabelPlotCmp; |
|---|
| [1c6b20d7] | 174 | class AvenPresList; |
|---|
| [fa42426] | 175 | |
|---|
| [4a0e6b35] | 176 | class LabelInfo : public Point { |
|---|
| [137bf99] | 177 | wxString text; |
|---|
| [d92d282] | 178 | unsigned width; |
|---|
| [2d9ed8ad] | 179 | int flags; |
|---|
| [e521e318] | 180 | |
|---|
| 181 | public: |
|---|
| [5a24583] | 182 | wxTreeItemId tree_id; |
|---|
| 183 | |
|---|
| 184 | LabelInfo(const img_point &pt, const wxString &text_, int flags_) |
|---|
| [d309e17] | 185 | : Point(pt), text(text_), flags(flags_) { |
|---|
| [dcbcae0] | 186 | if (text.empty()) |
|---|
| 187 | flags &= ~LFLAG_NOT_ANON; |
|---|
| [d309e17] | 188 | } |
|---|
| [d67450e] | 189 | const wxString & GetText() const { return text; } |
|---|
| [5a24583] | 190 | int get_flags() const { return flags; } |
|---|
| 191 | void set_flags(int mask) { flags |= mask; } |
|---|
| 192 | void clear_flags(int mask) { flags &= ~mask; } |
|---|
| 193 | unsigned get_width() const { return width; } |
|---|
| 194 | void set_width(unsigned width_) { width = width_; } |
|---|
| [2d9ed8ad] | 195 | |
|---|
| [9de9aa2] | 196 | bool IsEntrance() const { return (flags & LFLAG_ENTRANCE) != 0; } |
|---|
| 197 | bool IsFixedPt() const { return (flags & LFLAG_FIXED) != 0; } |
|---|
| 198 | bool IsExportedPt() const { return (flags & LFLAG_EXPORTED) != 0; } |
|---|
| 199 | bool IsUnderground() const { return (flags & LFLAG_UNDERGROUND) != 0; } |
|---|
| 200 | bool IsSurface() const { return (flags & LFLAG_SURFACE) != 0; } |
|---|
| 201 | bool IsHighLighted() const { return (flags & LFLAG_HIGHLIGHTED) != 0; } |
|---|
| [dcbcae0] | 202 | bool IsAnon() const { return (flags & LFLAG_NOT_ANON) == 0; } |
|---|
| 203 | bool IsWall() const { return (flags & LFLAG_NOT_WALL) == 0; } |
|---|
| [137bf99] | 204 | }; |
|---|
| 205 | |
|---|
| [c61aa79] | 206 | class traverse : public vector<PointInfo> { |
|---|
| 207 | public: |
|---|
| 208 | int n_legs; |
|---|
| [8666fc7] | 209 | bool isSplay; |
|---|
| [c61aa79] | 210 | double length; |
|---|
| 211 | double E, H, V; |
|---|
| 212 | |
|---|
| 213 | traverse() : n_legs(0), length(0), E(-1), H(-1), V(-1) { } |
|---|
| 214 | }; |
|---|
| 215 | |
|---|
| [137bf99] | 216 | class MainFrm : public wxFrame { |
|---|
| [732b9b0] | 217 | wxFileHistory m_history; |
|---|
| [9059368] | 218 | int m_SashPosition; |
|---|
| [486c619] | 219 | bool was_showing_sidepanel_before_fullscreen; |
|---|
| [c61aa79] | 220 | list<traverse> traverses; |
|---|
| 221 | list<traverse> surface_traverses; |
|---|
| [ee05463] | 222 | list<vector<XSect> > tubes; |
|---|
| [137bf99] | 223 | list<LabelInfo*> m_Labels; |
|---|
| [d67450e] | 224 | Vector3 m_Ext; |
|---|
| [78c67a6] | 225 | Double m_DepthMin, m_DepthExt; |
|---|
| [1ee204e] | 226 | int m_DateMin, m_DateExt; |
|---|
| [a74b014] | 227 | bool complete_dateinfo; |
|---|
| [137bf99] | 228 | GfxCore* m_Gfx; |
|---|
| [5876fcb] | 229 | GUIControl* m_Control; |
|---|
| [a9a32f2] | 230 | int m_NumEntrances; |
|---|
| 231 | int m_NumFixedPts; |
|---|
| 232 | int m_NumExportedPts; |
|---|
| [429465a] | 233 | int m_NumHighlighted; |
|---|
| [f433fda] | 234 | bool m_HasUndergroundLegs; |
|---|
| [5fe7292] | 235 | bool m_HasSplays; |
|---|
| [f433fda] | 236 | bool m_HasSurfaceLegs; |
|---|
| [c61aa79] | 237 | bool m_HasErrorInformation; |
|---|
| [156dc16] | 238 | wxSplitterWindow* m_Splitter; |
|---|
| 239 | AvenTreeCtrl* m_Tree; |
|---|
| 240 | wxTextCtrl* m_FindBox; |
|---|
| [f315fa7] | 241 | // wxCheckBox* m_RegexpCheckBox; |
|---|
| [203d2a7] | 242 | wxNotebook* m_Notebook; |
|---|
| [1c6b20d7] | 243 | AvenPresList* m_PresList; |
|---|
| [156dc16] | 244 | wxString m_File; |
|---|
| [223f1ad] | 245 | wxString m_Title, m_DateStamp; |
|---|
| [f10cf8f] | 246 | time_t m_DateStamp_numeric; |
|---|
| [ff9f695] | 247 | wxChar separator; // character separating survey levels (often '.') |
|---|
| [db36155] | 248 | Vector3 m_Offsets; |
|---|
| [a6f081c] | 249 | |
|---|
| [95fa391] | 250 | wxString icon_path; |
|---|
| 251 | |
|---|
| [7c29c976] | 252 | // Strings for status bar reporting of distances. |
|---|
| [0633bcc] | 253 | wxString here_text, coords_text, dist_text, distfree_text; |
|---|
| [7c29c976] | 254 | |
|---|
| [eef68f9] | 255 | bool m_IsExtendedElevation; |
|---|
| [bc60689] | 256 | bool pending_find; |
|---|
| 257 | |
|---|
| 258 | #ifdef PREFDLG |
|---|
| 259 | PrefsDlg* m_PrefsDlg; |
|---|
| 260 | #endif |
|---|
| [eef68f9] | 261 | |
|---|
| [156dc16] | 262 | void FillTree(); |
|---|
| [b88b171] | 263 | bool ProcessSVXFile(const wxString & file); |
|---|
| [5627cbb] | 264 | bool LoadData(const wxString& file, wxString prefix = wxString()); |
|---|
| [c61aa79] | 265 | // void FixLRUD(traverse & centreline); |
|---|
| [d67450e] | 266 | void CentreDataset(const Vector3 & vmin); |
|---|
| [137bf99] | 267 | |
|---|
| [9d3d8cc] | 268 | void CreateMenuBar(); |
|---|
| 269 | void CreateToolBar(); |
|---|
| 270 | void CreateSidePanel(); |
|---|
| 271 | |
|---|
| [7c29c976] | 272 | void UpdateStatusBar(); |
|---|
| 273 | |
|---|
| [bc73093] | 274 | void AddToFileHistory(const wxString & file); |
|---|
| 275 | |
|---|
| [137bf99] | 276 | public: |
|---|
| 277 | MainFrm(const wxString& title, const wxPoint& pos, const wxSize& size); |
|---|
| [5809313] | 278 | |
|---|
| [fb5887c] | 279 | void InitialiseAfterLoad(const wxString & file); |
|---|
| 280 | |
|---|
| [732b9b0] | 281 | void OnMRUFile(wxCommandEvent& event); |
|---|
| [5627cbb] | 282 | void OpenFile(const wxString& file, wxString survey = wxString()); |
|---|
| [1690fa9] | 283 | |
|---|
| 284 | void OnPresNewUpdate(wxUpdateUIEvent& event); |
|---|
| 285 | void OnPresOpenUpdate(wxUpdateUIEvent& event); |
|---|
| 286 | void OnPresSaveUpdate(wxUpdateUIEvent& event); |
|---|
| 287 | void OnPresSaveAsUpdate(wxUpdateUIEvent& event); |
|---|
| 288 | void OnPresMarkUpdate(wxUpdateUIEvent& event); |
|---|
| [128fac4] | 289 | void OnPresFRewindUpdate(wxUpdateUIEvent& event); |
|---|
| 290 | void OnPresRewindUpdate(wxUpdateUIEvent& event); |
|---|
| 291 | void OnPresReverseUpdate(wxUpdateUIEvent& event); |
|---|
| 292 | void OnPresPlayUpdate(wxUpdateUIEvent& event); |
|---|
| 293 | void OnPresFFUpdate(wxUpdateUIEvent& event); |
|---|
| 294 | void OnPresFFFUpdate(wxUpdateUIEvent& event); |
|---|
| 295 | void OnPresPauseUpdate(wxUpdateUIEvent& event); |
|---|
| 296 | void OnPresStopUpdate(wxUpdateUIEvent& event); |
|---|
| [6a4cdcb6] | 297 | void OnPresExportMovieUpdate(wxUpdateUIEvent& event); |
|---|
| [1690fa9] | 298 | //void OnFileOpenTerrainUpdate(wxUpdateUIEvent& event); |
|---|
| [137bf99] | 299 | |
|---|
| [bc60689] | 300 | void DoFind(); |
|---|
| [2a02de2] | 301 | void OnFind(wxCommandEvent& event); |
|---|
| [bc60689] | 302 | void OnIdle(wxIdleEvent& event); |
|---|
| [d1628e8e] | 303 | void OnGotoFound(wxCommandEvent& event); |
|---|
| [2a02de2] | 304 | void OnHide(wxCommandEvent& event); |
|---|
| [429465a] | 305 | void OnHideUpdate(wxUpdateUIEvent& ui); |
|---|
| [2a02de2] | 306 | |
|---|
| [5809313] | 307 | void OnOpen(wxCommandEvent& event); |
|---|
| [045e2af] | 308 | void OnScreenshot(wxCommandEvent& event); |
|---|
| 309 | void OnScreenshotUpdate(wxUpdateUIEvent& event); |
|---|
| [02c7c1a] | 310 | void OnFilePreferences(wxCommandEvent& event); |
|---|
| [8000d8f] | 311 | void OnFileOpenTerrain(wxCommandEvent& event); |
|---|
| [ce403f1] | 312 | void OnPrint(wxCommandEvent& event); |
|---|
| 313 | void OnPageSetup(wxCommandEvent& event); |
|---|
| [1690fa9] | 314 | void OnPresNew(wxCommandEvent& event); |
|---|
| 315 | void OnPresOpen(wxCommandEvent& event); |
|---|
| 316 | void OnPresSave(wxCommandEvent& event); |
|---|
| 317 | void OnPresSaveAs(wxCommandEvent& event); |
|---|
| 318 | void OnPresMark(wxCommandEvent& event); |
|---|
| [128fac4] | 319 | void OnPresFRewind(wxCommandEvent& event); |
|---|
| 320 | void OnPresRewind(wxCommandEvent& event); |
|---|
| 321 | void OnPresReverse(wxCommandEvent& event); |
|---|
| 322 | void OnPresPlay(wxCommandEvent& event); |
|---|
| 323 | void OnPresFF(wxCommandEvent& event); |
|---|
| 324 | void OnPresFFF(wxCommandEvent& event); |
|---|
| 325 | void OnPresPause(wxCommandEvent& event); |
|---|
| 326 | void OnPresStop(wxCommandEvent& event); |
|---|
| [6a4cdcb6] | 327 | void OnPresExportMovie(wxCommandEvent& event); |
|---|
| [223f1ad] | 328 | void OnExport(wxCommandEvent& event); |
|---|
| [5809313] | 329 | void OnQuit(wxCommandEvent& event); |
|---|
| [5ffa439] | 330 | |
|---|
| [573f4e9] | 331 | void OnAbout(wxCommandEvent& event); |
|---|
| [137bf99] | 332 | void OnClose(wxCloseEvent&); |
|---|
| 333 | |
|---|
| [b4fe9fb] | 334 | void OnSetFocus(wxFocusEvent &) { if (m_Gfx) m_Gfx->SetFocus(); } |
|---|
| [4b1fc48] | 335 | |
|---|
| [26fac5a] | 336 | void OnKeyPress(wxKeyEvent &e) { |
|---|
| 337 | if (m_Gfx) { |
|---|
| 338 | m_Gfx->SetFocus(); |
|---|
| 339 | m_Gfx->OnKeyPress(e); |
|---|
| 340 | } |
|---|
| 341 | } |
|---|
| 342 | |
|---|
| [ce403f1] | 343 | void OnPrintUpdate(wxUpdateUIEvent &ui) { ui.Enable(!m_File.empty()); } |
|---|
| [223f1ad] | 344 | void OnExportUpdate(wxUpdateUIEvent &ui) { ui.Enable(!m_File.empty()); } |
|---|
| 345 | |
|---|
| [137bf99] | 346 | // temporary bodges until event handling problem is sorted out: |
|---|
| [5876fcb] | 347 | void OnDefaultsUpdate(wxUpdateUIEvent& event) { if (m_Control) m_Control->OnDefaultsUpdate(event); } |
|---|
| 348 | void OnPlanUpdate(wxUpdateUIEvent& event) { if (m_Control) m_Control->OnPlanUpdate(event); } |
|---|
| 349 | void OnElevationUpdate(wxUpdateUIEvent& event) { if (m_Control) m_Control->OnElevationUpdate(event); } |
|---|
| 350 | void OnDisplayOverlappingNamesUpdate(wxUpdateUIEvent& event) { if (m_Control) m_Control->OnDisplayOverlappingNamesUpdate(event); } |
|---|
| [da6c802] | 351 | void OnColourByDepthUpdate(wxUpdateUIEvent& event) { if (m_Control) m_Control->OnColourByDepthUpdate(event); } |
|---|
| [d4650b3] | 352 | void OnColourByDateUpdate(wxUpdateUIEvent& event) { if (m_Control) m_Control->OnColourByDateUpdate(event); } |
|---|
| [c61aa79] | 353 | void OnColourByErrorUpdate(wxUpdateUIEvent& event) { if (m_Control) m_Control->OnColourByErrorUpdate(event); } |
|---|
| [5876fcb] | 354 | void OnShowCrossesUpdate(wxUpdateUIEvent& event) { if (m_Control) m_Control->OnShowCrossesUpdate(event); } |
|---|
| 355 | void OnShowEntrancesUpdate(wxUpdateUIEvent& event) { if (m_Control) m_Control->OnShowEntrancesUpdate(event); } |
|---|
| 356 | void OnShowFixedPtsUpdate(wxUpdateUIEvent& event) { if (m_Control) m_Control->OnShowFixedPtsUpdate(event); } |
|---|
| 357 | void OnShowExportedPtsUpdate(wxUpdateUIEvent& event) { if (m_Control) m_Control->OnShowExportedPtsUpdate(event); } |
|---|
| 358 | void OnShowStationNamesUpdate(wxUpdateUIEvent& event) { if (m_Control) m_Control->OnShowStationNamesUpdate(event); } |
|---|
| 359 | void OnShowSurveyLegsUpdate(wxUpdateUIEvent& event) { if (m_Control) m_Control->OnShowSurveyLegsUpdate(event); } |
|---|
| [9cb97b7] | 360 | void OnSplaysUpdate(wxUpdateUIEvent& event) { if (m_Control) m_Control->OnSplaysUpdate(event); } |
|---|
| [8666fc7] | 361 | void OnHideSplaysUpdate(wxUpdateUIEvent& event) { if (m_Control) m_Control->OnHideSplaysUpdate(event); } |
|---|
| 362 | void OnShowSplaysNormalUpdate(wxUpdateUIEvent& event) { if (m_Control) m_Control->OnShowSplaysNormalUpdate(event); } |
|---|
| 363 | void OnShowSplaysFadedUpdate(wxUpdateUIEvent& event) { if (m_Control) m_Control->OnShowSplaysFadedUpdate(event); } |
|---|
| [5876fcb] | 364 | void OnShowSurfaceUpdate(wxUpdateUIEvent& event) { if (m_Control) m_Control->OnShowSurfaceUpdate(event); } |
|---|
| 365 | void OnMoveEastUpdate(wxUpdateUIEvent& event) { if (m_Control) m_Control->OnMoveEastUpdate(event); } |
|---|
| 366 | void OnMoveNorthUpdate(wxUpdateUIEvent& event) { if (m_Control) m_Control->OnMoveNorthUpdate(event); } |
|---|
| 367 | void OnMoveSouthUpdate(wxUpdateUIEvent& event) { if (m_Control) m_Control->OnMoveSouthUpdate(event); } |
|---|
| 368 | void OnMoveWestUpdate(wxUpdateUIEvent& event) { if (m_Control) m_Control->OnMoveWestUpdate(event); } |
|---|
| 369 | void OnToggleRotationUpdate(wxUpdateUIEvent& event) { if (m_Control) m_Control->OnToggleRotationUpdate(event); } |
|---|
| 370 | void OnReverseControlsUpdate(wxUpdateUIEvent& event) { if (m_Control) m_Control->OnReverseControlsUpdate(event); } |
|---|
| 371 | void OnSlowDownUpdate(wxUpdateUIEvent& event) { if (m_Control) m_Control->OnSlowDownUpdate(event); } |
|---|
| 372 | void OnSpeedUpUpdate(wxUpdateUIEvent& event) { if (m_Control) m_Control->OnSpeedUpUpdate(event); } |
|---|
| 373 | void OnStepOnceAnticlockwiseUpdate(wxUpdateUIEvent& event) { if (m_Control) m_Control->OnStepOnceAnticlockwiseUpdate(event); } |
|---|
| 374 | void OnStepOnceClockwiseUpdate(wxUpdateUIEvent& event) { if (m_Control) m_Control->OnStepOnceClockwiseUpdate(event); } |
|---|
| 375 | void OnHigherViewpointUpdate(wxUpdateUIEvent& event) { if (m_Control) m_Control->OnHigherViewpointUpdate(event); } |
|---|
| 376 | void OnLowerViewpointUpdate(wxUpdateUIEvent& event) { if (m_Control) m_Control->OnLowerViewpointUpdate(event); } |
|---|
| 377 | void OnShiftDisplayDownUpdate(wxUpdateUIEvent& event) { if (m_Control) m_Control->OnShiftDisplayDownUpdate(event); } |
|---|
| 378 | void OnShiftDisplayLeftUpdate(wxUpdateUIEvent& event) { if (m_Control) m_Control->OnShiftDisplayLeftUpdate(event); } |
|---|
| 379 | void OnShiftDisplayRightUpdate(wxUpdateUIEvent& event) { if (m_Control) m_Control->OnShiftDisplayRightUpdate(event); } |
|---|
| 380 | void OnShiftDisplayUpUpdate(wxUpdateUIEvent& event) { if (m_Control) m_Control->OnShiftDisplayUpUpdate(event); } |
|---|
| 381 | void OnZoomInUpdate(wxUpdateUIEvent& event) { if (m_Control) m_Control->OnZoomInUpdate(event); } |
|---|
| 382 | void OnZoomOutUpdate(wxUpdateUIEvent& event) { if (m_Control) m_Control->OnZoomOutUpdate(event); } |
|---|
| 383 | void OnToggleScalebarUpdate(wxUpdateUIEvent& event) { if (m_Control) m_Control->OnToggleScalebarUpdate(event); } |
|---|
| [97ea48d] | 384 | void OnToggleColourKeyUpdate(wxUpdateUIEvent& event) { if (m_Control) m_Control->OnToggleColourKeyUpdate(event); } |
|---|
| [5876fcb] | 385 | void OnViewCompassUpdate(wxUpdateUIEvent& event) { if (m_Control) m_Control->OnViewCompassUpdate(event); } |
|---|
| 386 | void OnViewGridUpdate(wxUpdateUIEvent& event) { if (m_Control) m_Control->OnViewGridUpdate(event); } |
|---|
| [f4c5932] | 387 | void OnViewBoundingBoxUpdate(wxUpdateUIEvent& event) { if (m_Control) m_Control->OnViewBoundingBoxUpdate(event); } |
|---|
| [5876fcb] | 388 | void OnViewClinoUpdate(wxUpdateUIEvent& event) { if (m_Control) m_Control->OnViewClinoUpdate(event); } |
|---|
| [6abab84] | 389 | void OnViewPerspectiveUpdate(wxUpdateUIEvent& event) { if (m_Control) m_Control->OnViewPerspectiveUpdate(event); } |
|---|
| [d67450e] | 390 | void OnViewSmoothShadingUpdate(wxUpdateUIEvent& event) { if (m_Control) m_Control->OnViewSmoothShadingUpdate(event); } |
|---|
| [a517825] | 391 | void OnViewTexturedUpdate(wxUpdateUIEvent& event) { if (m_Control) m_Control->OnViewTexturedUpdate(event); } |
|---|
| [c60062d] | 392 | void OnViewFogUpdate(wxUpdateUIEvent& event) { if (m_Control) m_Control->OnViewFogUpdate(event); } |
|---|
| [db452ae] | 393 | void OnViewSmoothLinesUpdate(wxUpdateUIEvent& event) { if (m_Control) m_Control->OnViewSmoothLinesUpdate(event); } |
|---|
| [b13aee4] | 394 | void OnViewFullScreenUpdate(wxUpdateUIEvent& event) { if (m_Control) m_Control->OnViewFullScreenUpdate(event); } |
|---|
| [5876fcb] | 395 | void OnReverseDirectionOfRotationUpdate(wxUpdateUIEvent& event) { if (m_Control) m_Control->OnReverseDirectionOfRotationUpdate(event); } |
|---|
| 396 | void OnCancelDistLineUpdate(wxUpdateUIEvent& event) { if (m_Control) m_Control->OnCancelDistLineUpdate(event); } |
|---|
| 397 | void OnIndicatorsUpdate(wxUpdateUIEvent& event) { if (m_Control) m_Control->OnIndicatorsUpdate(event); } |
|---|
| 398 | |
|---|
| [b4fe9fb] | 399 | void OnDefaults(wxCommandEvent&) { if (m_Control) m_Control->OnDefaults(); } |
|---|
| 400 | void OnPlan(wxCommandEvent&) { if (m_Control) m_Control->OnPlan(); } |
|---|
| 401 | void OnElevation(wxCommandEvent&) { if (m_Control) m_Control->OnElevation(); } |
|---|
| 402 | void OnDisplayOverlappingNames(wxCommandEvent&) { if (m_Control) m_Control->OnDisplayOverlappingNames(); } |
|---|
| [da6c802] | 403 | void OnColourByDepth(wxCommandEvent&) { if (m_Control) m_Control->OnColourByDepth(); } |
|---|
| [d4650b3] | 404 | void OnColourByDate(wxCommandEvent&) { if (m_Control) m_Control->OnColourByDate(); } |
|---|
| [c61aa79] | 405 | void OnColourByError(wxCommandEvent&) { if (m_Control) m_Control->OnColourByError(); } |
|---|
| [b4fe9fb] | 406 | void OnShowCrosses(wxCommandEvent&) { if (m_Control) m_Control->OnShowCrosses(); } |
|---|
| 407 | void OnShowEntrances(wxCommandEvent&) { if (m_Control) m_Control->OnShowEntrances(); } |
|---|
| 408 | void OnShowFixedPts(wxCommandEvent&) { if (m_Control) m_Control->OnShowFixedPts(); } |
|---|
| 409 | void OnShowExportedPts(wxCommandEvent&) { if (m_Control) m_Control->OnShowExportedPts(); } |
|---|
| 410 | void OnShowStationNames(wxCommandEvent&) { if (m_Control) m_Control->OnShowStationNames(); } |
|---|
| 411 | void OnShowSurveyLegs(wxCommandEvent&) { if (m_Control) m_Control->OnShowSurveyLegs(); } |
|---|
| [8666fc7] | 412 | void OnHideSplays(wxCommandEvent&) { if (m_Control) m_Control->OnHideSplays(); } |
|---|
| 413 | void OnShowSplaysNormal(wxCommandEvent&) { if (m_Control) m_Control->OnShowSplaysNormal(); } |
|---|
| 414 | void OnShowSplaysFaded(wxCommandEvent&) { if (m_Control) m_Control->OnShowSplaysFaded(); } |
|---|
| [b4fe9fb] | 415 | void OnShowSurface(wxCommandEvent&) { if (m_Control) m_Control->OnShowSurface(); } |
|---|
| 416 | void OnMoveEast(wxCommandEvent&) { if (m_Control) m_Control->OnMoveEast(); } |
|---|
| 417 | void OnMoveNorth(wxCommandEvent&) { if (m_Control) m_Control->OnMoveNorth(); } |
|---|
| 418 | void OnMoveSouth(wxCommandEvent&) { if (m_Control) m_Control->OnMoveSouth(); } |
|---|
| 419 | void OnMoveWest(wxCommandEvent&) { if (m_Control) m_Control->OnMoveWest(); } |
|---|
| 420 | void OnToggleRotation(wxCommandEvent&) { if (m_Control) m_Control->OnToggleRotation(); } |
|---|
| 421 | void OnReverseControls(wxCommandEvent&) { if (m_Control) m_Control->OnReverseControls(); } |
|---|
| 422 | void OnSlowDown(wxCommandEvent&) { if (m_Control) m_Control->OnSlowDown(); } |
|---|
| 423 | void OnSpeedUp(wxCommandEvent&) { if (m_Control) m_Control->OnSpeedUp(); } |
|---|
| 424 | void OnStepOnceAnticlockwise(wxCommandEvent&) { if (m_Control) m_Control->OnStepOnceAnticlockwise(); } |
|---|
| 425 | void OnStepOnceClockwise(wxCommandEvent&) { if (m_Control) m_Control->OnStepOnceClockwise(); } |
|---|
| 426 | void OnHigherViewpoint(wxCommandEvent&) { if (m_Control) m_Control->OnHigherViewpoint(); } |
|---|
| 427 | void OnLowerViewpoint(wxCommandEvent&) { if (m_Control) m_Control->OnLowerViewpoint(); } |
|---|
| 428 | void OnShiftDisplayDown(wxCommandEvent&) { if (m_Control) m_Control->OnShiftDisplayDown(); } |
|---|
| 429 | void OnShiftDisplayLeft(wxCommandEvent&) { if (m_Control) m_Control->OnShiftDisplayLeft(); } |
|---|
| 430 | void OnShiftDisplayRight(wxCommandEvent&) { if (m_Control) m_Control->OnShiftDisplayRight(); } |
|---|
| 431 | void OnShiftDisplayUp(wxCommandEvent&) { if (m_Control) m_Control->OnShiftDisplayUp(); } |
|---|
| 432 | void OnZoomIn(wxCommandEvent&) { if (m_Control) m_Control->OnZoomIn(); } |
|---|
| 433 | void OnZoomOut(wxCommandEvent&) { if (m_Control) m_Control->OnZoomOut(); } |
|---|
| 434 | void OnToggleScalebar(wxCommandEvent&) { if (m_Control) m_Control->OnToggleScalebar(); } |
|---|
| [97ea48d] | 435 | void OnToggleColourKey(wxCommandEvent&) { if (m_Control) m_Control->OnToggleColourKey(); } |
|---|
| [b4fe9fb] | 436 | void OnViewCompass(wxCommandEvent&) { if (m_Control) m_Control->OnViewCompass(); } |
|---|
| 437 | void OnViewClino(wxCommandEvent&) { if (m_Control) m_Control->OnViewClino(); } |
|---|
| 438 | void OnViewGrid(wxCommandEvent&) { if (m_Control) m_Control->OnViewGrid(); } |
|---|
| [f4c5932] | 439 | void OnViewBoundingBox(wxCommandEvent&) { if (m_Control) m_Control->OnViewBoundingBox(); } |
|---|
| [6abab84] | 440 | void OnViewPerspective(wxCommandEvent&) { if (m_Control) m_Control->OnViewPerspective(); } |
|---|
| [d67450e] | 441 | void OnViewSmoothShading(wxCommandEvent&) { if (m_Control) m_Control->OnViewSmoothShading(); } |
|---|
| [a517825] | 442 | void OnViewTextured(wxCommandEvent&) { if (m_Control) m_Control->OnViewTextured(); } |
|---|
| [c60062d] | 443 | void OnViewFog(wxCommandEvent&) { if (m_Control) m_Control->OnViewFog(); } |
|---|
| [db452ae] | 444 | void OnViewSmoothLines(wxCommandEvent&) { if (m_Control) m_Control->OnViewSmoothLines(); } |
|---|
| [c60062d] | 445 | void OnViewFullScreen(wxCommandEvent&) { ViewFullScreen(); } |
|---|
| [fdfa926] | 446 | void ViewFullScreen(); |
|---|
| [b4fe9fb] | 447 | void OnReverseDirectionOfRotation(wxCommandEvent&) { if (m_Control) m_Control->OnReverseDirectionOfRotation(); } |
|---|
| 448 | void OnCancelDistLine(wxCommandEvent&) { if (m_Control) m_Control->OnCancelDistLine(); } |
|---|
| [421b7d2] | 449 | |
|---|
| [5876fcb] | 450 | void OnToggleMetric(wxCommandEvent&) { if (m_Control) m_Control->OnToggleMetric(); } |
|---|
| 451 | void OnToggleDegrees(wxCommandEvent&) { if (m_Control) m_Control->OnToggleDegrees(); } |
|---|
| [33b2094] | 452 | void OnToggleTubes(wxCommandEvent&) { if (m_Control) m_Control->OnToggleTubes(); } |
|---|
| [5757725] | 453 | |
|---|
| [5876fcb] | 454 | void OnToggleMetricUpdate(wxUpdateUIEvent& event) { if (m_Control) m_Control->OnToggleMetricUpdate(event); } |
|---|
| 455 | void OnToggleDegreesUpdate(wxUpdateUIEvent& event) { if (m_Control) m_Control->OnToggleDegreesUpdate(event); } |
|---|
| [33b2094] | 456 | void OnToggleTubesUpdate(wxUpdateUIEvent& event) { if (m_Control) m_Control->OnToggleTubesUpdate(event); } |
|---|
| [5757725] | 457 | |
|---|
| [5876fcb] | 458 | // end of horrible bodges |
|---|
| [f433fda] | 459 | |
|---|
| [9059368] | 460 | void OnViewSidePanelUpdate(wxUpdateUIEvent& event); |
|---|
| 461 | void OnViewSidePanel(wxCommandEvent& event); |
|---|
| [b1de3e0] | 462 | void ToggleSidePanel(); |
|---|
| [203d2a7] | 463 | bool ShowingSidePanel(); |
|---|
| [137bf99] | 464 | |
|---|
| [d67450e] | 465 | const Vector3 & GetExtent() const { return m_Ext; } |
|---|
| 466 | Double GetXExtent() const { return m_Ext.GetX(); } |
|---|
| 467 | Double GetYExtent() const { return m_Ext.GetY(); } |
|---|
| 468 | Double GetZExtent() const { return m_Ext.GetZ(); } |
|---|
| [78c67a6] | 469 | |
|---|
| 470 | Double GetDepthExtent() const { return m_DepthExt; } |
|---|
| 471 | Double GetDepthMin() const { return m_DepthMin; } |
|---|
| [003d953] | 472 | |
|---|
| [a74b014] | 473 | bool HasCompleteDateInfo() const { return complete_dateinfo; } |
|---|
| [1ee204e] | 474 | int GetDateExtent() const { return m_DateExt; } |
|---|
| 475 | int GetDateMin() const { return m_DateMin; } |
|---|
| [d4650b3] | 476 | |
|---|
| [6264918] | 477 | void SelectTreeItem(LabelInfo* label) { |
|---|
| 478 | if (label->tree_id.IsOk()) |
|---|
| 479 | m_Tree->SelectItem(label->tree_id); |
|---|
| 480 | } |
|---|
| [1fd2edb] | 481 | void ClearTreeSelection(); |
|---|
| 482 | |
|---|
| [003d953] | 483 | int GetNumFixedPts() const { return m_NumFixedPts; } |
|---|
| 484 | int GetNumExportedPts() const { return m_NumExportedPts; } |
|---|
| 485 | int GetNumEntrances() const { return m_NumEntrances; } |
|---|
| [429465a] | 486 | int GetNumHighlightedPts() const { return m_NumHighlighted; } |
|---|
| [a9a32f2] | 487 | |
|---|
| [f433fda] | 488 | bool HasUndergroundLegs() const { return m_HasUndergroundLegs; } |
|---|
| [5fe7292] | 489 | bool HasSplays() const { return m_HasSplays; } |
|---|
| [f433fda] | 490 | bool HasSurfaceLegs() const { return m_HasSurfaceLegs; } |
|---|
| [50e8979] | 491 | bool HasTubes() const { return !tubes.empty(); } |
|---|
| [c61aa79] | 492 | bool HasErrorInformation() const { return m_HasErrorInformation; } |
|---|
| [f433fda] | 493 | |
|---|
| [eef68f9] | 494 | bool IsExtendedElevation() const { return m_IsExtendedElevation; } |
|---|
| 495 | |
|---|
| [156dc16] | 496 | void ClearCoords(); |
|---|
| [d67450e] | 497 | void SetCoords(const Vector3 &v); |
|---|
| [0633bcc] | 498 | const LabelInfo * GetTreeSelection() const; |
|---|
| [156dc16] | 499 | void SetCoords(Double x, Double y); |
|---|
| [7a89dc2] | 500 | void SetAltitude(Double z); |
|---|
| [156dc16] | 501 | |
|---|
| [d67450e] | 502 | const Vector3 & GetOffset() const { return m_Offsets; } |
|---|
| [a6f081c] | 503 | |
|---|
| [c61aa79] | 504 | list<traverse>::const_iterator traverses_begin() const { |
|---|
| [3ddcad8] | 505 | return traverses.begin(); |
|---|
| 506 | } |
|---|
| 507 | |
|---|
| [c61aa79] | 508 | list<traverse>::const_iterator traverses_end() const { |
|---|
| [3ddcad8] | 509 | return traverses.end(); |
|---|
| 510 | } |
|---|
| 511 | |
|---|
| [c61aa79] | 512 | list<traverse>::const_iterator surface_traverses_begin() const { |
|---|
| [3ddcad8] | 513 | return surface_traverses.begin(); |
|---|
| [ee119518] | 514 | } |
|---|
| 515 | |
|---|
| [c61aa79] | 516 | list<traverse>::const_iterator surface_traverses_end() const { |
|---|
| [3ddcad8] | 517 | return surface_traverses.end(); |
|---|
| [137bf99] | 518 | } |
|---|
| 519 | |
|---|
| [ee05463] | 520 | list<vector<XSect> >::const_iterator tubes_begin() const { |
|---|
| 521 | return tubes.begin(); |
|---|
| 522 | } |
|---|
| 523 | |
|---|
| 524 | list<vector<XSect> >::const_iterator tubes_end() const { |
|---|
| 525 | return tubes.end(); |
|---|
| 526 | } |
|---|
| 527 | |
|---|
| [fc68ad5] | 528 | list<vector<XSect> >::iterator tubes_begin() { |
|---|
| 529 | return tubes.begin(); |
|---|
| 530 | } |
|---|
| 531 | |
|---|
| 532 | list<vector<XSect> >::iterator tubes_end() { |
|---|
| 533 | return tubes.end(); |
|---|
| 534 | } |
|---|
| 535 | |
|---|
| [fa42426] | 536 | list<LabelInfo*>::const_iterator GetLabels() const { |
|---|
| 537 | return m_Labels.begin(); |
|---|
| 538 | } |
|---|
| 539 | |
|---|
| [003d953] | 540 | list<LabelInfo*>::const_iterator GetLabelsEnd() const { |
|---|
| [421b7d2] | 541 | return m_Labels.end(); |
|---|
| [137bf99] | 542 | } |
|---|
| [5809313] | 543 | |
|---|
| [fa42426] | 544 | list<LabelInfo*>::const_reverse_iterator GetRevLabels() const { |
|---|
| 545 | return m_Labels.rbegin(); |
|---|
| 546 | } |
|---|
| 547 | |
|---|
| 548 | list<LabelInfo*>::const_reverse_iterator GetRevLabelsEnd() const { |
|---|
| 549 | return m_Labels.rend(); |
|---|
| 550 | } |
|---|
| 551 | |
|---|
| [86cdcf2] | 552 | list<LabelInfo*>::iterator GetLabelsNC() { |
|---|
| 553 | return m_Labels.begin(); |
|---|
| 554 | } |
|---|
| 555 | |
|---|
| 556 | list<LabelInfo*>::iterator GetLabelsNCEnd() { |
|---|
| 557 | return m_Labels.end(); |
|---|
| 558 | } |
|---|
| 559 | |
|---|
| [8734409] | 560 | void ShowInfo(const LabelInfo *label); |
|---|
| 561 | void DisplayTreeInfo(const wxTreeItemData* data); |
|---|
| [44ed489] | 562 | void TreeItemSelected(const wxTreeItemData* data, bool zoom); |
|---|
| [1690fa9] | 563 | PresentationMark GetPresMark(int which); |
|---|
| [8bac36d6] | 564 | |
|---|
| [84cab34] | 565 | private: |
|---|
| 566 | DECLARE_EVENT_TABLE() |
|---|
| [5809313] | 567 | }; |
|---|
| 568 | |
|---|
| [4b0bbb0] | 569 | // Older wxGTK loses pop-up dialogs under the always-on-top, maximised window. |
|---|
| 570 | // Not sure when this got fixed, but wx 2.8.10 definitely works properly on |
|---|
| 571 | // Debian squeeze. |
|---|
| 572 | // |
|---|
| 573 | // To work around this issue, create this object on the stack, and it will |
|---|
| 574 | // temporarily un-fullscreen the window while the dialog as a workaround. |
|---|
| [1c6b20d7] | 575 | class AvenAllowOnTop { |
|---|
| [4b0bbb0] | 576 | #if defined __WXGTK__ && !wxCHECK_VERSION(2,8,10) |
|---|
| [d67450e] | 577 | MainFrm * mainfrm; |
|---|
| [1c6b20d7] | 578 | public: |
|---|
| [d67450e] | 579 | AvenAllowOnTop(MainFrm * mainfrm_) { |
|---|
| [c4d9257] | 580 | if (mainfrm_ && mainfrm_->IsFullScreen()) { |
|---|
| [1c6b20d7] | 581 | mainfrm = mainfrm_; |
|---|
| 582 | mainfrm->ViewFullScreen(); |
|---|
| [d67450e] | 583 | } else { |
|---|
| 584 | mainfrm = 0; |
|---|
| [1c6b20d7] | 585 | } |
|---|
| 586 | } |
|---|
| 587 | ~AvenAllowOnTop() { |
|---|
| 588 | if (mainfrm) mainfrm->ViewFullScreen(); |
|---|
| 589 | } |
|---|
| [d67450e] | 590 | #else |
|---|
| 591 | public: |
|---|
| 592 | AvenAllowOnTop(MainFrm *) { } |
|---|
| 593 | #endif |
|---|
| [1c6b20d7] | 594 | }; |
|---|
| 595 | |
|---|
| [5809313] | 596 | #endif |
|---|