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
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_
18 class WXDLLEXPORT wxGenericDirCtrl
;
19 class WXDLLEXPORT wxTextCtrl
;
20 class WXDLLEXPORT wxTreeEvent
;
22 // we may be included directly as well as from wx/dirdlg.h (FIXME)
23 extern WXDLLEXPORT_DATA(const wxChar
) wxDirDialogNameStr
[];
24 extern WXDLLEXPORT_DATA(const wxChar
) wxDirSelectorPromptStr
[];
26 #ifndef wxDD_DEFAULT_STYLE
28 #define wxDD_DEFAULT_STYLE wxDEFAULT_DIALOG_STYLE
30 #define wxDD_DEFAULT_STYLE (wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
34 #include "wx/dialog.h"
36 //-----------------------------------------------------------------------------
38 //-----------------------------------------------------------------------------
40 class WXDLLEXPORT wxGenericDirDialog
: public wxDirDialogBase
43 wxGenericDirDialog() : wxDirDialogBase() { }
45 wxGenericDirDialog(wxWindow
* parent
,
46 const wxString
& title
= wxDirSelectorPromptStr
,
47 const wxString
& defaultPath
= wxEmptyString
,
48 long style
= wxDD_DEFAULT_STYLE
,
49 const wxPoint
& pos
= wxDefaultPosition
,
50 const wxSize
& sz
= wxDefaultSize
,//Size(450, 550),
51 const wxString
& name
= wxDirDialogNameStr
);
53 bool Create(wxWindow
* parent
,
54 const wxString
& title
= wxDirSelectorPromptStr
,
55 const wxString
& defaultPath
= wxEmptyString
,
56 long style
= wxDD_DEFAULT_STYLE
,
57 const wxPoint
& pos
= wxDefaultPosition
,
58 const wxSize
& sz
= wxDefaultSize
,//Size(450, 550),
59 const wxString
& name
= wxDirDialogNameStr
);
62 void SetPath(const wxString
& path
);
63 wxString
GetPath() const;
66 virtual int ShowModal();
67 virtual void EndModal(int retCode
);
69 // this one is specific to wxGenericDirDialog
70 wxTextCtrl
* GetInputCtrl() const { return m_input
; }
74 void OnCloseWindow(wxCloseEvent
& event
);
75 void OnOK(wxCommandEvent
& event
);
76 void OnTreeSelected(wxTreeEvent
&event
);
77 void OnTreeKeyDown(wxTreeEvent
&event
);
78 void OnNew(wxCommandEvent
& event
);
79 void OnGoHome(wxCommandEvent
& event
);
80 void OnShowHidden(wxCommandEvent
& event
);
82 wxGenericDirCtrl
* m_dirCtrl
;
86 DECLARE_DYNAMIC_CLASS(wxGenericDirDialog
)
89 #endif // _WX_DIRDLGG_H_