25 #include <wx/string.h>
26 #include <wx/stattext.h>
27 #include <wx/gdicmn.h>
29 #include <wx/colour.h>
30 #include <wx/settings.h>
32 #include <wx/treectrl.h>
33 #include <wx/combobox.h>
34 #include <wx/bitmap.h>
37 #include <wx/toolbar.h>
39 #include <wx/listctrl.h>
40 #include <wx/textctrl.h>
41 #include <wx/button.h>
42 #include <wx/dialog.h>
43 #include <wx/aui/aui.h>
45 #include "wxgis/core/config.h"
46 #include "wxgis/catalogui/gxcontentview.h"
47 #include "wxgis/catalogui/gxtreeview.h"
48 #include "wxgis/framework/applicationbase.h"
49 #include "wxgis/version.h"
50 #include "wxgis/catalog/gxfilters.h"
51 #include "wxgis/framework/accelerator.h"
53 #define OBJDLG_NAME wxT("wxGISObjDialog")
65 virtual void DrawBackground(wxDC& dc, wxWindow* wnd,
const wxRect& rect)
67 dc.SetBackground(wxBrush(wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE )));
87 virtual void OnPopup();
88 virtual void OnDismiss();
90 virtual bool Create(wxWindow* parent);
91 virtual bool Create(wxWindow* parent, wxWindowID
id = TREECTRLID,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxBORDER_SIMPLE | wxTR_NO_BUTTONS | wxTR_NO_LINES | wxTR_SINGLE,
const wxString& name = wxT(
"ViewComboPopup"));
93 virtual wxWindow *GetControl() {
return this; }
95 virtual void SetStringValue(
const wxString& s);
97 virtual wxString GetStringValue()
const;
101 virtual void OnMouseMove(wxMouseEvent& event);
103 virtual void OnMouseClick(wxMouseEvent& event);
104 virtual void OnDblClick(wxTreeEvent& event);
107 virtual wxSize GetAdjustedSize(
int minWidth,
int prefHeight,
int maxHeight);
109 virtual void AddTreeItem(
wxGxObject* pGxObject, wxTreeItemId hParent);
113 wxTreeItemId m_PrewItemId;
116 DECLARE_EVENT_TABLE()
125 #define OBJDLGLISTCTRLID 1012 //wxGxObjectDialog contents view
131 wxGxDialogContentView(wxWindow* parent, wxWindowID
id = OBJDLGLISTCTRLID,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxLC_LIST | wxLC_EDIT_LABELS | wxLC_SORT_ASCENDING);
133 virtual bool Create(wxWindow* parent, wxWindowID
id = OBJDLGLISTCTRLID,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxLC_LIST | wxLC_EDIT_LABELS | wxLC_SORT_ASCENDING,
const wxString& name = wxT(
"ContentView"));
136 virtual void Deactivate(
void);
138 virtual void OnActivated(wxListEvent& event);
140 virtual void SetFilters(
const wxGxObjectFiltersArray &FiltersArray){m_FiltersArray = FiltersArray;};
141 virtual void SetCurrentFilter(
size_t nFilterIndex);
144 virtual bool AddObject(
wxGxObject*
const pObject);
146 long m_ConnectionPointSelectionCookie;
147 wxGxObjectFiltersArray m_FiltersArray;
148 size_t m_nFilterIndex;
150 DECLARE_EVENT_TABLE()
167 wxGxObjectDialog(wxWindow* parent, wxWindowID
id = wxID_ANY,
const wxString& title = _(
"Open"),
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER);
170 virtual wxString GetAppName(
void)
const {
return wxString(OBJDLG_NAME);};
171 virtual wxString GetAppDisplayName(
void)
const {
return wxString(_(
"NextGIS Object Dialog"));};
172 virtual wxString GetAppDisplayNameShort(
void)
const {
return wxString(_(
"Object Dialog"));};
174 virtual void SetButtonCaption(
const wxString &sOkBtLabel);
175 virtual void SetStartingLocation(
const wxString &sStartPath);
176 virtual void SetName(
const wxString &sName);
177 virtual void SetAllowMultiSelect(
bool bAllowMultiSelect);
178 virtual void SetOverwritePrompt(
bool bOverwritePrompt);
179 virtual void SetAllFilters(
bool bAllFilters);
180 virtual int ShowModalOpen();
181 virtual int ShowModalSave();
183 virtual void SetOwnsFilter(
bool bOwnFilter){m_bOwnFilter = bOwnFilter;};
184 virtual void RemoveAllFilters(
void);
185 const wxGxObjectList& GetChildren()
const {
return m_ObjectList; };
186 virtual wxString GetName(
void)
const;
187 virtual wxString GetFullName(
void)
const;
188 virtual CPLString GetPath(
void)
const;
189 virtual wxGxObject*
const GetLocation(
void)
const;
191 virtual size_t GetCurrentFilterId(
void)
const;
194 virtual void OnCommand(wxCommandEvent& event);
195 virtual void OnCommandUI(wxUpdateUIEvent& event);
196 virtual void OnDropDownCommand(wxCommandEvent& event);
197 virtual void OnToolDropDown(wxAuiToolBarEvent& event);
198 virtual void OnItemSelected(wxListEvent& event);
199 virtual void OnFilterSelect(wxCommandEvent& event);
200 virtual void OnOK(wxCommandEvent& event);
201 virtual void OnOKUI(wxUpdateUIEvent& event);
204 virtual void OnInit();
205 virtual void SerializeFramePos(
bool bSave);
206 virtual bool DoSaveObject(wxGISEnumSaveObjectResults Result);
213 wxString m_sOkBtLabel;
214 wxString m_sStartPath;
216 bool m_bAllowMultiSelect, m_bOverwritePrompt, m_bAllFilters;
218 wxGxObjectFiltersArray m_FilterArray;
219 size_t m_nDefaultFilter;
220 wxGxObjectList m_ObjectList;
224 wxBoxSizer* bMainSizer;
225 wxBoxSizer* bHeaderSizer;
226 wxStaticText* m_staticText1;
227 wxStaticText* m_staticText2;
228 wxComboCtrl* m_TreeCombo;
229 wxAuiToolBar* m_toolBar;
230 wxFlexGridSizer* fgCeilSizer;
231 wxStaticText* m_staticText4;
232 wxTextCtrl* m_NameTextCtrl;
233 wxButton* m_OkButton;
234 wxStaticText* m_staticText6;
235 wxComboBox* m_WildcardCombo;
236 wxButton* m_CancelButton;
238 DECLARE_EVENT_TABLE()
An Interface class for GxApplication.
Definition: gxselection.h:80
The GxSelection class event.
Definition: gxeventui.h:37
Definition: applicationbase.h:65
Definition: gxobjdialog.h:127
Definition: gxcatalogui.h:34
The base class for tree view of gxObjects.
Definition: gxtreeview.h:64
The GxObject Selection class.
Definition: gxselection.h:30
Definition: gxobjdialog.h:160
Definition: gxcontentview.h:61
Definition: gxfilters.h:33
Definition: command.h:151
Definition: accelerator.h:28
Definition: gxobject.h:37