21#ifndef _RouteManagerDialog_h_
22#define _RouteManagerDialog_h_
26#include <wx/notebook.h>
28#include <wx/listctrl.h>
29#include <wx/notebook.h>
30#include <wx/stattext.h>
31#include <wx/textctrl.h>
32#include <wx/checkbox.h>
35#define DISTANCE_COLUMN 3
37enum { SORT_ON_DISTANCE = 1, SORT_ON_NAME };
39enum TrackContextMenu { TRACK_MERGE = 1, TRACK_COPY_TEXT, TRACK_CLEAN };
52 static bool getInstanceFlag() {
return instanceFlag; }
55 void OnClose(wxCloseEvent &event);
56 void OnOK(wxCommandEvent &event);
58 void SetColorScheme();
59 void RecalculateSize();
60 void UpdateRouteListCtrl();
61 void UpdateTrkListCtrl();
62 void UpdateWptListCtrl(
RoutePoint *rp_select = NULL,
63 bool b_retain_sort =
true);
64 void UpdateLayListCtrl();
65 void UpdateWptListCtrlViz();
69 void OnTabSwitch(wxNotebookEvent &event);
70 static void WptShowPropertiesDialog(
RoutePoint *wp, wxWindow *parent);
71 void TrackToRoute(
Track *track);
74 static bool instanceFlag;
80 void UpdateRteButtons();
81 void MakeAllRoutesInvisible();
83 void ZoomtoRoute(
Route *route);
84 void UpdateTrkButtons();
85 void UpdateWptButtons();
86 void UpdateLayButtons();
87 void ToggleLayerContentsOnChart(
Layer *layer);
88 void ToggleLayerContentsOnListing(
Layer *layer);
89 void ToggleLayerContentsNames(
Layer *layer);
90 void AddNewLayer(
bool isPersistent);
93 void OnRteDeleteClick(wxCommandEvent &event);
94 void OnRtePropertiesClick(wxCommandEvent &event);
95 void OnRteZoomtoClick(wxCommandEvent &event);
96 void OnRteActivateClick(wxCommandEvent &event);
97 void OnRteReverseClick(wxCommandEvent &event);
98 void OnRteExportClick(wxCommandEvent &event);
99 void OnRteResequenceClick(wxCommandEvent &event);
100 void OnRteSendToPeerClick(wxCommandEvent &event);
101 void OnRteToggleVisibility(wxMouseEvent &event);
102 void OnRteBtnLeftDown(
103 wxMouseEvent &event);
104 void OnRteDeleteAllClick(wxCommandEvent &event);
105 void OnRteSelected(wxListEvent &event);
106 void OnRteSendToGPSClick(wxCommandEvent &event);
107 void OnRteDefaultAction(wxListEvent &event);
108 void OnRteColumnClicked(wxListEvent &event);
109 void OnTrkDefaultAction(wxListEvent &event);
110 void OnTrkNewClick(wxCommandEvent &event);
111 void OnTrkPropertiesClick(wxCommandEvent &event);
112 void OnTrkDeleteClick(wxCommandEvent &event);
113 void OnTrkExportClick(wxCommandEvent &event);
114 void OnTrkRouteFromTrackClick(wxCommandEvent &event);
115 void OnTrkDeleteAllClick(wxCommandEvent &event);
116 void OnTrkSelected(wxListEvent &event);
117 void OnTrkToggleVisibility(wxMouseEvent &event);
118 void OnTrkColumnClicked(wxListEvent &event);
119 void OnTrkRightClick(wxListEvent &event);
120 void OnTrkMenuSelected(wxCommandEvent &event);
121 void OnTrkSendToPeerClick(wxCommandEvent &event);
122 void OnWptDefaultAction(wxListEvent &event);
123 void OnWptNewClick(wxCommandEvent &event);
124 void OnWptPropertiesClick(wxCommandEvent &event);
125 void OnWptZoomtoClick(wxCommandEvent &event);
126 void OnWptDeleteClick(wxCommandEvent &event);
127 void OnWptGoToClick(wxCommandEvent &event);
128 void OnWptExportClick(wxCommandEvent &event);
129 void OnWptSendToGPSClick(wxCommandEvent &event);
130 void OnWptDeleteAllClick(wxCommandEvent &event);
131 void OnWptSelected(wxListEvent &event);
132 void OnWptToggleVisibility(wxMouseEvent &event);
133 void OnWptColumnClicked(wxListEvent &event);
134 void OnWptSendToPeerClick(wxCommandEvent &event);
135 void OnLayDefaultAction(wxListEvent &event);
136 void OnLayNewClick(wxCommandEvent &event);
137 void OnPerLayNewClick(wxCommandEvent &event);
138 void OnLayPropertiesClick(wxCommandEvent &event);
139 void OnLayToggleChartClick(wxCommandEvent &event);
140 void OnLayToggleListingClick(wxCommandEvent &event);
141 void OnLayToggleNamesClick(wxCommandEvent &event);
142 void OnLayDeleteClick(wxCommandEvent &event);
143 void OnLaySelected(wxListEvent &event);
144 void OnLayToggleVisibility(wxMouseEvent &event);
145 void OnLayColumnClicked(wxListEvent &event);
146 void OnImportClick(wxCommandEvent &event);
147 void OnExportClick(wxCommandEvent &event);
148 void OnExportVizClick(wxCommandEvent &event);
149 void OnFilterChanged(wxCommandEvent &event);
150 void OnKey(wxKeyEvent &ke);
151 void OnShowAllRteCBClicked(wxCommandEvent &event);
152 void OnShowAllWpCBClicked(wxCommandEvent &event);
153 void OnShowAllTrkCBClicked(wxCommandEvent &event);
154 void OnShowAllLayCBClicked(wxCommandEvent &event);
157 wxNotebook *m_pNotebook;
158 wxPanel *m_pPanelRte;
159 wxPanel *m_pPanelTrk;
160 wxPanel *m_pPanelWpt;
161 wxPanel *m_pPanelLay;
162 wxListCtrl *m_pRouteListCtrl;
163 wxListCtrl *m_pTrkListCtrl;
164 wxListCtrl *m_pWptListCtrl;
165 wxListCtrl *m_pLayListCtrl;
166 wxStaticText *m_stFilterWpt;
167 wxTextCtrl *m_tFilterWpt;
168 wxStaticText *m_stFilterRte;
169 wxTextCtrl *m_tFilterRte;
170 wxStaticText *m_stFilterTrk;
171 wxTextCtrl *m_tFilterTrk;
172 wxStaticText *m_stFilterLay;
173 wxTextCtrl *m_tFilterLay;
175 wxButton *btnRteProperties;
176 wxButton *btnRteActivate;
177 wxButton *btnRteZoomto;
178 wxButton *btnRteReverse;
179 wxButton *btnRteDelete;
180 wxButton *btnRteExport;
181 wxButton *btnRteResequence;
182 wxButton *btnRteSendToGPS;
183 wxButton *btnRteSendToPeer;
184 wxButton *btnRteDeleteAll;
186 wxButton *btnTrkProperties;
187 wxButton *btnTrkDelete;
188 wxButton *btnTrkExport;
189 wxButton *btnTrkRouteFromTrack;
190 wxButton *btnTrkSendToPeer;
191 wxButton *btnTrkDeleteAll;
193 wxButton *btnWptProperties;
194 wxButton *btnWptZoomto;
195 wxButton *btnWptDelete;
196 wxButton *btnWptGoTo;
197 wxButton *btnWptExport;
198 wxButton *btnWptSendToGPS;
199 wxButton *btnWptSendToPeer;
200 wxButton *btnWptDeleteAll;
202 wxButton *btnPerLayNew;
204 wxCheckBox *cbLayToggleChart;
205 wxCheckBox *cbLayToggleListing;
206 wxCheckBox *cbLayToggleNames;
207 wxButton *btnLayDelete;
210 wxButton *btnExportViz;
211 wxCheckBox *m_cbShowAllRte;
212 wxCheckBox *m_cbShowAllWP;
213 wxCheckBox *m_cbShowAllTrk;
214 wxCheckBox *m_cbShowAllLay;
216 bool m_bPossibleClick;
218 bool m_bNeedConfigFlush;