]> git.saurik.com Git - wxWidgets.git/blame - include/wx/filedlg.h
renamed WXDLLEXPORT_BASE/CORE to WXDLLIMPEXP_BASE/CORE
[wxWidgets.git] / include / wx / filedlg.h
CommitLineData
b600ed13
VZ
1/////////////////////////////////////////////////////////////////////////////
2// Name: filedlg.h
3// Purpose: wxFileDialog base header
4// Author: Robert Roebling
5// Modified by:
6// Created: 8/17/99
7// Copyright: (c) Robert Roebling
8// RCS-ID:
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
34138703
JS
12#ifndef _WX_FILEDLG_H_BASE_
13#define _WX_FILEDLG_H_BASE_
c801d85f 14
1e6feb95
VZ
15#if wxUSE_FILEDLG
16
b600ed13
VZ
17#if defined(__GNUG__) && !defined(__APPLE__)
18#pragma interface "filedlg.h"
19#endif
20
21//----------------------------------------------------------------------------
22// wxFileDialog data and generic functions
23//----------------------------------------------------------------------------
24
c61f4f6d
VZ
25enum
26{
3f6638b8
VZ
27 wxOPEN = 0x0001,
28 wxSAVE = 0x0002,
29 wxOVERWRITE_PROMPT = 0x0004,
30 wxHIDE_READONLY = 0x0008,
31 wxFILE_MUST_EXIST = 0x0010,
32 wxMULTIPLE = 0x0020,
33 wxCHANGE_DIR = 0x0040
c61f4f6d
VZ
34};
35
b600ed13
VZ
36WXDLLEXPORT_DATA(extern const wxChar*) wxFileSelectorPromptStr;
37WXDLLEXPORT_DATA(extern const wxChar*) wxFileSelectorDefaultWildcardStr;
38
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"
44extern int wxParseFileFilter(const wxString& filterStr,
45 wxArrayString& descriptions,
46 wxArrayString& filters);
47
48//----------------------------------------------------------------------------
49// wxFileDialog convenience functions
50//----------------------------------------------------------------------------
51
52// File selector - backward compatibility
53WXDLLEXPORT wxString
54wxFileSelector(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,
59 int flags = 0,
60 wxWindow *parent = NULL,
61 int x = -1, int y = -1);
62
63// An extended version of wxFileSelector
64WXDLLEXPORT wxString
65wxFileSelectorEx(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,
70 int flags = 0,
71 wxWindow *parent = NULL,
72 int x = -1, int y = -1);
73
74// Ask for filename to load
75WXDLLEXPORT wxString
76wxLoadFileSelector(const wxChar *what,
77 const wxChar *extension,
78 const wxChar *default_name = (const wxChar *)NULL,
79 wxWindow *parent = (wxWindow *) NULL);
80
81// Ask for filename to save
82WXDLLEXPORT wxString
83wxSaveFileSelector(const wxChar *what,
84 const wxChar *extension,
85 const wxChar *default_name = (const wxChar *) NULL,
86 wxWindow *parent = (wxWindow *) NULL);
87
88
099d4217
CE
89#if defined (__WXUNIVERSAL__)
90#include "wx/generic/filedlgg.h"
91#elif defined(__WXMSW__)
c801d85f 92#include "wx/msw/filedlg.h"
2049ba38 93#elif defined(__WXMOTIF__)
34138703 94#include "wx/motif/filedlg.h"
2049ba38 95#elif defined(__WXGTK__)
8b17ba72 96#include "wx/generic/filedlgg.h"
83df96d6 97#elif defined(__WXX11__)
7266b672 98#include "wx/generic/filedlgg.h"
4a70a30b
VS
99#elif defined(__WXMGL__)
100#include "wx/generic/filedlgg.h"
34138703
JS
101#elif defined(__WXMAC__)
102#include "wx/mac/filedlg.h"
0201182b
DE
103#elif defined(__WXCOCOA__)
104#include "wx/generic/filedlgg.h"
1777b9bb
DW
105#elif defined(__WXPM__)
106#include "wx/os2/filedlg.h"
c801d85f
KB
107#endif
108
1e6feb95 109#endif // wxUSE_FILEDLG
ba681060 110
b600ed13 111#endif // _WX_FILEDLG_H_BASE_