1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxDirDialog base class
4 // Author: Robert Roebling
7 // Copyright: (c) Robert Roebling
9 // Licence: wxWindows Licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_DIRDLG_H_BASE_
13 #define _WX_DIRDLG_H_BASE_
17 #include "wx/dialog.h"
19 // ----------------------------------------------------------------------------
21 // ----------------------------------------------------------------------------
23 extern WXDLLEXPORT_DATA(const wxChar
*) wxDirDialogNameStr
;
24 extern WXDLLEXPORT_DATA(const wxChar
*) wxDirDialogDefaultFolderStr
;
25 extern WXDLLEXPORT_DATA(const wxChar
*) wxDirSelectorPromptStr
;
28 #define wxDD_DEFAULT_STYLE \
29 (wxDEFAULT_DIALOG_STYLE | wxDD_NEW_DIR_BUTTON)
31 #define wxDD_DEFAULT_STYLE \
32 (wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | wxDD_NEW_DIR_BUTTON)
36 The interface (TODO: make the other classes really derive from it!) is
39 class WXDLLEXPORT wxDirDialogBase : public wxDialog
42 wxDirDialogBase(wxWindow *parent,
43 const wxString& title = wxFileSelectorPromptStr,
44 const wxString& defaultPath = wxEmptyString,
45 long style = wxDD_DEFAULT_STYLE,
46 const wxPoint& pos = wxDefaultPosition,
47 const wxSize& sz = wxDefaultSize,
48 const wxString& name = _T("dirdialog"));
50 void SetMessage(const wxString& message);
51 void SetPath(const wxString& path);
52 void SetStyle(long style);
54 wxString GetMessage() const;
55 wxString GetPath() const;
56 long GetStyle() const;
61 // Universal and non-port related switches with need for generic implementation
62 #if defined(__WXMSW__) && (defined(__WXUNIVERSAL__) || \
63 defined(__SALFORDC__) || \
65 (defined (__GNUWIN32__) && !wxUSE_NORLANDER_HEADERS))
67 #include "wx/generic/dirdlgg.h"
68 #define wxDirDialog wxGenericDirDialog
70 // MS PocketPC or MS Smartphone
71 #elif defined(__WXMSW__) && defined(__WXWINCE__) && !defined(__HANDHELDPC__)
73 #include "wx/generic/dirdlgg.h"
74 #define wxDirDialog wxGenericDirDialog
77 #elif defined(__WXMSW__)
79 #include "wx/msw/dirdlg.h"
82 #elif defined(__WXMAC__)
84 #include "wx/mac/dirdlg.h"
86 // Other ports use generic implementation
87 #elif defined(__WXMOTIF__) || \
88 defined(__WXGTK__) || \
89 defined(__WXX11__) || \
90 defined(__WXMGL__) || \
91 defined(__WXCOCOA__) || \
94 #include "wx/generic/dirdlgg.h"
95 #define wxDirDialog wxGenericDirDialog
99 // ----------------------------------------------------------------------------
100 // common ::wxDirSelector() function
101 // ----------------------------------------------------------------------------
104 wxDirSelector(const wxString
& message
= wxDirSelectorPromptStr
,
105 const wxString
& defaultPath
= wxEmptyString
,
106 long style
= wxDD_DEFAULT_STYLE
,
107 const wxPoint
& pos
= wxDefaultPosition
,
108 wxWindow
*parent
= NULL
);
110 #endif // wxUSE_DIRDLG
113 // _WX_DIRDLG_H_BASE_