+// fwd decls
+class WXDLLEXPORT wxIcon;
+class WXDLLEXPORT wxFileTypeImpl;
+class WXDLLEXPORT wxMimeTypesManagerImpl;
+
+// these constants define the MIME informations source under UNIX and are used
+// by wxMimeTypesManager::Initialize()
+enum wxMailcapStyle
+{
+ wxMAILCAP_STANDARD = 1,
+ wxMAILCAP_NETSCAPE = 2,
+ wxMAILCAP_KDE = 4,
+ wxMAILCAP_GNOME = 8,
+
+ wxMAILCAP_ALL = 15
+};
+
+/*
+ TODO: would it be more convenient to have this class?
+
+class WXDLLEXPORT wxMimeType : public wxString
+{
+public:
+ // all string ctors here
+
+ wxString GetType() const { return BeforeFirst(_T('/')); }
+ wxString GetSubType() const { return AfterFirst(_T('/')); }
+
+ void SetSubType(const wxString& subtype)
+ {
+ *this = GetType() + _T('/') + subtype;
+ }
+
+ bool Matches(const wxMimeType& wildcard)
+ {
+ // implement using wxMimeTypesManager::IsOfType()
+ }
+};
+
+*/
+
+// ----------------------------------------------------------------------------
+// wxFileTypeInfo: static container of information accessed via wxFileType.
+//
+// This class is used with wxMimeTypesManager::AddFallbacks() and Associate()
+// ----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxFileTypeInfo
+{
+public:
+ // ctors
+ // a normal item
+ wxFileTypeInfo(const char *mimeType,
+ const char *openCmd,
+ const char *printCmd,
+ const char *desc,
+ // the other parameters form a NULL terminated list of
+ // extensions
+ ...);
+
+ // the array elements correspond to the parameters of the ctor above in
+ // the same order
+ wxFileTypeInfo(const wxArrayString& sArray);
+
+ // invalid item - use this to terminate the array passed to
+ // wxMimeTypesManager::AddFallbacks
+ wxFileTypeInfo() { }
+
+ // test if this object can be used
+ bool IsValid() const { return !m_mimeType.IsEmpty(); }
+
+ // setters
+ // set the icon info
+ void SetIcon(const wxString& iconFile, int iconIndex = 0)
+ {
+ m_iconFile = iconFile;
+ m_iconIndex = iconIndex;
+ }
+ // set the short desc
+ void SetShortDesc(const wxString& shortDesc) { m_shortDesc = shortDesc; }