1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxFileDialog base header
4 // Author: Robert Roebling
7 // Copyright: (c) Robert Roebling
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_FILEDLG_H_BASE_
13 #define _WX_FILEDLG_H_BASE_
17 #if defined(__GNUG__) && !defined(__APPLE__)
18 #pragma interface "filedlg.h"
21 //----------------------------------------------------------------------------
22 // wxFileDialog data and generic functions
23 //----------------------------------------------------------------------------
29 wxOVERWRITE_PROMPT
= 0x0004,
30 wxHIDE_READONLY
= 0x0008,
31 wxFILE_MUST_EXIST
= 0x0010,
36 WXDLLEXPORT_DATA(extern const wxChar
*) wxFileSelectorPromptStr
;
37 WXDLLEXPORT_DATA(extern const wxChar
*) wxFileSelectorDefaultWildcardStr
;
39 // Parses the filterStr, returning the number of filters.
40 // Returns 0 if none or if there's a problem, they arrays will contain an equal
41 // number of items found before the error.
42 // filterStr is in the form:
43 // "All files (*.*)|*.*|Image Files (*.jpeg *.png)|*.jpg;*.png"
44 extern int wxParseFileFilter(const wxString
& filterStr
,
45 wxArrayString
& descriptions
,
46 wxArrayString
& filters
);
48 //----------------------------------------------------------------------------
49 // wxFileDialog convenience functions
50 //----------------------------------------------------------------------------
52 // File selector - backward compatibility
54 wxFileSelector(const wxChar
*message
= wxFileSelectorPromptStr
,
55 const wxChar
*default_path
= NULL
,
56 const wxChar
*default_filename
= NULL
,
57 const wxChar
*default_extension
= NULL
,
58 const wxChar
*wildcard
= wxFileSelectorDefaultWildcardStr
,
60 wxWindow
*parent
= NULL
,
61 int x
= -1, int y
= -1);
63 // An extended version of wxFileSelector
65 wxFileSelectorEx(const wxChar
*message
= wxFileSelectorPromptStr
,
66 const wxChar
*default_path
= NULL
,
67 const wxChar
*default_filename
= NULL
,
68 int *indexDefaultExtension
= NULL
,
69 const wxChar
*wildcard
= wxFileSelectorDefaultWildcardStr
,
71 wxWindow
*parent
= NULL
,
72 int x
= -1, int y
= -1);
74 // Ask for filename to load
76 wxLoadFileSelector(const wxChar
*what
,
77 const wxChar
*extension
,
78 const wxChar
*default_name
= (const wxChar
*)NULL
,
79 wxWindow
*parent
= (wxWindow
*) NULL
);
81 // Ask for filename to save
83 wxSaveFileSelector(const wxChar
*what
,
84 const wxChar
*extension
,
85 const wxChar
*default_name
= (const wxChar
*) NULL
,
86 wxWindow
*parent
= (wxWindow
*) NULL
);
89 #if defined (__WXUNIVERSAL__)
90 #include "wx/generic/filedlgg.h"
91 #elif defined(__WXMSW__)
92 #include "wx/msw/filedlg.h"
93 #elif defined(__WXMOTIF__)
94 #include "wx/motif/filedlg.h"
95 #elif defined(__WXGTK__)
96 #include "wx/generic/filedlgg.h"
97 #elif defined(__WXX11__)
98 #include "wx/generic/filedlgg.h"
99 #elif defined(__WXMGL__)
100 #include "wx/generic/filedlgg.h"
101 #elif defined(__WXMAC__)
102 #include "wx/mac/filedlg.h"
103 #elif defined(__WXCOCOA__)
104 #include "wx/generic/filedlgg.h"
105 #elif defined(__WXPM__)
106 #include "wx/os2/filedlg.h"
109 #endif // wxUSE_FILEDLG
111 #endif // _WX_FILEDLG_H_BASE_