-// Generic file load/save dialog (for internal use only)
-static
-wxString wxDefaultFileSelector(bool load,
- const wxChar *what,
- const wxChar *extension,
- const wxChar *default_name,
- wxWindow *parent)
-{
- wxString prompt;
- wxString str;
- if (load) str = _("Load %s file");
- else str = _("Save %s file");
- prompt.Printf(str, what);
-
- const wxChar *ext = extension;
- if (*ext == _T('.'))
- ext++;
-
- wxString wild;
- wild.Printf(_T("*.%s"), ext);
-
- return wxFileSelector (prompt, NULL, default_name, ext, wild, 0, parent);
-}
-
-// Generic file load dialog
-WXDLLEXPORT wxString wxLoadFileSelector(const wxChar *what,
- const wxChar *extension,
- const wxChar *default_name,
- wxWindow *parent)
-{
- return wxDefaultFileSelector(TRUE, what, extension, default_name, parent);
-}
-
-// Generic file save dialog
-WXDLLEXPORT wxString wxSaveFileSelector(const wxChar *what,
- const wxChar *extension,
- const wxChar *default_name,
- wxWindow *parent)
-{
- return wxDefaultFileSelector(FALSE, what, extension, default_name, parent);
-}