]>
git.saurik.com Git - wxWidgets.git/blob - interface/wx/html/htmlfilt.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: html/htmlfilt.h
3 // Purpose: interface of wxHtmlFilter
4 // Author: wxWidgets team
5 // Licence: wxWindows licence
6 /////////////////////////////////////////////////////////////////////////////
11 This class is the parent class of input filters for wxHtmlWindow.
12 It allows you to read and display files of different file formats.
17 @see @ref overview_html_filters
19 class wxHtmlFilter
: public wxObject
28 Returns @true if this filter is capable of reading file @e file.
31 bool MyFilter::CanRead(const wxFSFile& file)
33 return (file.GetMimeType() == "application/x-ugh");
37 virtual bool CanRead(const wxFSFile
& file
) const = 0;
40 Reads the file and returns string with HTML document.
43 wxString MyImgFilter::ReadFile(const wxFSFile& file)
45 return "<html><body><img src=\"" + file.GetLocation() +
50 virtual wxString
ReadFile(const wxFSFile
& file
) const = 0;