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

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

src/: Update FSF address in (C) notices in source files.

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

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