X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1e6feb95a79834836e88143b15d9f424ebe79621..1338c59a025505bc066be220fe56e898a72b3ad3:/include/wx/mimetype.h diff --git a/include/wx/mimetype.h b/include/wx/mimetype.h index 2b7219d771..ee204f6de5 100644 --- a/include/wx/mimetype.h +++ b/include/wx/mimetype.h @@ -7,13 +7,13 @@ // Created: 23.09.98 // RCS-ID: $Id$ // Copyright: (c) 1998 Vadim Zeitlin -// Licence: wxWindows license (part of wxExtra library) +// Licence: wxWindows licence (part of wxExtra library) ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_MIMETYPE_H_ #define _WX_MIMETYPE_H_ -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(__APPLE__) #pragma interface "mimetypebase.h" #endif // __GNUG__ @@ -46,6 +46,9 @@ enum wxMailcapStyle wxMAILCAP_ALL = 15 }; +#define wxICON_LARGE 0 +#define wxICON_SMALL 1 + /* TODO: would it be more convenient to have this class? @@ -81,10 +84,10 @@ class WXDLLEXPORT wxFileTypeInfo public: // ctors // a normal item - wxFileTypeInfo(const char *mimeType, - const char *openCmd, - const char *printCmd, - const char *desc, + wxFileTypeInfo(const wxChar *mimeType, + const wxChar *openCmd, + const wxChar *printCmd, + const wxChar *desc, // the other parameters form a NULL terminated list of // extensions ...); @@ -176,7 +179,8 @@ public: public: // ctors MessageParameters() { } - MessageParameters(const wxString& filename, const wxString& mimetype) + MessageParameters(const wxString& filename, + const wxString& mimetype = _T("")) : m_filename(filename), m_mimetype(mimetype) { } // accessors (called by GetOpenCommand) @@ -213,7 +217,8 @@ public: // in this file (Win-only) is in iconIndex bool GetIcon(wxIcon *icon, wxString *iconFile = NULL, - int *iconIndex = NULL) const; + int *iconIndex = NULL, + int iconSize = wxICON_LARGE) const; // get a brief file type description ("*.txt" => "text document") bool GetDescription(wxString *desc) const; @@ -221,6 +226,9 @@ public: // get the command to execute the file of given type bool GetOpenCommand(wxString *openCmd, const MessageParameters& params) const; + // a simpler to use version of GetOpenCommand() -- it only takes the + // filename and returns an empty string on failure + wxString GetOpenCommand(const wxString& filename) const; // get the command to print the file of given type bool GetPrintCommand(wxString *printCmd, const MessageParameters& params) const; @@ -301,7 +309,7 @@ public: // // use the extraDir parameter if you want to look for files in another // directory - void Initialize(int mailcapStyle = wxMAILCAP_STANDARD, + void Initialize(int mailcapStyle = wxMAILCAP_ALL, const wxString& extraDir = wxEmptyString); // and this function clears all the data from the manager