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