X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d7a15103f7307a27c35a0c1cad095cda50d64aea..cfb50f14ecc87d39319a3f23ddbae938e7858c33:/include/wx/generic/dirdlgg.h diff --git a/include/wx/generic/dirdlgg.h b/include/wx/generic/dirdlgg.h index 23b5997987..052d8ff6f8 100644 --- a/include/wx/generic/dirdlgg.h +++ b/include/wx/generic/dirdlgg.h @@ -58,51 +58,19 @@ //#include "wx/checkbox.h" #include "wx/treectrl.h" -WXDLLEXPORT_DATA(extern const char*) wxFileSelectorPromptStr; - //----------------------------------------------------------------------------- -// wxDirItemData +// data //----------------------------------------------------------------------------- -class wxDirItemData : public wxTreeItemData -{ -public: - wxDirItemData(wxString& path, wxString& name); - ~wxDirItemData(); - bool HasSubDirs(); - wxString *m_path, *m_name; - bool m_isHidden; - bool m_hasSubDirs; -}; +WXDLLEXPORT_DATA(extern const wxChar*) wxFileSelectorPromptStr; //----------------------------------------------------------------------------- -// wxDirCtrl +// classes //----------------------------------------------------------------------------- -class wxDirCtrl: public wxTreeCtrl -{ - DECLARE_DYNAMIC_CLASS(wxDirCtrl) - - public: - bool m_showHidden; - wxTreeItemId m_rootId; - - wxDirCtrl(void); - wxDirCtrl(wxWindow *parent, const wxWindowID id = -1, - const wxString &dir = "/", - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - const long style = wxTR_HAS_BUTTONS, - const wxString& name = "wxTreeCtrl" ); - void OnExpandItem( const wxTreeEvent &event ); - void OnCollapseItem( const wxTreeEvent &event ); - void ShowHidden( const bool yesno ); - DECLARE_EVENT_TABLE() - protected: - void CreateItems(const wxTreeItemId &parent); - void SetupSections(void); - wxArrayString m_paths, m_names; -}; +class wxDirItemData; +class wxDirCtrl; +class wxDirDialog; //----------------------------------------------------------------------------- // wxDirDialog @@ -114,7 +82,7 @@ class WXDLLEXPORT wxDirDialog: public wxDialog public: wxDirDialog(wxWindow *parent, const wxString& message = wxFileSelectorPromptStr, - const wxString& defaultPath = "", + const wxString& defaultPath = wxEmptyString, long style = 0, const wxPoint& pos = wxDefaultPosition); inline void SetMessage(const wxString& message) { m_message = message; } inline void SetPath(const wxString& path) { m_path = path; } @@ -127,7 +95,7 @@ class WXDLLEXPORT wxDirDialog: public wxDialog int ShowModal(); void OnTreeSelected( wxTreeEvent &event ); - void OnTreeKeyDown( wxKeyEvent &event ); + void OnTreeKeyDown( wxTreeEvent &event ); void OnSize(wxSizeEvent& event); void OnOK(wxCommandEvent& event); void OnCancel(wxCommandEvent& event);