source: git/src/mainfrm.h @ 1bb7b05

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 1bb7b05 was d8a725c, checked in by Olly Betts <olly@…>, 21 years ago

Added "File->Export as..."

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

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