source: git/src/mainfrm.h @ abd7d47

RELEASE/1.0RELEASE/1.2debug-cidebug-ci-sanitisersfaster-cavernloglog-selectstereostereo-2025walls-datawalls-data-hanging-as-warningwarn-only-for-hanging-survey
Last change on this file since abd7d47 was 6120efa, checked in by Olly Betts <olly@…>, 22 years ago

Fixes for compiling with MSVC.

git-svn-id: file:///home/survex-svn/survex/trunk@2468 4b37db11-9a0c-4f06-9ece-9ab7cdaee568

  • Property mode set to 100644
File size: 17.5 KB
RevLine 
[5809313]1//
2//  mainfrm.h
3//
4//  Main frame handling for Aven.
5//
6//  Copyright (C) 2000-2001, Mark R. Shinwell.
[2dfd768]7//  Copyright (C) 2001-2003 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
21//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
22//
23
24#ifndef mainfrm_h
25#define mainfrm_h
26
27#include "wx.h"
[732b9b0]28#include "wx/docview.h"
[137bf99]29#include "gfxcore.h"
30#include "message.h"
[156dc16]31#include "aventreectrl.h"
[2d9ed8ad]32#include "img.h"
[156dc16]33
[137bf99]34#include <list>
[e4337cc]35#if 0 // if you turn this back on, reenable the check in configure.in too
[1efb58c]36#ifdef HAVE_EXT_HASH_MAP
[dc8d2eb]37#include <ext/hash_map>
[1efb58c]38#elif defined HAVE_HASH_MAP
[156dc16]39#include <hash_map>
[1efb58c]40#else
41#include <map>
42#define hash_map map
[dc8d2eb]43#endif
[2c30188]44#endif
[5809313]45
[137bf99]46using namespace std;
[5341d94]47
[f17e6dc6]48#include <math.h>
49
50// This is for mingw32/Visual C++:
51#ifndef M_PI
52#define M_PI 3.14159265358979323846
53#endif
54
[137bf99]55extern const int NUM_DEPTH_COLOURS;
56
57enum {
58    menu_FILE_OPEN = 1000,
[156dc16]59    menu_FILE_OPEN_PRES,
[137bf99]60    menu_FILE_QUIT,
61    menu_ROTATION_START,
62    menu_ROTATION_STOP,
[2d9ed8ad]63    menu_ROTATION_TOGGLE,
[137bf99]64    menu_ROTATION_SPEED_UP,
65    menu_ROTATION_SLOW_DOWN,
66    menu_ROTATION_REVERSE,
67    menu_ROTATION_STEP_CCW,
68    menu_ROTATION_STEP_CW,
69    menu_ORIENT_MOVE_NORTH,
70    menu_ORIENT_MOVE_EAST,
71    menu_ORIENT_MOVE_SOUTH,
72    menu_ORIENT_MOVE_WEST,
73    menu_ORIENT_SHIFT_LEFT,
74    menu_ORIENT_SHIFT_RIGHT,
75    menu_ORIENT_SHIFT_UP,
76    menu_ORIENT_SHIFT_DOWN,
77    menu_ORIENT_PLAN,
78    menu_ORIENT_ELEVATION,
79    menu_ORIENT_HIGHER_VP,
80    menu_ORIENT_LOWER_VP,
81    menu_ORIENT_ZOOM_IN,
82    menu_ORIENT_ZOOM_OUT,
83    menu_ORIENT_DEFAULTS,
84    menu_VIEW_SHOW_LEGS,
85    menu_VIEW_SHOW_CROSSES,
86    menu_VIEW_SHOW_NAMES,
87    menu_VIEW_SHOW_SURFACE,
88    menu_VIEW_SURFACE_DEPTH,
89    menu_VIEW_SURFACE_DASHED,
90    menu_VIEW_SHOW_OVERLAPPING_NAMES,
[fe444b8]91    menu_VIEW_SHOW_ENTRANCES,
92    menu_VIEW_SHOW_FIXED_PTS,
93    menu_VIEW_SHOW_EXPORTED_PTS,
[e3513a5]94    menu_VIEW_INDICATORS,
[137bf99]95    menu_VIEW_COMPASS,
96    menu_VIEW_CLINO,
97    menu_VIEW_DEPTH_BAR,
98    menu_VIEW_SCALE_BAR,
99    menu_VIEW_STATUS_BAR,
[c1cf79d]100    menu_VIEW_GRID,
[9059368]101    menu_VIEW_SIDE_PANEL,
[7a89dc2]102    menu_VIEW_METRIC,
103    menu_VIEW_DEGREES,
[156dc16]104    menu_PRES_CREATE,
105    menu_PRES_GO,
106    menu_PRES_GO_BACK,
107    menu_PRES_RESTART,
108    menu_PRES_RECORD,
109    menu_PRES_FINISH,
110    menu_PRES_ERASE,
111    menu_PRES_ERASE_ALL,
[137bf99]112    menu_CTL_REVERSE,
[1fd2edb]113    menu_CTL_CANCEL_DIST_LINE,
[2a02de2]114    menu_HELP_ABOUT,
115    button_FIND,
116    button_HIDE
[137bf99]117};
118
119class PointInfo {
120    friend class MainFrm;
[c6d95d8]121    Double x, y, z;
[137bf99]122    bool isLine; // false => move, true => draw line
123    bool isSurface;
124
125public:
[c6d95d8]126    Double GetX() const { return x; }
127    Double GetY() const { return y; }
128    Double GetZ() const { return z; }
[137bf99]129    bool IsLine() const { return isLine; }
130    bool IsSurface() const { return isSurface; }
131};
132
[fa42426]133#define LFLAG_SURFACE           img_SFLAG_SURFACE
134#define LFLAG_UNDERGROUND       img_SFLAG_UNDERGROUND
135#define LFLAG_EXPORTED          img_SFLAG_EXPORTED
136#define LFLAG_FIXED             img_SFLAG_FIXED
137#define LFLAG_ENTRANCE          0x100
138#define LFLAG_HIGHLIGHTED       0x200
139
140class LabelPlotCmp;
141
[137bf99]142class LabelInfo {
143    friend class MainFrm;
[d5de678]144    friend class GfxCore;
[fa42426]145    friend class LabelPlotCmp;
[c6d95d8]146    Double x, y, z;
[137bf99]147    wxString text;
[2d9ed8ad]148    int flags;
[6dde19f]149    wxTreeItemId tree_id;
[e521e318]150
151public:
[c6d95d8]152    Double GetX() const { return x; }
153    Double GetY() const { return y; }
154    Double GetZ() const { return z; }
[2d9ed8ad]155
[137bf99]156    wxString GetText() const { return text; }
[2d9ed8ad]157
[6120efa]158    bool IsEntrance() const { return (flags & LFLAG_ENTRANCE != 0); }
159    bool IsFixedPt() const { return (flags & LFLAG_FIXED != 0); }
160    bool IsExportedPt() const { return (flags & LFLAG_EXPORTED != 0); }
161    bool IsUnderground() const { return (flags & LFLAG_UNDERGROUND != 0); }
162    bool IsSurface() const { return (flags & LFLAG_SURFACE != 0); }
163    bool IsHighLighted() const { return (flags & LFLAG_HIGHLIGHTED != 0); }
[137bf99]164};
165
166class MainFrm : public wxFrame {
[732b9b0]167    wxFileHistory m_history;
[fa2cd10d]168public: // FIXME: just public for workaround bodge in
169        // wxSplitterWindow::OnSplitterDClick
[9059368]170    int m_SashPosition;
[fa2cd10d]171private:
[137bf99]172    list<PointInfo*>* m_Points;
173    list<LabelInfo*> m_Labels;
[c6d95d8]174    Double m_XExt;
175    Double m_YExt;
176    Double m_ZExt;
177    Double m_XMin;
178    Double m_YMin;
179    Double m_ZMin;
[137bf99]180    int m_NumLegs;
181    int m_NumPoints;
182    int m_NumCrosses;
183    int m_NumExtraLegs;
184    GfxCore* m_Gfx;
185    wxPen* m_Pens;
186    wxBrush* m_Brushes;
[a9a32f2]187    int m_NumEntrances;
188    int m_NumFixedPts;
189    int m_NumExportedPts;
[156dc16]190    wxSplitterWindow* m_Splitter;
191    wxPanel* m_Panel;
192    AvenTreeCtrl* m_Tree;
193    wxTreeItemId m_TreeRoot;
194    wxTextCtrl* m_FindBox;
195    wxStaticText* m_MousePtr;
196    wxStaticText* m_Coords;
197    wxStaticText* m_StnCoords;
198    wxStaticText* m_StnName;
199    wxStaticText* m_StnAlt;
200    wxStaticText* m_Dist1;
201    wxStaticText* m_Dist2;
202    wxStaticText* m_Dist3;
[01faa28]203    wxStaticText* m_Found;
[2a02de2]204    wxCheckBox* m_RegexpCheckBox;
[156dc16]205    wxString m_File;
[9f9c05e]206    int separator; // character separating survey levels (often '.')
[156dc16]207
208    struct {
[421b7d2]209        Double x, y, z;
[156dc16]210    } m_Offsets;
[8000d8f]211
[6dde19f]212    void SetTreeItemColour(LabelInfo* label);
[156dc16]213    void FillTree();
[137bf99]214    void ClearPointLists();
[1d0cd97]215    bool LoadData(const wxString& file, wxString prefix = "");
[137bf99]216    void SortIntoDepthBands(list<PointInfo*>& points);
[c6d95d8]217    void IntersectLineWithPlane(Double x0, Double y0, Double z0,
218                                Double x1, Double y1, Double z1,
219                                Double z, Double& x, Double& y);
220    Double GetDepthBoundaryBetweenBands(int a, int b);
221    int GetDepthColour(Double z);
222    void CentreDataset(Double xmin, Double ymin, Double zmin);
[137bf99]223
224    wxString GetTabMsg(int key) {
[421b7d2]225        wxString x(msg(key)); x.Replace("##", "\t"); x.Replace("@", "&"); return x;
[137bf99]226    }
227
[9d3d8cc]228    void InitialisePensAndBrushes();
229    void CreateMenuBar();
230    void CreateToolBar();
231    void CreateSidePanel();
232
[137bf99]233public:
234    MainFrm(const wxString& title, const wxPoint& pos, const wxSize& size);
[5809313]235    ~MainFrm();
236
[732b9b0]237    void OnMRUFile(wxCommandEvent& event);
[5901b62]238    void OpenFile(const wxString& file, wxString survey = "", bool delay = false);
[8000d8f]239    void OnFileOpenTerrainUpdate(wxUpdateUIEvent& event);
[137bf99]240
[2a02de2]241    void OnFind(wxCommandEvent& event);
242    void OnHide(wxCommandEvent& event);
243
[5809313]244    void OnOpen(wxCommandEvent& event);
[8000d8f]245    void OnFileOpenTerrain(wxCommandEvent& event);
[5809313]246    void OnQuit(wxCommandEvent& event);
[5ffa439]247
[573f4e9]248    void OnAbout(wxCommandEvent& event);
[137bf99]249    void OnClose(wxCloseEvent&);
250
[2dfd768]251    void OnSetFocus(wxFocusEvent &) { if (m_Gfx) m_Gfx->SetFocus(); }
[4b1fc48]252
[137bf99]253    // temporary bodges until event handling problem is sorted out:
254    void OnDefaultsUpdate(wxUpdateUIEvent& event) { if (m_Gfx) m_Gfx->OnDefaultsUpdate(event); }
255    void OnPlanUpdate(wxUpdateUIEvent& event) { if (m_Gfx) m_Gfx->OnPlanUpdate(event); }
256    void OnElevationUpdate(wxUpdateUIEvent& event) { if (m_Gfx) m_Gfx->OnElevationUpdate(event); }
257    void OnDisplayOverlappingNamesUpdate(wxUpdateUIEvent& event) { if (m_Gfx) m_Gfx->OnDisplayOverlappingNamesUpdate(event); }
258    void OnShowCrossesUpdate(wxUpdateUIEvent& event) { if (m_Gfx) m_Gfx->OnShowCrossesUpdate(event); }
[fe444b8]259    void OnShowEntrancesUpdate(wxUpdateUIEvent& event) { if (m_Gfx) m_Gfx->OnShowEntrancesUpdate(event); }
260    void OnShowFixedPtsUpdate(wxUpdateUIEvent& event) { if (m_Gfx) m_Gfx->OnShowFixedPtsUpdate(event); }
261    void OnShowExportedPtsUpdate(wxUpdateUIEvent& event) { if (m_Gfx) m_Gfx->OnShowExportedPtsUpdate(event); }
[137bf99]262    void OnShowStationNamesUpdate(wxUpdateUIEvent& event) { if (m_Gfx) m_Gfx->OnShowStationNamesUpdate(event); }
263    void OnShowSurveyLegsUpdate(wxUpdateUIEvent& event) { if (m_Gfx) m_Gfx->OnShowSurveyLegsUpdate(event); }
264    void OnShowSurfaceUpdate(wxUpdateUIEvent& event) { if (m_Gfx) m_Gfx->OnShowSurfaceUpdate(event); }
265    void OnShowSurfaceDepthUpdate(wxUpdateUIEvent& event) { if (m_Gfx) m_Gfx->OnShowSurfaceDepthUpdate(event); }
266    void OnShowSurfaceDashedUpdate(wxUpdateUIEvent& event) { if (m_Gfx) m_Gfx->OnShowSurfaceDashedUpdate(event); }
267    void OnMoveEastUpdate(wxUpdateUIEvent& event) { if (m_Gfx) m_Gfx->OnMoveEastUpdate(event); }
268    void OnMoveNorthUpdate(wxUpdateUIEvent& event) { if (m_Gfx) m_Gfx->OnMoveNorthUpdate(event); }
269    void OnMoveSouthUpdate(wxUpdateUIEvent& event) { if (m_Gfx) m_Gfx->OnMoveSouthUpdate(event); }
270    void OnMoveWestUpdate(wxUpdateUIEvent& event) { if (m_Gfx) m_Gfx->OnMoveWestUpdate(event); }
271    void OnStartRotationUpdate(wxUpdateUIEvent& event) { if (m_Gfx) m_Gfx->OnStartRotationUpdate(event); }
[7ebc3d1]272    void OnToggleRotationUpdate(wxUpdateUIEvent& event) { if (m_Gfx) m_Gfx->OnToggleRotationUpdate(event); }
[137bf99]273    void OnStopRotationUpdate(wxUpdateUIEvent& event) { if (m_Gfx) m_Gfx->OnStopRotationUpdate(event); }
274    void OnReverseControlsUpdate(wxUpdateUIEvent& event) { if (m_Gfx) m_Gfx->OnReverseControlsUpdate(event); }
275    void OnSlowDownUpdate(wxUpdateUIEvent& event) { if (m_Gfx) m_Gfx->OnSlowDownUpdate(event); }
276    void OnSpeedUpUpdate(wxUpdateUIEvent& event) { if (m_Gfx) m_Gfx->OnSpeedUpUpdate(event); }
277    void OnStepOnceAnticlockwiseUpdate(wxUpdateUIEvent& event) { if (m_Gfx) m_Gfx->OnStepOnceAnticlockwiseUpdate(event); }
278    void OnStepOnceClockwiseUpdate(wxUpdateUIEvent& event) { if (m_Gfx) m_Gfx->OnStepOnceClockwiseUpdate(event); }
279    void OnHigherViewpointUpdate(wxUpdateUIEvent& event) { if (m_Gfx) m_Gfx->OnHigherViewpointUpdate(event); }
280    void OnLowerViewpointUpdate(wxUpdateUIEvent& event) { if (m_Gfx) m_Gfx->OnLowerViewpointUpdate(event); }
281    void OnShiftDisplayDownUpdate(wxUpdateUIEvent& event) { if (m_Gfx) m_Gfx->OnShiftDisplayDownUpdate(event); }
282    void OnShiftDisplayLeftUpdate(wxUpdateUIEvent& event) { if (m_Gfx) m_Gfx->OnShiftDisplayLeftUpdate(event); }
283    void OnShiftDisplayRightUpdate(wxUpdateUIEvent& event) { if (m_Gfx) m_Gfx->OnShiftDisplayRightUpdate(event); }
284    void OnShiftDisplayUpUpdate(wxUpdateUIEvent& event) { if (m_Gfx) m_Gfx->OnShiftDisplayUpUpdate(event); }
285    void OnZoomInUpdate(wxUpdateUIEvent& event) { if (m_Gfx) m_Gfx->OnZoomInUpdate(event); }
286    void OnZoomOutUpdate(wxUpdateUIEvent& event) { if (m_Gfx) m_Gfx->OnZoomOutUpdate(event); }
287    void OnToggleScalebarUpdate(wxUpdateUIEvent& event) { if (m_Gfx) m_Gfx->OnToggleScalebarUpdate(event); }
288    void OnToggleDepthbarUpdate(wxUpdateUIEvent& event) { if (m_Gfx) m_Gfx->OnToggleDepthbarUpdate(event); }
289    void OnViewCompassUpdate(wxUpdateUIEvent& event) { if (m_Gfx) m_Gfx->OnViewCompassUpdate(event); }
[c1cf79d]290    void OnViewGridUpdate(wxUpdateUIEvent& event) { if (m_Gfx) m_Gfx->OnViewGridUpdate(event); }
[137bf99]291    void OnViewClinoUpdate(wxUpdateUIEvent& event) { if (m_Gfx) m_Gfx->OnViewClinoUpdate(event); }
292    void OnReverseDirectionOfRotationUpdate(wxUpdateUIEvent& event) { if (m_Gfx) m_Gfx->OnReverseDirectionOfRotationUpdate(event); }
[1fd2edb]293    void OnCancelDistLineUpdate(wxUpdateUIEvent& event) { if (m_Gfx) m_Gfx->OnCancelDistLineUpdate(event); }
[e3513a5]294    void OnIndicatorsUpdate(wxUpdateUIEvent& event) { if (m_Gfx) m_Gfx->OnIndicatorsUpdate(event); }
[137bf99]295
[2dfd768]296    void OnDefaults(wxCommandEvent&) { if (m_Gfx) m_Gfx->OnDefaults(); }
297    void OnPlan(wxCommandEvent&) { if (m_Gfx) m_Gfx->OnPlan(); }
298    void OnElevation(wxCommandEvent&) { if (m_Gfx) m_Gfx->OnElevation(); }
299    void OnDisplayOverlappingNames(wxCommandEvent&) { if (m_Gfx) m_Gfx->OnDisplayOverlappingNames(); }
300    void OnShowCrosses(wxCommandEvent&) { if (m_Gfx) m_Gfx->OnShowCrosses(); }
301    void OnShowEntrances(wxCommandEvent&) { if (m_Gfx) m_Gfx->OnShowEntrances(); }
302    void OnShowFixedPts(wxCommandEvent&) { if (m_Gfx) m_Gfx->OnShowFixedPts(); }
303    void OnShowExportedPts(wxCommandEvent&) { if (m_Gfx) m_Gfx->OnShowExportedPts(); }
304    void OnShowStationNames(wxCommandEvent&) { if (m_Gfx) m_Gfx->OnShowStationNames(); }
305    void OnShowSurveyLegs(wxCommandEvent&) { if (m_Gfx) m_Gfx->OnShowSurveyLegs(); }
306    void OnShowSurface(wxCommandEvent&) { if (m_Gfx) m_Gfx->OnShowSurface(); }
307    void OnShowSurfaceDepth(wxCommandEvent&) { if (m_Gfx) m_Gfx->OnShowSurfaceDepth(); }
308    void OnShowSurfaceDashed(wxCommandEvent&) { if (m_Gfx) m_Gfx->OnShowSurfaceDashed(); }
309    void OnMoveEast(wxCommandEvent&) { if (m_Gfx) m_Gfx->OnMoveEast(); }
310    void OnMoveNorth(wxCommandEvent&) { if (m_Gfx) m_Gfx->OnMoveNorth(); }
311    void OnMoveSouth(wxCommandEvent&) { if (m_Gfx) m_Gfx->OnMoveSouth(); }
312    void OnMoveWest(wxCommandEvent&) { if (m_Gfx) m_Gfx->OnMoveWest(); }
313    void OnStartRotation(wxCommandEvent&) { if (m_Gfx) m_Gfx->OnStartRotation(); }
314    void OnToggleRotation(wxCommandEvent&) { if (m_Gfx) m_Gfx->OnToggleRotation(); }
315    void OnStopRotation(wxCommandEvent&) { if (m_Gfx) m_Gfx->OnStopRotation(); }
316    void OnReverseControls(wxCommandEvent&) { if (m_Gfx) m_Gfx->OnReverseControls(); }
317    void OnSlowDown(wxCommandEvent&) { if (m_Gfx) m_Gfx->OnSlowDown(); }
318    void OnSpeedUp(wxCommandEvent&) { if (m_Gfx) m_Gfx->OnSpeedUp(); }
319    void OnStepOnceAnticlockwise(wxCommandEvent&) { if (m_Gfx) m_Gfx->OnStepOnceAnticlockwise(); }
320    void OnStepOnceClockwise(wxCommandEvent&) { if (m_Gfx) m_Gfx->OnStepOnceClockwise(); }
321    void OnHigherViewpoint(wxCommandEvent&) { if (m_Gfx) m_Gfx->OnHigherViewpoint(); }
322    void OnLowerViewpoint(wxCommandEvent&) { if (m_Gfx) m_Gfx->OnLowerViewpoint(); }
323    void OnShiftDisplayDown(wxCommandEvent&) { if (m_Gfx) m_Gfx->OnShiftDisplayDown(); }
324    void OnShiftDisplayLeft(wxCommandEvent&) { if (m_Gfx) m_Gfx->OnShiftDisplayLeft(); }
325    void OnShiftDisplayRight(wxCommandEvent&) { if (m_Gfx) m_Gfx->OnShiftDisplayRight(); }
326    void OnShiftDisplayUp(wxCommandEvent&) { if (m_Gfx) m_Gfx->OnShiftDisplayUp(); }
327    void OnZoomIn(wxCommandEvent&) { if (m_Gfx) m_Gfx->OnZoomIn(); }
328    void OnZoomOut(wxCommandEvent&) { if (m_Gfx) m_Gfx->OnZoomOut(); }
329    void OnToggleScalebar(wxCommandEvent&) { if (m_Gfx) m_Gfx->OnToggleScalebar(); }
330    void OnToggleDepthbar(wxCommandEvent&) { if (m_Gfx) m_Gfx->OnToggleDepthbar(); }
331    void OnViewCompass(wxCommandEvent&) { if (m_Gfx) m_Gfx->OnViewCompass(); }
332    void OnViewClino(wxCommandEvent&) { if (m_Gfx) m_Gfx->OnViewClino(); }
333    void OnViewGrid(wxCommandEvent&) { if (m_Gfx) m_Gfx->OnViewGrid(); }
334    void OnReverseDirectionOfRotation(wxCommandEvent&) { if (m_Gfx) m_Gfx->OnReverseDirectionOfRotation(); }
335    void OnCancelDistLine(wxCommandEvent&) { if (m_Gfx) m_Gfx->OnCancelDistLine(); }
[137bf99]336    // end of horrible bodges
[421b7d2]337
[7a89dc2]338    void OnToggleMetric(wxCommandEvent&) { if (m_Gfx) m_Gfx->OnToggleMetric(); }
339    void OnToggleDegrees(wxCommandEvent&) { if (m_Gfx) m_Gfx->OnToggleDegrees(); }
[5757725]340
[7a89dc2]341    void OnToggleMetricUpdate(wxUpdateUIEvent& event) { if (m_Gfx) m_Gfx->OnToggleMetricUpdate(event); }
342    void OnToggleDegreesUpdate(wxUpdateUIEvent& event) { if (m_Gfx) m_Gfx->OnToggleDegreesUpdate(event); }
[5757725]343
[9059368]344    void OnViewSidePanelUpdate(wxUpdateUIEvent& event);
345    void OnViewSidePanel(wxCommandEvent& event);
[b1de3e0]346    void ToggleSidePanel();
[137bf99]347
[003d953]348    Double GetXExtent() const { return m_XExt; }
349    Double GetYExtent() const { return m_YExt; }
350    Double GetZExtent() const { return m_ZExt; }
351    Double GetXMin() const { return m_XMin; }
352    Double GetYMin() const { return m_YMin; }
353    Double GetYMax() const { return m_YMin + m_YExt; }
354    Double GetZMin() const { return m_ZMin; }
355    Double GetZMax() const { return m_ZMin + m_ZExt; }
356
357    int GetNumLegs() const { return m_NumLegs; }
358    int GetNumPoints() const { return m_NumPoints; }
359    int GetNumCrosses() const { return m_NumCrosses; }
[137bf99]360
[003d953]361    int GetNumDepthBands() const { return NUM_DEPTH_COLOURS; }
[137bf99]362
[003d953]363    wxPen GetPen(int band) const {
[421b7d2]364        assert(band >= 0 && band < NUM_DEPTH_COLOURS);
365        return m_Pens[band];
[137bf99]366    }
367
[003d953]368    wxBrush GetBrush(int band) const {
[421b7d2]369        assert(band >= 0 && band < NUM_DEPTH_COLOURS);
370        return m_Brushes[band];
[137bf99]371    }
372
[003d953]373    void GetColour(int band, Double& r, Double& g, Double& b) const;
[c6d95d8]374
[003d953]375    wxPen GetSurfacePen() const { return m_Pens[NUM_DEPTH_COLOURS]; }
[137bf99]376
[6dde19f]377    void SelectTreeItem(LabelInfo* label);
[1fd2edb]378    void ClearTreeSelection();
379
[003d953]380    int GetNumFixedPts() const { return m_NumFixedPts; }
381    int GetNumExportedPts() const { return m_NumExportedPts; }
382    int GetNumEntrances() const { return m_NumEntrances; }
[a9a32f2]383
[156dc16]384    void ClearCoords();
385    void SetCoords(Double x, Double y);
[7a89dc2]386    void SetAltitude(Double z);
[156dc16]387
[003d953]388    Double GetXOffset() const { return m_Offsets.x; }
389    Double GetYOffset() const { return m_Offsets.y; }
390    Double GetZOffset() const { return m_Offsets.z; }
[156dc16]391
[39e460c9]392    void SetMouseOverStation(LabelInfo* label);
393
[003d953]394    list<PointInfo*>::iterator GetPointsNC(int band) const {
[421b7d2]395        assert(band >= 0 && band < NUM_DEPTH_COLOURS);
396        return m_Points[band].begin();
[ee119518]397    }
398
[003d953]399    list<PointInfo*>::iterator GetPointsEndNC(int band) const {
[421b7d2]400        assert(band >= 0 && band < NUM_DEPTH_COLOURS);
401        return m_Points[band].end();
[ee119518]402    }
403
[003d953]404    list<PointInfo*>::const_iterator GetPoints(int band) const {
[421b7d2]405        assert(band >= 0 && band < NUM_DEPTH_COLOURS);
406        return m_Points[band].begin();
[137bf99]407    }
408
[003d953]409    list<PointInfo*>::const_iterator GetPointsEnd(int band) const {
[421b7d2]410        assert(band >= 0 && band < NUM_DEPTH_COLOURS);
411        return m_Points[band].end();
[137bf99]412    }
413
[fa42426]414    list<LabelInfo*>::const_iterator GetLabels() const {
415        return m_Labels.begin();
416    }
417
[003d953]418    list<LabelInfo*>::const_iterator GetLabelsEnd() const {
[421b7d2]419        return m_Labels.end();
[137bf99]420    }
[5809313]421
[fa42426]422    list<LabelInfo*>::const_reverse_iterator GetRevLabels() const {
423        return m_Labels.rbegin();
424    }
425
426    list<LabelInfo*>::const_reverse_iterator GetRevLabelsEnd() const {
427        return m_Labels.rend();
428    }
429
[8734409]430    void ShowInfo(const LabelInfo *label);
431    void DisplayTreeInfo(const wxTreeItemData* data);
[156dc16]432    void TreeItemSelected(wxTreeItemData* data);
[8bac36d6]433
[84cab34]434private:
435    DECLARE_EVENT_TABLE()
[5809313]436};
437
438#endif
Note: See TracBrowser for help on using the repository browser.