26#ifndef __TRACKPROPDLG_H__
27#define __TRACKPROPDLG_H__
29#include <wx/clipbrd.h>
30#include <wx/artprov.h>
31#include <wx/xrc/xmlres.h>
34#include <wx/stattext.h>
38#include <wx/settings.h>
39#include <wx/textctrl.h>
41#include <wx/checkbox.h>
43#include <wx/clipbrd.h>
48#include <wx/hyperlink.h>
52#include <wx/listctrl.h>
54#include <wx/radiobut.h>
55#include <wx/scrolwin.h>
58#include <wx/notebook.h>
60#if wxCHECK_VERSION(2, 9, 0)
63#include "scrollingdialog.h"
66#include "LinkPropDlg.h"
68#define ID_RCLK_MENU_COPY_TEXT 7013
70#define ID_TRK_MENU_ADD 7014
71#define ID_TRK_MENU_EDIT 7015
72#define ID_TRK_MENU_DELETE 7016
89 static bool instanceFlag;
91 TrackPropDlg(wxWindow* parent, wxWindowID
id,
const wxString& title,
92 const wxPoint& pos,
const wxSize& size,
long style);
95 Track* m_pExtendTrack;
104 bool IsThisTrackExtendable();
105 bool SaveChanges(
void);
107 HyperlinkList* m_pMyLinkList;
108 void OnHyperLinkClick(wxHyperlinkEvent& event);
109 wxHyperlinkCtrl* m_pEditedLink;
110 void PopupMenuHandler(wxCommandEvent& event);
111 void OnActivate(wxActivateEvent& event);
114 wxNotebook* m_notebook1;
115 wxScrolledWindow* m_panelBasic;
116 wxStaticText* m_stName;
118 wxStaticText* m_stFrom;
120 wxStaticText* m_stTo;
122 wxCheckBox* m_cbShow;
123 wxStaticText* m_stColor;
125 wxStaticText* m_stStyle;
127 wxStaticText* m_stWidth;
129 wxStaticText* m_stTotDistance;
130 wxTextCtrl* m_tTotDistance;
131 wxStaticText* m_stAvgSpeed;
132 wxTextCtrl* m_tAvgSpeed;
133 wxStaticText* m_stTimeEnroute;
134 wxTextCtrl* m_tTimeEnroute;
135 wxStaticText* m_stShowTime;
136 wxRadioButton* m_rbShowTimeUTC;
137 wxRadioButton* m_rbShowTimePC;
138 wxRadioButton* m_rbShowTimeLocal;
140 wxScrolledWindow* m_panelAdvanced;
141 wxStaticText* m_stDescription;
142 wxTextCtrl* m_tDescription;
143 wxScrolledWindow* m_scrolledWindowLinks;
144 wxHyperlinkCtrl* m_hyperlink1;
146 wxButton* m_buttonAddLink;
147 wxToggleButton* m_toggleBtnEdit;
148 wxStaticText* m_staticTextEditEnabled;
149 wxStdDialogButtonSizer* m_sdbBtmBtnsSizer;
150 wxButton* m_sdbBtmBtnsSizerOK;
151 wxButton* m_sdbBtmBtnsSizerCancel;
152 wxStaticBoxSizer* sbSizerLinks;
153 wxBoxSizer* bSizerLinks;
155 wxButton* m_sdbBtmBtnsSizerPrint;
156 wxButton* m_sdbBtmBtnsSizerSplit;
157 wxButton* m_sdbBtmBtnsSizerExtend;
158 wxButton* m_sdbBtmBtnsSizerToRoute;
159 wxButton* m_sdbBtmBtnsSizerExport;
161 wxMenuItem* m_menuItemEdit;
162 wxMenuItem* m_menuItemAdd;
163 wxMenuItem* m_menuItemDelete;
165 wxScrolledWindow* itemDialog1;
169 void OnCancelBtnClick(wxCommandEvent& event);
170 void OnOKBtnClick(wxCommandEvent& event);
171 void OnPrintBtnClick(wxCommandEvent& event);
172 void OnSplitBtnClick(wxCommandEvent& event);
173 void OnExtendBtnClick(wxCommandEvent& event);
174 void OnToRouteBtnClick(wxCommandEvent& event);
175 void OnExportBtnClick(wxCommandEvent& event);
176 void OnTrackPropCopyTxtClick(wxCommandEvent& event);
177 void OnTrackPropListClick(wxListEvent& event);
178 void OnTrackPropRightClick(wxListEvent& event);
179 void OnTrackPropMenuSelected(wxCommandEvent& event);
181 void OnEditLink(wxCommandEvent& event);
182 void OnAddLink(wxCommandEvent& event);
183 void OnEditLinkToggle(wxCommandEvent& event);
184 void OnShowTimeTZ(wxCommandEvent& event);
185 void CreateControls(
void);
186 void CreateControlsCompact(
void);
190 wxWindow* parent, wxWindowID
id = wxID_ANY,
191 const wxString& title = _(
"Track properties"),
192 const wxPoint& pos = wxDefaultPosition,
193 const wxSize& size = wxSize(680, 440),
194 long style = FRAME_WITH_LINKS_STYLE);
195 static bool getInstanceFlag() {
return instanceFlag; }
198 void m_hyperlink1OnContextMenu(wxMouseEvent& event) {
199 m_hyperlink1->PopupMenu(m_menuLink, event.GetPosition());
202 void SetTrackAndUpdate(
Track* pt);
204 void InitializeList();
205 Track* GetTrack() {
return m_pTrack; }
207 void RecalculateSize(
void);
211 void m_hyperlinkContextMenu(wxMouseEvent& event);
217 const wxSize& size,
long style);
220 wxString OnGetItemText(
long item,
long column)
const;
221 int OnGetItemColumnImage(
long item,
long column)
const;
void OnDeleteLink(wxCommandEvent &event)