X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/51a58d8b4bb58b66ec84dc94c56fe328d77c904a..b6e5eaa59701315ca06996ff845872ca4122695f:/include/wx/generic/dirctrlg.h?ds=inline diff --git a/include/wx/generic/dirctrlg.h b/include/wx/generic/dirctrlg.h index 05d354d1d0..fe915fdc87 100644 --- a/include/wx/generic/dirctrlg.h +++ b/include/wx/generic/dirctrlg.h @@ -9,7 +9,7 @@ // Created: 21/3/2000 // RCS-ID: $Id$ // Copyright: (c) Julian Smart -// Licence: wxWindows licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_DIRCTRL_H_ @@ -19,15 +19,16 @@ #pragma interface "dirctrlg.h" #endif +#if wxUSE_DIRDLG + #include "wx/treectrl.h" +#include "wx/dirdlg.h" +#include "wx/choice.h" //----------------------------------------------------------------------------- // classes //----------------------------------------------------------------------------- -class wxDirItemData; -class wxDirCtrl; - //----------------------------------------------------------------------------- // Extra styles for wxGenericDirCtrl //----------------------------------------------------------------------------- @@ -50,7 +51,6 @@ class WXDLLEXPORT wxDirItemDataEx : public wxTreeItemData public: wxDirItemDataEx(const wxString& path, const wxString& name, bool isDir); ~wxDirItemDataEx(); - bool HasSubDirs(); void SetNewDirName( wxString path ); wxString m_path, m_name; bool m_isHidden; @@ -73,7 +73,7 @@ public: const wxString &dir = wxDirDialogDefaultFolderStr, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxDIRCTRL_3D_INTERNAL, + long style = wxDIRCTRL_3D_INTERNAL|wxSUNKEN_BORDER, const wxString& filter = wxEmptyString, int defaultFilter = 0, const wxString& name = wxTreeCtrlNameStr ) @@ -86,7 +86,7 @@ public: const wxString &dir = wxDirDialogDefaultFolderStr, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxDIRCTRL_3D_INTERNAL, + long style = wxDIRCTRL_3D_INTERNAL|wxSUNKEN_BORDER, const wxString& filter = wxEmptyString, int defaultFilter = 0, const wxString& name = wxTreeCtrlNameStr ); @@ -109,9 +109,6 @@ public: inline wxString GetDefaultPath() const { return m_defaultPath; } void SetDefaultPath(const wxString& path) { m_defaultPath = path; } - //inline long GetStyleEx() const { return m_styleEx; } - //void SetStyleEx(long styleEx) { m_styleEx = styleEx; } - // Get dir or filename wxString GetPath() const ; // Get selected filename path only (else empty string). @@ -222,9 +219,14 @@ public: wxGenericDirDialog(wxWindow* parent, const wxString& title, const wxString& defaultPath = wxEmptyString, long style = wxDEFAULT_DIALOG_STYLE, const wxPoint& pos = wxDefaultPosition, const wxSize& sz = wxSize(450, 550), const wxString& name = "dialog"); +//// Event handlers void OnCloseWindow(wxCloseEvent& event); void OnOK(wxCommandEvent& event); + void OnTreeSelected( wxTreeEvent &event ); + void OnTreeKeyDown( wxTreeEvent &event ); + void OnNew(wxCommandEvent& event); +//// Accessors inline void SetMessage(const wxString& message) { m_message = message; } void SetPath(const wxString& path) ; inline void SetStyle(long style) { m_dialogStyle = style; } @@ -233,13 +235,21 @@ public: wxString GetPath(void) const ; inline long GetStyle(void) const { return m_dialogStyle; } + wxTextCtrl* GetInputCtrl() const { return m_input; } + +//// Overrides + int ShowModal(); + protected: wxString m_message; long m_dialogStyle; wxString m_path; wxGenericDirCtrl* m_dirCtrl; + wxTextCtrl* m_input; }; +#endif // wxUSE_DIRDLG + #endif // _WX_DIRCTRLG_H_