1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/generic/dirdlgg.h
3 // Purpose: wxGenericDirCtrl class
4 // Builds on wxDirCtrl class written by Robert Roebling for the
5 // wxFile application, modified by Harm van der Heijden.
6 // Further modified for Windows.
7 // Author: Robert Roebling, Harm van der Heijden, Julian Smart et al
10 // Copyright: (c) Robert Roebling, Harm van der Heijden, Julian Smart
11 // Licence: wxWindows licence
12 /////////////////////////////////////////////////////////////////////////////
14 #ifndef _WX_DIRDLGG_H_
15 #define _WX_DIRDLGG_H_
17 class WXDLLIMPEXP_FWD_CORE wxGenericDirCtrl
;
18 class WXDLLIMPEXP_FWD_CORE wxTextCtrl
;
19 class WXDLLIMPEXP_FWD_CORE wxTreeEvent
;
21 // we may be included directly as well as from wx/dirdlg.h (FIXME)
22 extern WXDLLIMPEXP_DATA_CORE(const char) wxDirDialogNameStr
[];
23 extern WXDLLIMPEXP_DATA_CORE(const char) wxDirSelectorPromptStr
[];
25 #ifndef wxDD_DEFAULT_STYLE
27 #define wxDD_DEFAULT_STYLE wxDEFAULT_DIALOG_STYLE
29 #define wxDD_DEFAULT_STYLE (wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
33 #include "wx/dialog.h"
35 //-----------------------------------------------------------------------------
37 //-----------------------------------------------------------------------------
39 class WXDLLIMPEXP_CORE wxGenericDirDialog
: public wxDirDialogBase
42 wxGenericDirDialog() : wxDirDialogBase() { }
44 wxGenericDirDialog(wxWindow
* parent
,
45 const wxString
& title
= wxDirSelectorPromptStr
,
46 const wxString
& defaultPath
= wxEmptyString
,
47 long style
= wxDD_DEFAULT_STYLE
,
48 const wxPoint
& pos
= wxDefaultPosition
,
49 const wxSize
& sz
= wxDefaultSize
,//Size(450, 550),
50 const wxString
& name
= wxDirDialogNameStr
);
52 bool Create(wxWindow
* parent
,
53 const wxString
& title
= wxDirSelectorPromptStr
,
54 const wxString
& defaultPath
= wxEmptyString
,
55 long style
= wxDD_DEFAULT_STYLE
,
56 const wxPoint
& pos
= wxDefaultPosition
,
57 const wxSize
& sz
= wxDefaultSize
,//Size(450, 550),
58 const wxString
& name
= wxDirDialogNameStr
);
61 void SetPath(const wxString
& path
);
62 wxString
GetPath() const;
65 virtual int ShowModal();
66 virtual void EndModal(int retCode
);
68 // this one is specific to wxGenericDirDialog
69 wxTextCtrl
* GetInputCtrl() const { return m_input
; }
73 void OnCloseWindow(wxCloseEvent
& event
);
74 void OnOK(wxCommandEvent
& event
);
75 void OnTreeSelected(wxTreeEvent
&event
);
76 void OnTreeKeyDown(wxTreeEvent
&event
);
77 void OnNew(wxCommandEvent
& event
);
78 void OnGoHome(wxCommandEvent
& event
);
79 void OnShowHidden(wxCommandEvent
& event
);
81 wxGenericDirCtrl
* m_dirCtrl
;
85 DECLARE_DYNAMIC_CLASS(wxGenericDirDialog
)
88 #endif // _WX_DIRDLGG_H_