1wxFileDialog(3)            Erlang Module Definition            wxFileDialog(3)
2
3
4

NAME

6       wxFileDialog - Functions for wxFileDialog class
7

DESCRIPTION

9       This class represents the file chooser dialog.
10
11       The path and filename are distinct elements of a full file pathname. If
12       path is ?wxEmptyString, the current directory will be used. If filename
13       is  ?wxEmptyString,  no default filename will be supplied. The wildcard
14       determines what files are displayed in the file selector, and file  ex‐
15       tension supplies a type extension for the required filename.
16
17       The typical usage for the open file dialog is:
18
19       The typical usage for the save file dialog is instead somewhat simpler:
20
21       Remark: All implementations of the wxFileDialog provide a wildcard fil‐
22       ter. Typing a filename containing wildcards (*, ?) in the filename text
23       item,  and clicking on Ok, will result in only those files matching the
24       pattern being displayed. The wildcard may be a specification for multi‐
25       ple  types  of  file  with  a description for each, such as: It must be
26       noted that wildcard support in the native Motif file  dialog  is  quite
27       limited:  only  one file type is supported, and it is displayed without
28       the  descriptive  test;  "BMP  files  (*.bmp)|*.bmp"  is  displayed  as
29       "*.bmp", and both "BMP files (*.bmp)|*.bmp|GIF files (*.gif)|*.gif" and
30       "Image files|*.bmp;*.gif" are errors. On Mac macOS in the open file di‐
31       alog  the  filter choice box is not shown by default. Instead all given
32       wildcards are appplied at the same time: So in the  above  example  all
33       bmp,  gif  and  png  files are displayed. To enforce the display of the
34       filter choice set the corresponding wxSystemOptions before calling  the
35       file  open  dialog: But in contrast to Windows and Unix, where the file
36       type choice filters only the selected files, on Mac macOS even in  this
37       case  the  dialog  shows  all  files matching all file types. The files
38       which does not match the currently selected file type  are  greyed  out
39       and are not selectable.
40
41       Styles
42
43       This class supports the following styles:
44
45       See: Overview cmndlg, ?wxFileSelector()
46
47       This  class  is  derived  (and  can use functions) from: wxDialog wxTo‐
48       pLevelWindow wxWindow wxEvtHandler
49
50       wxWidgets docs: wxFileDialog
51

DATA TYPES

53       wxFileDialog() = wx:wx_object()
54

EXPORTS

56       new(Parent) -> wxFileDialog()
57
58              Types:
59
60                 Parent = wxWindow:wxWindow()
61
62       new(Parent, Options :: [Option]) -> wxFileDialog()
63
64              Types:
65
66                 Parent = wxWindow:wxWindow()
67                 Option =
68                     {message, unicode:chardata()} |
69                     {defaultDir, unicode:chardata()} |
70                     {defaultFile, unicode:chardata()} |
71                     {wildCard, unicode:chardata()} |
72                     {style, integer()} |
73                     {pos, {X :: integer(), Y :: integer()}} |
74                     {sz, {W :: integer(), H :: integer()}}
75
76              Constructor.
77
78              Use wxDialog:showModal/1 to show the dialog.
79
80       destroy(This :: wxFileDialog()) -> ok
81
82              Destructor.
83
84       getDirectory(This) -> unicode:charlist()
85
86              Types:
87
88                 This = wxFileDialog()
89
90              Returns the default directory.
91
92       getFilename(This) -> unicode:charlist()
93
94              Types:
95
96                 This = wxFileDialog()
97
98              Returns the default filename.
99
100              Note: This function can't be used with dialogs  which  have  the
101              wxFD_MULTIPLE style, use getFilenames/1 instead.
102
103       getFilenames(This) -> [unicode:charlist()]
104
105              Types:
106
107                 This = wxFileDialog()
108
109              Fills the array filenames with the names of the files chosen.
110
111              This  function  should  only be used with the dialogs which have
112              wxFD_MULTIPLE style, use getFilename/1 for the others.
113
114              Note that under Windows, if  the  user  selects  shortcuts,  the
115              filenames  include paths, since the application cannot determine
116              the full path of each referenced file by appending the directory
117              containing the shortcuts to the filename.
118
119       getFilterIndex(This) -> integer()
120
121              Types:
122
123                 This = wxFileDialog()
124
125              Returns the index into the list of filters supplied, optionally,
126              in the wildcard parameter.
127
128              Before the dialog is shown, this is the index which will be used
129              when the dialog is first displayed.
130
131              After  the  dialog  is  shown, this is the index selected by the
132              user.
133
134       getMessage(This) -> unicode:charlist()
135
136              Types:
137
138                 This = wxFileDialog()
139
140              Returns the message that will be displayed on the dialog.
141
142       getPath(This) -> unicode:charlist()
143
144              Types:
145
146                 This = wxFileDialog()
147
148              Returns the full path (directory and filename) of  the  selected
149              file.
150
151              Note:  This  function  can't be used with dialogs which have the
152              wxFD_MULTIPLE style, use getPaths/1 instead.
153
154       getPaths(This) -> [unicode:charlist()]
155
156              Types:
157
158                 This = wxFileDialog()
159
160              Fills the array paths with the full paths of the files chosen.
161
162              This function should only be used with the  dialogs  which  have
163              wxFD_MULTIPLE style, use getPath/1 for the others.
164
165       getWildcard(This) -> unicode:charlist()
166
167              Types:
168
169                 This = wxFileDialog()
170
171              Returns the file dialog wildcard.
172
173       setDirectory(This, Directory) -> ok
174
175              Types:
176
177                 This = wxFileDialog()
178                 Directory = unicode:chardata()
179
180              Sets the default directory.
181
182       setFilename(This, Setfilename) -> ok
183
184              Types:
185
186                 This = wxFileDialog()
187                 Setfilename = unicode:chardata()
188
189              Sets the default filename.
190
191              In wxGTK this will have little effect unless a default directory
192              has previously been set.
193
194       setFilterIndex(This, FilterIndex) -> ok
195
196              Types:
197
198                 This = wxFileDialog()
199                 FilterIndex = integer()
200
201              Sets the default filter index, starting from zero.
202
203       setMessage(This, Message) -> ok
204
205              Types:
206
207                 This = wxFileDialog()
208                 Message = unicode:chardata()
209
210              Sets the message that will be displayed on the dialog.
211
212       setPath(This, Path) -> ok
213
214              Types:
215
216                 This = wxFileDialog()
217                 Path = unicode:chardata()
218
219              Sets the path (the combined directory and filename that will  be
220              returned when the dialog is dismissed).
221
222       setWildcard(This, WildCard) -> ok
223
224              Types:
225
226                 This = wxFileDialog()
227                 WildCard = unicode:chardata()
228
229              Sets  the  wildcard,  which can contain multiple file types, for
230              example: "BMP files (*.bmp)|*.bmp|GIF files (*.gif)|*.gif".
231
232              Note that the native Motif dialog has some limitations with  re‐
233              spect to wildcards; see the Remarks section above.
234
235
236
237wxWidgets team.                     wx 2.1                     wxFileDialog(3)
Impressum