X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/cc385968c4b81d0cee98c164cb870a8759d927bc..8962e1d9383d615ea48979cd76bd53d5aa5b3026:/docs/latex/wx/mimetype.tex diff --git a/docs/latex/wx/mimetype.tex b/docs/latex/wx/mimetype.tex index bd7275d5b9..9de41ff3f3 100644 --- a/docs/latex/wx/mimetype.tex +++ b/docs/latex/wx/mimetype.tex @@ -19,9 +19,24 @@ additional functions \helpref{wxMimeTypesManager::ReadMimeTypes}{wxmimetypesmanagerreadmimetypes} are provided to load additional files. +If GNOME or KDE desktop environment is installed, then wxMimeTypesManager +gathers MIME information from respective files (e.g. .kdelnk files under KDE). + NB: Currently, wxMimeTypesManager is limited to reading MIME type information but it will support modifying it as well in the future versions. +\wxheading{Global objects} + +Global instance of wxMimeTypesManager is always available. It is defined +as follows: + +\begin{verbatim} +wxMimeTypesManager *wxTheMimeTypesManager; +\end{verbatim} + +It is recommended to use this instance instead of creating your own because +gathering MIME information may take quite a long on Unix systems. + \wxheading{Derived from} No base class. @@ -70,7 +85,8 @@ default ones which are loaded automatically) containing MIME information in either mailcap(5) or mime.types(5) format. \helpref{ReadMailcap}{wxmimetypesmanagerreadmailcap}\\ -\helpref{ReadMimeTypes}{wxmimetypesmanagerreadmimetypes} +\helpref{ReadMimeTypes}{wxmimetypesmanagerreadmimetypes}\\ +\helpref{AddFallbacks}{wxmimetypesmanageraddfallbacks} %%%%% MEMBERS HERE %%%%% \helponly{\insertatlevel{2}{ @@ -93,6 +109,17 @@ additional mailcap/mime.types files. Destructor is not virtual, so this class should not be derived from. +\membersection{wxMimeTypesManager::AddFallbacks}\label{wxmimetypesmanageraddfallbacks} + +\func{void}{AddFallbacks}{\param{const wxFileTypeInfo *}{fallbacks}} + +This function may be used to provdie hard-wired fallbacks for the MIME types +and extensions that might not be present in the system MIME database. + +% TODO + +Please see the typetest sample for an example of using it. + \membersection{wxMimeTypesManager::GetFileTypeFromExtension}\label{wxmimetypesmanagergetfiletypefromextension} \func{wxFileType*}{GetFileTypeFromExtension}{\param{const wxString\&}{ extension}}