10 #include <wx/artprov.h>
11 #include <wx/xrc/xmlres.h>
13 #include <wx/string.h>
14 #include <wx/stattext.h>
15 #include <wx/gdicmn.h>
17 #include <wx/colour.h>
18 #include <wx/settings.h>
19 #include <wx/textctrl.h>
21 #include <wx/datectrl.h>
22 #include <wx/dateevt.h>
23 #include <wx/timectrl.h>
24 #include <wx/choice.h>
25 #include <wx/wrapsizer.h>
26 #include <wx/dataview.h>
28 #include <wx/bitmap.h>
32 #include <wx/hyperlink.h>
33 #include <wx/button.h>
34 #include <wx/tglbtn.h>
35 #include <wx/scrolwin.h>
36 #include <wx/statbox.h>
37 #include <wx/notebook.h>
43 #include "time_textbox.h"
46 #include "observable_evtvar.h"
47 #include "model/routeman.h"
50 #define DIALOG_PARENT wxFrame
52 #define DIALOG_PARENT wxDialog
69 wxNotebook* m_ntbRteProp;
71 wxStaticText* m_stName;
73 wxStaticText* m_stFrom;
77 wxStaticText* m_stDistTotal;
78 wxTextCtrl* m_tcDistance;
79 wxStaticText* m_stPlanSpeed;
80 wxTextCtrl* m_tcPlanSpeed;
81 wxStaticText* m_stEnroute;
82 wxTextCtrl* m_tcEnroute;
83 wxStaticText* m_stDeparture;
84 wxDatePickerCtrl* m_dpDepartureDate;
88 wxTimePickerCtrl* m_tpDepartureTime;
90 wxStaticText* m_stTimeZone;
91 wxChoice* m_choiceTimezone;
92 wxStaticText* m_staticTextColor;
93 wxChoice* m_choiceColor;
94 wxStaticText* m_stStyle;
95 wxChoice* m_choiceStyle;
96 wxStaticText* m_stWidth;
97 wxChoice* m_choiceWidth;
98 wxDataViewListCtrl* m_dvlcWaypoints;
99 wxDataViewColumn* m_dataViewListColumnLeg;
100 wxDataViewColumn* m_dataViewListColumnToWpt;
101 wxDataViewColumn* m_dataViewListColumnDistance;
102 wxDataViewColumn* m_dataViewListColumnBearing;
103 wxDataViewColumn* m_dataViewListColumnTotalDistance;
104 wxDataViewColumn* m_dataViewListColumnLat;
105 wxDataViewColumn* m_dataViewListColumnLon;
106 wxDataViewColumn* m_dataViewListColumnETE;
107 wxDataViewColumn* m_dataViewListColumnETA;
108 wxDataViewColumn* m_dataViewListColumnSpeed;
109 wxDataViewColumn* m_dataViewListColumnNTE;
110 wxDataViewColumn* m_dataViewListColumnDesc;
111 wxDataViewColumn* m_dataViewListColumnCourse;
112 wxDataViewColumn* m_dataViewListColumnETD;
113 wxDataViewColumn* m_dataViewListColumnEmpty;
114 wxPanel* m_pnlAdvanced;
115 wxStaticText* m_stDescription;
116 wxTextCtrl* m_tcDescription;
117 wxScrolledWindow* m_scrolledWindowLinks;
118 wxBoxSizer* bSizerLinks;
119 wxHyperlinkCtrl* m_hyperlink1;
121 wxButton* m_btnAddLink;
122 wxToggleButton* m_toggleBtnEdit;
123 wxStaticText* m_stEditEnabled;
125 wxButton* m_btnPrint;
126 wxButton* m_btnExtend;
127 wxButton* m_btnSplit;
128 wxStdDialogButtonSizer* m_sdbSizerBtns;
129 wxButton* m_sdbSizerBtnsOK;
130 wxButton* m_sdbSizerBtnsCancel;
133 virtual void RoutePropDlgOnClose(wxCloseEvent& event) {
event.Skip(); }
134 virtual void RoutePropDlgOnSize(wxSizeEvent& event) {
event.Skip(); }
135 virtual void RoutePropDlgOnNotebookPageChanged(wxNotebookEvent& event) {
138 virtual void PlanSpeedOnKillFocus(wxFocusEvent& event) {
event.Skip(); }
139 virtual void PlanSpeedOnTextEnter(wxCommandEvent& event) {
event.Skip(); }
140 virtual void DepartureDateOnDateChanged(wxDateEvent& event) {
event.Skip(); }
141 virtual void DepartureTimeOnTimeChanged(wxDateEvent& event) {
event.Skip(); }
142 virtual void TimezoneOnChoice(wxCommandEvent& event) {
event.Skip(); }
143 virtual void WaypointsOnDataViewListCtrlItemContextMenu(
144 wxDataViewEvent& event) {
147 virtual void WaypointsOnDataViewListCtrlItemEditingDone(
148 wxDataViewEvent& event) {
151 virtual void WaypointsOnDataViewListCtrlItemValueChanged(
152 wxDataViewEvent& event) {
155 virtual void WaypointsOnDataViewListCtrlSelectionChanged(
156 wxDataViewEvent& event) {
159 virtual void ItemEditOnMenuSelection(wxCommandEvent& event) {
event.Skip(); }
160 virtual void ItemAddOnMenuSelection(wxCommandEvent& event) {
event.Skip(); }
161 virtual void ItemDeleteOnMenuSelection(wxCommandEvent& event) {
164 virtual void AddLinkOnButtonClick(wxCommandEvent& event) {
event.Skip(); }
165 virtual void BtnEditOnToggleButton(wxCommandEvent& event) {
event.Skip(); }
166 virtual void PrintOnButtonClick(wxCommandEvent& event) {
event.Skip(); }
167 virtual void ExtendOnButtonClick(wxCommandEvent& event) {
event.Skip(); }
168 virtual void SplitOnButtonClick(wxCommandEvent& event) {
event.Skip(); }
169 virtual void BtnsOnCancelButtonClick(wxCommandEvent& event) {
event.Skip(); }
170 virtual void BtnsOnOKButtonClick(wxCommandEvent& event) {
event.Skip(); }
173 RoutePropDlg(wxWindow* parent, wxWindowID
id = wxID_ANY,
174 const wxString& title = _(
"Route Properties"),
175 const wxPoint& pos = wxDefaultPosition,
176 const wxSize& size = wxSize(550, 450),
177 long style = wxDEFAULT_FRAME_STYLE | wxFRAME_FLOAT_ON_PARENT |
184 void m_hyperlink1OnContextMenu(wxMouseEvent& event) {
185 m_hyperlink1->PopupMenu(m_menuLink, event.GetPosition());
188 void m_scrolledWindowLinksOnContextMenu(wxMouseEvent& event) {
189 m_scrolledWindowLinks->PopupMenu(m_menuLinks, event.GetPosition());
192 void OnKeyChar(wxKeyEvent& event);
194 DECLARE_EVENT_TABLE()
Keeps listening over it's lifespan, removes itself on destruction.
Callbacks for RoutePropDlg.