source: git/src/mainfrm.h @ e1d6f8b

RELEASE/1.0
Last change on this file since e1d6f8b was e1d6f8b, checked in by Olly Betts <olly@…>, 13 years ago

Backport changes from 1.2.0:
src/printwx.cc: Use stock wx button IDs wxID_PRINT and
wxID_PREVIEW where appropriate.
src/aven.cc,src/mainfrm.cc,src/mainfrm.h: Use more stock IDs.

git-svn-id: file:///home/survex-svn/survex/branches/1.0@3688 4b37db11-9a0c-4f06-9ece-9ab7cdaee568

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