1 /////////////////////////////////////////////////////////////////////////////
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
11 // Copyright: (c) Robert Roebling, Harm van der Heijden, Julian Smart
12 // Licence: wxWindows licence
13 /////////////////////////////////////////////////////////////////////////////
15 #ifndef _WX_DIRDLGG_H_
16 #define _WX_DIRDLGG_H_
19 #pragma interface "dirdlgg.h"
26 #include "wx/dialog.h"
27 class WXDLLEXPORT wxGenericDirCtrl
;
28 class WXDLLEXPORT wxTextCtrl
;
29 class WXDLLEXPORT wxTreeEvent
;
31 //-----------------------------------------------------------------------------
33 //-----------------------------------------------------------------------------
35 class WXDLLEXPORT wxGenericDirDialog
: public wxDialog
38 wxGenericDirDialog(): wxDialog() {}
39 wxGenericDirDialog(wxWindow
* parent
, const wxString
& title
,
40 const wxString
& defaultPath
= wxEmptyString
,
41 long style
= wxDEFAULT_DIALOG_STYLE
| wxRESIZE_BORDER
| wxDD_NEW_DIR_BUTTON
,
42 const wxPoint
& pos
= wxDefaultPosition
,
43 const wxSize
& sz
= wxSize(450, 550),
44 const wxString
& name
= _T("dialog"));
47 inline void SetMessage(const wxString
& message
) { m_message
= message
; }
48 void SetPath(const wxString
& path
);
49 inline void SetStyle(long style
) { m_dialogStyle
= style
; }
51 inline wxString
GetMessage(void) const { return m_message
; }
52 wxString
GetPath(void) const;
53 inline long GetStyle(void) const { return m_dialogStyle
; }
55 wxTextCtrl
* GetInputCtrl() const { return m_input
; }
62 void OnCloseWindow(wxCloseEvent
& event
);
63 void OnOK(wxCommandEvent
& event
);
64 void OnTreeSelected(wxTreeEvent
&event
);
65 void OnTreeKeyDown(wxTreeEvent
&event
);
66 void OnNew(wxCommandEvent
& event
);
67 void OnGoHome(wxCommandEvent
& event
);
68 void OnShowHidden(wxCommandEvent
& event
);
73 wxGenericDirCtrl
* m_dirCtrl
;
79 #if !defined(__WXMSW__) && !defined(__WXMAC__)
80 #define wxDirDialog wxGenericDirDialog
83 #endif // wxUSE_DIRDLG
85 #endif // _WX_DIRDLGG_H_