-wxString wxFileSelector(const wxChar *title,
- const wxChar *defaultDir, const wxChar *defaultFileName,
- const wxChar *defaultExtension, const wxChar *filter, int flags,
- wxWindow *parent, int x, int y)
-{
- // If there's a default extension specified but no filter, we create a suitable
- // filter.
-
- wxString filter2;
- if ( defaultExtension && !filter )
- filter2 = wxString(wxT("*.")) + wxString(defaultExtension) ;
- else if ( filter )
- filter2 = filter;
-
- wxString defaultDirString;
- if (defaultDir)
- defaultDirString = defaultDir;
- else
- defaultDirString = wxEmptyString ;
-
- wxString defaultFilenameString;
- if (defaultFileName)
- defaultFilenameString = defaultFileName;
- else
- defaultFilenameString = wxEmptyString;
-
- wxFileDialog fileDialog(parent, title, defaultDirString, defaultFilenameString, filter2, flags, wxPoint(x, y));
-
- if ( fileDialog.ShowModal() == wxID_OK )
- {
- return fileDialog.GetPath();
- }
- else
- return wxGetEmptyString();
-}
-
-WXDLLEXPORT wxString wxFileSelectorEx(const wxChar *title,
- const wxChar *defaultDir,
- const wxChar *defaultFileName,
- int* defaultFilterIndex,
- const wxChar *filter,
- int flags,
- wxWindow* parent,
- int x,
- int y)
-
-{
- wxFileDialog fileDialog(parent, title ? title : wxT(""), defaultDir ? defaultDir : wxT(""),
- defaultFileName ? defaultFileName : wxT(""), filter ? filter : wxT(""), flags, wxPoint(x, y));
-
- if ( fileDialog.ShowModal() == wxID_OK )
- {
- *defaultFilterIndex = fileDialog.GetFilterIndex();
- return fileDialog.GetPath();
- }
- else
- return wxGetEmptyString();
-}
-
-wxFileDialog::wxFileDialog(wxWindow *parent, const wxString& message,
- const wxString& defaultDir, const wxString& defaultFileName, const wxString& wildCard,
- long style, const wxPoint& pos)
+wxFileDialog::wxFileDialog(
+ wxWindow *parent, const wxString& message,
+ const wxString& defaultDir, const wxString& defaultFileName, const wxString& wildCard,
+ long style, const wxPoint& pos, const wxSize& sz, const wxString& name)
+ : wxFileDialogBase(parent, message, defaultDir, defaultFileName, wildCard, style, pos, sz, name)