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>
34 #include "observable.h"
37 #define DISTANCE_COLUMN 3
39 enum { SORT_ON_DISTANCE = 1, SORT_ON_NAME, SORT_ON_DATE };
41 enum TrackContextMenu { TRACK_MERGE = 1, TRACK_COPY_TEXT, TRACK_CLEAN };
54 static bool getInstanceFlag() {
return instanceFlag; }
57 void OnClose(wxCloseEvent &event);
58 void OnOK(wxCommandEvent &event);
60 void SetColorScheme();
61 void RecalculateSize();
62 void UpdateRouteListCtrl();
63 void UpdateTrkListCtrl();
64 void UpdateWptListCtrl(
RoutePoint *rp_select = NULL,
65 bool b_retain_sort =
true);
66 void UpdateLayListCtrl();
67 void UpdateWptListCtrlViz();
71 void OnTabSwitch(wxNotebookEvent &event);
72 static void WptShowPropertiesDialog(std::vector<RoutePoint *> wpts, wxWindow *parent);
73 void TrackToRoute(
Track *track);
76 static bool instanceFlag;
82 void UpdateRteButtons();
83 void MakeAllRoutesInvisible();
85 void ZoomtoRoute(
Route *route);
86 void UpdateTrkButtons();
87 void UpdateWptButtons();
88 void UpdateLayButtons();
89 void ToggleLayerContentsOnChart(
Layer *layer);
90 void ToggleLayerContentsOnListing(
Layer *layer);
91 void ToggleLayerContentsNames(
Layer *layer);
92 void AddNewLayer(
bool isPersistent);
95 void OnRteDeleteClick(wxCommandEvent &event);
96 void OnRtePropertiesClick(wxCommandEvent &event);
97 void OnRteZoomtoClick(wxCommandEvent &event);
98 void OnRteActivateClick(wxCommandEvent &event);
99 void OnRteReverseClick(wxCommandEvent &event);
100 void OnRteExportClick(wxCommandEvent &event);
101 void OnRteResequenceClick(wxCommandEvent &event);
102 void OnRteSendToPeerClick(wxCommandEvent &event);
103 void OnRteToggleVisibility(wxMouseEvent &event);
104 void OnRteBtnLeftDown(
105 wxMouseEvent &event);
106 void OnRteDeleteAllClick(wxCommandEvent &event);
107 void OnRteSelected(wxListEvent &event);
108 void OnRteSendToGPSClick(wxCommandEvent &event);
109 void OnRteDefaultAction(wxListEvent &event);
110 void OnRteColumnClicked(wxListEvent &event);
111 void OnTrkDefaultAction(wxListEvent &event);
112 void OnTrkNewClick(wxCommandEvent &event);
113 void OnTrkPropertiesClick(wxCommandEvent &event);
114 void OnTrkDeleteClick(wxCommandEvent &event);
115 void OnTrkExportClick(wxCommandEvent &event);
116 void OnTrkRouteFromTrackClick(wxCommandEvent &event);
117 void OnTrkDeleteAllClick(wxCommandEvent &event);
118 void OnTrkSelected(wxListEvent &event);
119 void OnTrkToggleVisibility(wxMouseEvent &event);
120 void OnTrkColumnClicked(wxListEvent &event);
121 void OnTrkRightClick(wxListEvent &event);
122 void OnTrkMenuSelected(wxCommandEvent &event);
123 void OnTrkSendToPeerClick(wxCommandEvent &event);
124 void OnWptDefaultAction(wxListEvent &event);
125 void OnWptNewClick(wxCommandEvent &event);
126 void OnWptPropertiesClick(wxCommandEvent &event);
127 void OnWptZoomtoClick(wxCommandEvent &event);
128 void OnWptDeleteClick(wxCommandEvent &event);
129 void OnWptGoToClick(wxCommandEvent &event);
130 void OnWptExportClick(wxCommandEvent &event);
131 void OnWptSendToGPSClick(wxCommandEvent &event);
132 void OnWptDeleteAllClick(wxCommandEvent &event);
133 void OnWptSelected(wxListEvent &event);
134 void OnWptToggleVisibility(wxMouseEvent &event);
135 void OnWptColumnClicked(wxListEvent &event);
136 void OnWptSendToPeerClick(wxCommandEvent &event);
137 void OnLayDefaultAction(wxListEvent &event);
138 void OnLayNewClick(wxCommandEvent &event);
139 void OnPerLayNewClick(wxCommandEvent &event);
140 void OnLayPropertiesClick(wxCommandEvent &event);
141 void OnLayToggleChartClick(wxCommandEvent &event);
142 void OnLayToggleListingClick(wxCommandEvent &event);
143 void OnLayToggleNamesClick(wxCommandEvent &event);
144 void OnLayDeleteClick(wxCommandEvent &event);
145 void OnLaySelected(wxListEvent &event);
146 void OnLayToggleVisibility(wxMouseEvent &event);
147 void OnLayColumnClicked(wxListEvent &event);
148 void OnImportClick(wxCommandEvent &event);
149 void OnExportClick(wxCommandEvent &event);
150 void OnExportVizClick(wxCommandEvent &event);
151 void OnFilterChanged(wxCommandEvent &event);
152 void OnKey(wxKeyEvent &ke);
153 void OnShowAllRteCBClicked(wxCommandEvent &event);
154 void OnShowAllWpCBClicked(wxCommandEvent &event);
155 void OnShowAllTrkCBClicked(wxCommandEvent &event);
156 void OnShowAllLayCBClicked(wxCommandEvent &event);
159 wxNotebook *m_pNotebook;
160 wxPanel *m_pPanelRte;
161 wxPanel *m_pPanelTrk;
162 wxPanel *m_pPanelWpt;
163 wxPanel *m_pPanelLay;
164 wxListCtrl *m_pRouteListCtrl;
165 wxListCtrl *m_pTrkListCtrl;
166 wxListCtrl *m_pWptListCtrl;
167 wxListCtrl *m_pLayListCtrl;
168 wxStaticText *m_stFilterWpt;
169 wxTextCtrl *m_tFilterWpt;
170 wxStaticText *m_stFilterRte;
171 wxTextCtrl *m_tFilterRte;
172 wxStaticText *m_stFilterTrk;
173 wxTextCtrl *m_tFilterTrk;
174 wxStaticText *m_stFilterLay;
175 wxTextCtrl *m_tFilterLay;
177 wxButton *btnRteProperties;
178 wxButton *btnRteActivate;
179 wxButton *btnRteZoomto;
180 wxButton *btnRteReverse;
181 wxButton *btnRteDelete;
182 wxButton *btnRteExport;
183 wxButton *btnRteResequence;
184 wxButton *btnRteSendToGPS;
185 wxButton *btnRteSendToPeer;
186 wxButton *btnRteDeleteAll;
188 wxButton *btnTrkProperties;
189 wxButton *btnTrkDelete;
190 wxButton *btnTrkExport;
191 wxButton *btnTrkRouteFromTrack;
192 wxButton *btnTrkSendToPeer;
193 wxButton *btnTrkDeleteAll;
195 wxButton *btnWptProperties;
196 wxButton *btnWptZoomto;
197 wxButton *btnWptDelete;
198 wxButton *btnWptGoTo;
199 wxButton *btnWptExport;
200 wxButton *btnWptSendToGPS;
201 wxButton *btnWptSendToPeer;
202 wxButton *btnWptDeleteAll;
204 wxButton *btnPerLayNew;
206 wxCheckBox *cbLayToggleChart;
207 wxCheckBox *cbLayToggleListing;
208 wxCheckBox *cbLayToggleNames;
209 wxButton *btnLayDelete;
212 wxButton *btnExportViz;
213 wxCheckBox *m_cbShowAllRte;
214 wxCheckBox *m_cbShowAllWP;
215 wxCheckBox *m_cbShowAllTrk;
216 wxCheckBox *m_cbShowAllLay;
218 bool m_bPossibleClick;
220 bool m_bNeedConfigFlush;
Define an action to be performed when a KeyProvider is notified.