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
[];
29 #define wxDD_DEFAULT_STYLE \
30 (wxDEFAULT_DIALOG_STYLE | wxDD_NEW_DIR_BUTTON)
32 #define wxDD_DEFAULT_STYLE \
33 (wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | wxDD_NEW_DIR_BUTTON)
37 The interface (TODO: make the other classes really derive from it!) is
40 class WXDLLEXPORT wxDirDialogBase : public wxDialog
43 wxDirDialogBase(wxWindow *parent,
44 const wxString& title = wxFileSelectorPromptStr,
45 const wxString& defaultPath = wxEmptyString,
46 long style = wxDD_DEFAULT_STYLE,
47 const wxPoint& pos = wxDefaultPosition,
48 const wxSize& sz = wxDefaultSize,
49 const wxString& name = _T("dirdialog"));
51 void SetMessage(const wxString& message);
52 void SetPath(const wxString& path);
53 void SetStyle(long style);
55 wxString GetMessage() const;
56 wxString GetPath() const;
57 long GetStyle() const;
62 // Universal and non-port related switches with need for generic implementation
63 #if defined(__WXMSW__) && (defined(__WXUNIVERSAL__) || \
64 defined(__SALFORDC__) || \
66 (defined (__GNUWIN32__) && !wxUSE_NORLANDER_HEADERS))
68 #include "wx/generic/dirdlgg.h"
69 #define wxDirDialog wxGenericDirDialog
71 // MS PocketPC or MS Smartphone
72 #elif defined(__WXMSW__) && defined(__WXWINCE__) && !defined(__HANDHELDPC__)
74 #include "wx/generic/dirdlgg.h"
75 #define wxDirDialog wxGenericDirDialog
78 #elif defined(__WXMSW__)
80 #include "wx/msw/dirdlg.h"
83 #elif defined(__WXMAC__)
85 #include "wx/mac/dirdlg.h"
87 // Other ports use generic implementation
88 #elif defined(__WXMOTIF__) || \
89 defined(__WXGTK__) || \
90 defined(__WXX11__) || \
91 defined(__WXMGL__) || \
92 defined(__WXCOCOA__) || \
95 #include "wx/generic/dirdlgg.h"
96 #define wxDirDialog wxGenericDirDialog
100 // ----------------------------------------------------------------------------
101 // common ::wxDirSelector() function
102 // ----------------------------------------------------------------------------
105 wxDirSelector(const wxString
& message
= wxDirSelectorPromptStr
,
106 const wxString
& defaultPath
= wxEmptyString
,
107 long style
= wxDD_DEFAULT_STYLE
,
108 const wxPoint
& pos
= wxDefaultPosition
,
109 wxWindow
*parent
= NULL
);
111 #endif // wxUSE_DIRDLG
114 // _WX_DIRDLG_H_BASE_