]>
Commit | Line | Data |
---|---|---|
34138703 JS |
1 | #ifndef _WX_DIRDLG_H_BASE_ |
2 | #define _WX_DIRDLG_H_BASE_ | |
c801d85f | 3 | |
1e6feb95 VZ |
4 | #if wxUSE_DIRDLG |
5 | ||
48013bb0 GD |
6 | #include "wx/dialog.h" |
7 | ||
1044a386 JS |
8 | // ---------------------------------------------------------------------------- |
9 | // constants | |
10 | // ---------------------------------------------------------------------------- | |
11 | ||
16cba29d WS |
12 | extern WXDLLEXPORT_DATA(const wxChar*) wxDirDialogNameStr; |
13 | extern WXDLLEXPORT_DATA(const wxChar*) wxDirDialogDefaultFolderStr; | |
14 | extern WXDLLEXPORT_DATA(const wxChar*) wxDirSelectorPromptStr; | |
1044a386 | 15 | |
30dfe2ff JS |
16 | #ifdef __WXWINCE__ |
17 | #define wxDD_DEFAULT_STYLE \ | |
18 | (wxDEFAULT_DIALOG_STYLE | wxDD_NEW_DIR_BUTTON) | |
19 | #else | |
20 | #define wxDD_DEFAULT_STYLE \ | |
21 | (wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | wxDD_NEW_DIR_BUTTON) | |
22 | #endif | |
e78d4a23 VZ |
23 | |
24 | /* | |
25 | The interface (TODO: make the other classes really derive from it!) is | |
26 | something like this: | |
27 | ||
28 | class WXDLLEXPORT wxDirDialogBase : public wxDialog | |
29 | { | |
30 | public: | |
31 | wxDirDialogBase(wxWindow *parent, | |
32 | const wxString& title = wxFileSelectorPromptStr, | |
33 | const wxString& defaultPath = wxEmptyString, | |
34 | long style = wxDD_DEFAULT_STYLE, | |
35 | const wxPoint& pos = wxDefaultPosition, | |
36 | const wxSize& sz = wxDefaultSize, | |
37 | const wxString& name = _T("dirdialog")); | |
38 | ||
39 | void SetMessage(const wxString& message); | |
40 | void SetPath(const wxString& path); | |
41 | void SetStyle(long style); | |
42 | ||
43 | wxString GetMessage() const; | |
44 | wxString GetPath() const; | |
45 | long GetStyle() const; | |
46 | }; | |
47 | ||
48 | */ | |
49 | ||
ba7463d8 | 50 | // Universal and non-port related switches with need for generic implementation |
67f6e901 | 51 | #if defined(__WXMSW__) && (defined(__WXUNIVERSAL__) || \ |
67f6e901 RD |
52 | defined(__SALFORDC__) || \ |
53 | !wxUSE_OLE || \ | |
54 | (defined (__GNUWIN32__) && !wxUSE_NORLANDER_HEADERS)) | |
ba7463d8 | 55 | |
4a70a30b | 56 | #include "wx/generic/dirdlgg.h" |
ba7463d8 | 57 | #define wxDirDialog wxGenericDirDialog |
9b141468 | 58 | |
bcfced36 JS |
59 | // MS PocketPC or MS Smartphone |
60 | #elif defined(__WXMSW__) && defined(__WXWINCE__) && !defined(__HANDHELDPC__) | |
9b141468 WS |
61 | |
62 | #include "wx/generic/dirdlgg.h" | |
63 | #define wxDirDialog wxGenericDirDialog | |
ba7463d8 WS |
64 | |
65 | // Native MSW | |
66 | #elif defined(__WXMSW__) | |
67 | ||
68 | #include "wx/msw/dirdlg.h" | |
69 | ||
70 | // Native Mac | |
34138703 | 71 | #elif defined(__WXMAC__) |
ba7463d8 | 72 | |
10eb1f1e | 73 | #include "wx/mac/dirdlg.h" |
c801d85f | 74 | |
ba7463d8 WS |
75 | // Other ports use generic implementation |
76 | #elif defined(__WXMOTIF__) || \ | |
77 | defined(__WXGTK__) || \ | |
78 | defined(__WXX11__) || \ | |
79 | defined(__WXMGL__) || \ | |
80 | defined(__WXCOCOA__) || \ | |
81 | defined(__WXPM__) | |
82 | ||
83 | #include "wx/generic/dirdlgg.h" | |
e78d4a23 | 84 | #define wxDirDialog wxGenericDirDialog |
ba7463d8 | 85 | |
e78d4a23 VZ |
86 | #endif |
87 | ||
10eb1f1e VZ |
88 | // ---------------------------------------------------------------------------- |
89 | // common ::wxDirSelector() function | |
90 | // ---------------------------------------------------------------------------- | |
91 | ||
10eb1f1e VZ |
92 | WXDLLEXPORT wxString |
93 | wxDirSelector(const wxString& message = wxDirSelectorPromptStr, | |
94 | const wxString& defaultPath = wxEmptyString, | |
e78d4a23 | 95 | long style = wxDD_DEFAULT_STYLE, |
10eb1f1e VZ |
96 | const wxPoint& pos = wxDefaultPosition, |
97 | wxWindow *parent = NULL); | |
98 | ||
1e6feb95 VZ |
99 | #endif // wxUSE_DIRDLG |
100 | ||
c801d85f | 101 | #endif |
34138703 | 102 | // _WX_DIRDLG_H_BASE_ |