1//---------------------------------------------------------------------------
2// This file is generated by wxPython's SIP generator.  Do not edit by hand.
3//
4// Copyright: (c) 2018 by Total Control Software
5// License:   wxWindows License
6//
7// This file will be included by _core.sip
8//
9//---------------------------------------------------------------------------
10
11//---------------------------------------------------------------------------
12
13const int wxFD_DEFAULT_STYLE;
14enum
15{
16    wxFD_OPEN,
17    wxFD_SAVE,
18    wxFD_OVERWRITE_PROMPT,
19    wxFD_FILE_MUST_EXIST,
20    wxFD_MULTIPLE,
21    wxFD_CHANGE_DIR,
22    wxFD_PREVIEW
23};
24
25const char* wxFileDialogNameStr;
26
27class wxFileDialog : wxDialog
28{
29    %Docstring
30        FileDialog(parent, message=FileSelectorPromptStr, defaultDir=EmptyString, defaultFile=EmptyString, wildcard=FileSelectorDefaultWildcardStr, style=FD_DEFAULT_STYLE, pos=DefaultPosition, size=DefaultSize, name=FileDialogNameStr)
31
32        This class represents the file chooser dialog.
33    %End
34    %TypeHeaderCode
35        #include <wx/filedlg.h>
36    %End
37
38public:
39    wxFileDialog(
40        wxWindow * parent,
41        const wxString & message = wxFileSelectorPromptStr,
42        const wxString & defaultDir = wxEmptyString,
43        const wxString & defaultFile = wxEmptyString,
44        const wxString & wildcard = wxFileSelectorDefaultWildcardStr,
45        long style = wxFD_DEFAULT_STYLE,
46        const wxPoint & pos = wxDefaultPosition,
47        const wxSize & size = wxDefaultSize,
48        const wxString & name = wxFileDialogNameStr
49    )   /Transfer/;
50    %PreMethodCode
51        if (!wxPyCheckForApp()) return NULL;
52    %End
53
54    ~wxFileDialog();
55
56    wxString GetCurrentlySelectedFilename() const;
57    %Docstring
58        GetCurrentlySelectedFilename() -> String
59
60        Returns the path of the file currently selected in dialog.
61    %End
62
63    wxString GetDirectory() const;
64    %Docstring
65        GetDirectory() -> String
66
67        Returns the default directory.
68    %End
69
70    wxWindow * GetExtraControl() const;
71    %Docstring
72        GetExtraControl() -> Window
73
74        If functions SetExtraControlCreator() and ShowModal() were called,
75        returns the extra window.
76    %End
77
78    wxString GetFilename() const;
79    %Docstring
80        GetFilename() -> String
81
82        Returns the default filename.
83    %End
84
85    wxArrayString* GetFilenames()   /Factory/;
86    %Docstring
87        GetFilenames() -> ArrayString
88
89        Returns a list of filenames chosen in the dialog.  This function
90        should only be used with the dialogs which have wx.MULTIPLE style,
91        use GetFilename for the others.
92    %End
93    %MethodCode
94        PyErr_Clear();
95        Py_BEGIN_ALLOW_THREADS
96        sipRes = _wxFileDialog_GetFilenames(sipCpp);
97        Py_END_ALLOW_THREADS
98        if (PyErr_Occurred()) sipIsErr = 1;
99    %End
100    %TypeCode
101    wxArrayString* _wxFileDialog_GetFilenames(wxFileDialog* self)
102    {
103        wxArrayString* arr = new wxArrayString;
104        self->GetFilenames(*arr);
105        return arr;
106    }
107    %End
108
109    int GetFilterIndex() const;
110    %Docstring
111        GetFilterIndex() -> int
112
113        Returns the index into the list of filters supplied, optionally, in
114        the wildcard parameter.
115    %End
116
117    wxString GetMessage() const;
118    %Docstring
119        GetMessage() -> String
120
121        Returns the message that will be displayed on the dialog.
122    %End
123
124    wxString GetPath() const;
125    %Docstring
126        GetPath() -> String
127
128        Returns the full path (directory and filename) of the selected file.
129    %End
130
131    wxArrayString* GetPaths()   /Factory/;
132    %Docstring
133        GetPaths() -> ArrayString
134
135        Returns a list of the full paths of the files chosen. This function
136        should only be used with the dialogs which have wx.MULTIPLE style, use
137        GetPath for the others.
138    %End
139    %MethodCode
140        PyErr_Clear();
141        Py_BEGIN_ALLOW_THREADS
142        sipRes = _wxFileDialog_GetPaths(sipCpp);
143        Py_END_ALLOW_THREADS
144        if (PyErr_Occurred()) sipIsErr = 1;
145    %End
146    %TypeCode
147    wxArrayString* _wxFileDialog_GetPaths(wxFileDialog* self)
148    {
149        wxArrayString* arr = new wxArrayString;
150        self->GetPaths(*arr);
151        return arr;
152    }
153    %End
154
155    wxString GetWildcard() const;
156    %Docstring
157        GetWildcard() -> String
158
159        Returns the file dialog wildcard.
160    %End
161
162    void SetDirectory(
163        const wxString & directory
164    );
165    %Docstring
166        SetDirectory(directory)
167
168        Sets the default directory.
169    %End
170
171    void SetFilename(
172        const wxString & setfilename
173    );
174    %Docstring
175        SetFilename(setfilename)
176
177        Sets the default filename.
178    %End
179
180    void SetFilterIndex(
181        int filterIndex
182    );
183    %Docstring
184        SetFilterIndex(filterIndex)
185
186        Sets the default filter index, starting from zero.
187    %End
188
189    void SetMessage(
190        const wxString & message
191    );
192    %Docstring
193        SetMessage(message)
194
195        Sets the message that will be displayed on the dialog.
196    %End
197
198    void SetPath(
199        const wxString & path
200    );
201    %Docstring
202        SetPath(path)
203
204        Sets the path (the combined directory and filename that will be
205        returned when the dialog is dismissed).
206    %End
207
208    void SetWildcard(
209        const wxString & wildCard
210    );
211    %Docstring
212        SetWildcard(wildCard)
213
214        Sets the wildcard, which can contain multiple file types, for example:
215        "BMP files (*.bmp)|*.bmp|GIF files (*.gif)|*.gif".
216    %End
217
218    int ShowModal();
219    %Docstring
220        ShowModal() -> int
221
222        Shows the dialog, returning wxID_OK if the user pressed OK, and
223        wxID_CANCEL otherwise.
224    %End
225
226    public:
227    virtual wxPoint GetClientAreaOrigin() const;
228    virtual bool Validate();
229    virtual bool TransferDataToWindow();
230    virtual bool TransferDataFromWindow();
231    virtual void InitDialog();
232    virtual bool AcceptsFocus() const;
233    virtual bool AcceptsFocusRecursively() const;
234    virtual bool AcceptsFocusFromKeyboard() const;
235    virtual void AddChild( wxWindowBase *child );
236    virtual void RemoveChild( wxWindowBase *child );
237    virtual void InheritAttributes();
238    virtual bool ShouldInheritColours() const;
239    virtual void OnInternalIdle();
240    virtual wxWindow *GetMainWindowOfCompositeControl();
241    virtual bool InformFirstDirection(int direction, int size, int availableOtherDir);
242    virtual void SetCanFocus(bool canFocus);
243    virtual bool Destroy();
244    virtual void SetValidator( const wxValidator &validator );
245    virtual wxValidator* GetValidator();
246
247
248    protected:
249    virtual bool ProcessEvent(wxEvent & event);
250    virtual void DoEnable(bool enable);
251    virtual void DoGetPosition(int *x, int *y) const;
252    virtual void DoGetSize(int *width, int *height) const;
253    virtual void DoGetClientSize(int *width, int *height) const;
254    virtual wxSize DoGetBestSize() const;
255    virtual wxSize DoGetBestClientSize() const;
256    virtual void DoSetSize(int x, int y, int width, int height, int sizeFlags);
257    virtual void DoSetClientSize(int width, int height);
258    virtual void DoSetSizeHints( int minW, int minH, int maxW, int maxH, int incW, int incH );
259    virtual wxSize DoGetBorderSize() const;
260    virtual void DoMoveWindow(int x, int y, int width, int height);
261    virtual void DoSetWindowVariant( wxWindowVariant variant);
262    virtual wxBorder GetDefaultBorder() const;
263    virtual wxBorder GetDefaultBorderForControl() const;
264    virtual void DoFreeze();
265    virtual void DoThaw();
266    virtual bool HasTransparentBackground();
267    virtual bool TryBefore(wxEvent& event);
268    virtual bool TryAfter(wxEvent& event);
269
270
271    public:
272
273
274    static
275    wxVisualAttributes GetClassDefaultAttributes(
276        wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL
277    );
278    %Docstring
279        GetClassDefaultAttributes(variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
280    %End
281    %PreMethodCode
282        if (!wxPyCheckForApp()) return NULL;
283    %End
284
285    public:
286
287
288    %Property(name=CurrentlySelectedFilename, get=GetCurrentlySelectedFilename)
289    %Property(name=Directory, get=GetDirectory, set=SetDirectory)
290    %Property(name=ExtraControl, get=GetExtraControl)
291    %Property(name=Filename, get=GetFilename, set=SetFilename)
292    %Property(name=Filenames, get=GetFilenames)
293    %Property(name=FilterIndex, get=GetFilterIndex, set=SetFilterIndex)
294    %Property(name=Message, get=GetMessage, set=SetMessage)
295    %Property(name=Path, get=GetPath, set=SetPath)
296    %Property(name=Paths, get=GetPaths)
297    %Property(name=Wildcard, get=GetWildcard, set=SetWildcard)
298};  // end of class wxFileDialog
299
300
301wxString wxFileSelector(
302    const wxString & message,
303    const wxString & default_path = wxEmptyString,
304    const wxString & default_filename = wxEmptyString,
305    const wxString & default_extension = wxEmptyString,
306    const wxString & wildcard = wxFileSelectorDefaultWildcardStr,
307    int flags = 0,
308    wxWindow * parent = NULL,
309    int x = wxDefaultCoord,
310    int y = wxDefaultCoord
311);
312%Docstring
313    FileSelector(message, default_path=EmptyString, default_filename=EmptyString, default_extension=EmptyString, wildcard=FileSelectorDefaultWildcardStr, flags=0, parent=None, x=DefaultCoord, y=DefaultCoord) -> String
314
315    Pops up a file selector box.
316%End
317%PreMethodCode
318    if (!wxPyCheckForApp()) return NULL;
319%End
320
321wxString wxFileSelectorEx(
322    const wxString & message = wxFileSelectorPromptStr,
323    const wxString & default_path = wxEmptyString,
324    const wxString & default_filename = wxEmptyString,
325    int * indexDefaultExtension = NULL,
326    const wxString & wildcard = wxFileSelectorDefaultWildcardStr,
327    int flags = 0,
328    wxWindow * parent = NULL,
329    int x = wxDefaultCoord,
330    int y = wxDefaultCoord
331);
332%Docstring
333    FileSelectorEx(message=FileSelectorPromptStr, default_path=EmptyString, default_filename=EmptyString, indexDefaultExtension=None, wildcard=FileSelectorDefaultWildcardStr, flags=0, parent=None, x=DefaultCoord, y=DefaultCoord) -> String
334
335    An extended version of wxFileSelector.
336%End
337%PreMethodCode
338    if (!wxPyCheckForApp()) return NULL;
339%End
340
341wxString wxLoadFileSelector(
342    const wxString & what,
343    const wxString & extension,
344    const wxString & default_name = wxEmptyString,
345    wxWindow * parent = NULL
346);
347%Docstring
348    LoadFileSelector(what, extension, default_name=EmptyString, parent=None) -> String
349
350    Ask for filename to load.
351%End
352%PreMethodCode
353    if (!wxPyCheckForApp()) return NULL;
354%End
355
356wxString wxSaveFileSelector(
357    const wxString & what,
358    const wxString & extension,
359    const wxString & default_name = wxEmptyString,
360    wxWindow * parent = NULL
361);
362%Docstring
363    SaveFileSelector(what, extension, default_name=EmptyString, parent=None) -> String
364
365    Ask for filename to save.
366%End
367%PreMethodCode
368    if (!wxPyCheckForApp()) return NULL;
369%End
370
371
372//---------------------------------------------------------------------------
373
374