]> git.saurik.com Git - wxWidgets.git/blame - include/wx/dirdlg.h
Cast to void* before casting to Node** to make the compiler do no strict-aliasing...
[wxWidgets.git] / include / wx / dirdlg.h
CommitLineData
99d80019
JS
1/////////////////////////////////////////////////////////////////////////////
2// Name: wx/dirdlg.h
3// Purpose: wxDirDialog base class
4// Author: Robert Roebling
5// Modified by:
6// Created:
7// Copyright: (c) Robert Roebling
8// RCS-ID: $Id$
9// Licence: wxWindows Licence
10/////////////////////////////////////////////////////////////////////////////
11
34138703
JS
12#ifndef _WX_DIRDLG_H_BASE_
13#define _WX_DIRDLG_H_BASE_
c801d85f 14
1e6feb95
VZ
15#if wxUSE_DIRDLG
16
48013bb0
GD
17#include "wx/dialog.h"
18
1044a386
JS
19// ----------------------------------------------------------------------------
20// constants
21// ----------------------------------------------------------------------------
22
63ec432b
MR
23extern WXDLLEXPORT_DATA(const wxChar) wxDirDialogNameStr[];
24extern WXDLLEXPORT_DATA(const wxChar) wxDirDialogDefaultFolderStr[];
25extern WXDLLEXPORT_DATA(const wxChar) wxDirSelectorPromptStr[];
26
1044a386 27
30dfe2ff
JS
28#ifdef __WXWINCE__
29 #define wxDD_DEFAULT_STYLE \
30 (wxDEFAULT_DIALOG_STYLE | wxDD_NEW_DIR_BUTTON)
31#else
32 #define wxDD_DEFAULT_STYLE \
33 (wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | wxDD_NEW_DIR_BUTTON)
34#endif
e78d4a23
VZ
35
36/*
37 The interface (TODO: make the other classes really derive from it!) is
38 something like this:
39
40class WXDLLEXPORT wxDirDialogBase : public wxDialog
41{
42public:
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"));
50
51 void SetMessage(const wxString& message);
52 void SetPath(const wxString& path);
53 void SetStyle(long style);
54
55 wxString GetMessage() const;
56 wxString GetPath() const;
57 long GetStyle() const;
58};
59
60*/
61
ba7463d8 62// Universal and non-port related switches with need for generic implementation
67f6e901 63#if defined(__WXMSW__) && (defined(__WXUNIVERSAL__) || \
67f6e901
RD
64 defined(__SALFORDC__) || \
65 !wxUSE_OLE || \
66 (defined (__GNUWIN32__) && !wxUSE_NORLANDER_HEADERS))
ba7463d8 67
4a70a30b 68 #include "wx/generic/dirdlgg.h"
ba7463d8 69 #define wxDirDialog wxGenericDirDialog
9b141468 70
bcfced36
JS
71// MS PocketPC or MS Smartphone
72#elif defined(__WXMSW__) && defined(__WXWINCE__) && !defined(__HANDHELDPC__)
9b141468
WS
73
74 #include "wx/generic/dirdlgg.h"
75 #define wxDirDialog wxGenericDirDialog
ba7463d8
WS
76
77// Native MSW
78#elif defined(__WXMSW__)
79
80 #include "wx/msw/dirdlg.h"
81
82// Native Mac
34138703 83#elif defined(__WXMAC__)
ba7463d8 84
10eb1f1e 85 #include "wx/mac/dirdlg.h"
c801d85f 86
ba7463d8
WS
87// Other ports use generic implementation
88#elif defined(__WXMOTIF__) || \
89 defined(__WXGTK__) || \
90 defined(__WXX11__) || \
91 defined(__WXMGL__) || \
92 defined(__WXCOCOA__) || \
93 defined(__WXPM__)
94
95 #include "wx/generic/dirdlgg.h"
e78d4a23 96 #define wxDirDialog wxGenericDirDialog
ba7463d8 97
e78d4a23
VZ
98#endif
99
10eb1f1e
VZ
100// ----------------------------------------------------------------------------
101// common ::wxDirSelector() function
102// ----------------------------------------------------------------------------
103
10eb1f1e
VZ
104WXDLLEXPORT wxString
105wxDirSelector(const wxString& message = wxDirSelectorPromptStr,
106 const wxString& defaultPath = wxEmptyString,
e78d4a23 107 long style = wxDD_DEFAULT_STYLE,
10eb1f1e
VZ
108 const wxPoint& pos = wxDefaultPosition,
109 wxWindow *parent = NULL);
110
1e6feb95
VZ
111#endif // wxUSE_DIRDLG
112
c801d85f 113#endif
34138703 114 // _WX_DIRDLG_H_BASE_