📄 locationdialog.h
字号:
/* * Roadnav * LocationDialog.h * * Copyright (c) 2004 - 2007 Richard L. Lynch <rllynch@users.sourceforge.net> * * This program is free software; you can redistribute it and/or * modify it under the terms of version 2 of the GNU General Public License * as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA *////////////////////////////////////////////////////////////////////////////////// \file////// The LocationDialog class contains a dialog box that allows the user/// user the enter an address.////// It also contains code to parse that address./////////////////////////////////////////////////////////////////////////////////#ifndef LOCATIONDIALOG_H#define LOCATIONDIALOG_H#include "libroadnav/Address.h"#include "libroadnav/MapControl.h"#include "libroadnav/AutoComplete.h"#include "LocationPageAddress.h"#include "LocationPageCoordinates.h"#include "Scripting.h"#define ADFLAG_CANCELBUTTON 1#define ADFLAG_MARKERMANAGEMENTBUTTONS 2//////////////////////////////////////////////////////////////////////////////////// \brief Address selection dialog box/////////////////////////////////////////////////////////////////////////////////class LocationDialog : public wxDialog{ public: LocationDialog(wxWindow *parent, MapControl * pctlMap, int iFlags = ADFLAG_CANCELBUTTON, wxFont * pFont = NULL); ~LocationDialog(); Address GetAddress(wxString * pstrErrorMsg); int ShowModal(); /// specify the window title in this variable wxString m_strTitle; /// Optional waypoint name wxString m_strName; /// Icon filename wxString m_strIconFilename; /// Indicates if the callout box should be shown bool m_bShowCalloutBox; /// Indicates if the small semitransparent label should be shown bool m_bShowSmallLabel; /// Indicates if the entire waypoint should be shown bool m_bVisible; /// Indicates if the icon should be scaled based on the zoom level bool m_bScaleIcon; bool m_bRoadsOnly; private: void UpdateData(); void PopulateListBox(); bool MayClose(); void OnTimer(wxTimerEvent& event); void OnKeyboard(wxCommandEvent & event); void OnOldAddress(wxCommandEvent & event); void OnOldAddressDoubleClick(wxCommandEvent & event); void OnOk(wxCommandEvent& event); void OnCancel(wxCommandEvent& event); void OnAdd(wxCommandEvent& event); void OnUpdate(wxCommandEvent& event); void OnDelete(wxCommandEvent& event); void OnIconBrowse(wxCommandEvent& event);#ifdef USE_SCRIPTING void OnExport(wxCommandEvent& event); void OnExportAll(wxCommandEvent& event);#endif /// Button to trigger onscreen keyboard wxButton * m_btnKeyboard; #ifdef USE_SCRIPTING wxButton * m_btnExport; wxButton * m_btnExportAll;#endif /// Pointer to last focused wxTextCtrl wxTextCtrl * m_pwndFocused; /// 100ms timer used to track which wxTextCtrl has focus wxTimer * m_Timer; /// wxNotebook containing the various location pages wxNotebook * m_pctlNotebook; /// List box containing previously entered addresses wxListBox * m_ctlOldAddresses; /// Waypoint name text control wxTextCtrl * m_ctlName; /// Icon filename wxTextCtrl * m_ctlIconFilename; /// Checkbox indicating if the callout box should be visible wxCheckBox * m_ctlShowCalloutBox; /// Checkbox indicating if the small semitransparent label should be visible wxCheckBox * m_ctlShowSmallLabel; /// Checkbox indicating if the entire waypoint is visible wxCheckBox * m_ctlVisible; /// Checkbox indicating if the waypoint's icon should be scaled based on the zoom level. wxCheckBox * m_ctlScaleIcon; /// Map control to get markers from MapControl * m_pctlMap; /// Location page accepting street addresses LocationPageAddress * m_pwndAddress; /// Location page accepting GPS coordinates LocationPageCoordinates * m_pwndCoordinates; /// Active page number int m_iActivePage; /// Default font used in this dialog wxFont m_fntDefault; /// Flags for this dialog int m_iFlags; IAutoComplete * m_pcAutoComplete; DECLARE_EVENT_TABLE()};#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -