wxMaxima
Loading...
Searching...
No Matches
Data Structures | Functions
SaveAsDefaults.h File Reference

Declares SaveAsDefaults(), what the "Save As" dialog starts out with. More...

#include <wx/string.h>
Include dependency graph for SaveAsDefaults.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  SaveAsDefault
 The file name and file type the "Save As" dialog is opened with. More...
 

Functions

SaveAsDefault SaveAsDefaults (const wxString &currentFile, const wxString &defaultExt, const wxString &untitled)
 What the "Save As" dialog proposes for a document.
 

Detailed Description

Declares SaveAsDefaults(), what the "Save As" dialog starts out with.

Function Documentation

◆ SaveAsDefaults()

SaveAsDefault SaveAsDefaults ( const wxString &  currentFile,
const wxString &  defaultExt,
const wxString &  untitled 
)

What the "Save As" dialog proposes for a document.

The proposed name always carries its extension, which has to agree with the file type the dialog shows (GH #2440). If it had none, wxGTK's wxFileDialog would append the extension of the first file type to it on construction, and choosing a different type with SetFilterIndex() later doesn't change the name again. A .wxm document was therefore proposed as name.wxmx while the dialog said *.wxm, and saved as a .wxmx. Neither does picking another file type in GTK's dialog rename the file: there the file type only filters what the dialog lists.

Parameters
currentFileThe document's file name, empty for an untitled one.
defaultExtThe extension of the last document saved, for an untitled document.
untitledThe (translated) name of an untitled document.