such as the original file name or the charset (for the text documents).
These parameters may be useful to the program used to open, edit, view or
print the message, so, for example, an e-mail client program will have to
- pass them to this program. Because wxFileType itself can not know about
+ pass them to this program. Because wxFileType itself cannot know about
these parameters, it uses MessageParameters class to query them.
The default implementation only requires the caller to provide the file name
wxFileType();
public:
+ /**
+ Class representing message parameters.
+
+ An object of this class may be passed to wxFileType::GetOpenCommand()
+ and GetPrintCommand() if more than the file name needs to be specified.
+ */
+ class MessageParameters
+ {
+ public:
+ /// Trivial default constructor.
+ MessageParameters();
+
+ /// Constructor taking a filename and a mime type.
+ MessageParameters(const wxString& filename,
+ const wxString& mimetype = wxEmptyString);
+
+ /// Return the filename.
+ const wxString& GetFileName() const;
+
+ /// Return the MIME type.
+ const wxString& GetMimeType() const;
+
+ /// Overridable method for derived classes. Returns empty string by default.
+ virtual wxString GetParamValue(const wxString& name) const;
+
+ /// Trivial but virtual dtor as this class can be inherited from.
+ virtual ~MessageParameters();
+ };
+
/**
Copy ctor.
*/