#include </home/zeitlin/src/wx/github/interface/wx/html/htmlfilt.h>
This class is the parent class of input filters for wxHtmlWindow.
It allows you to read and display files of different file formats.
Public Member Functions | |
wxHtmlFilter () | |
Constructor. | |
virtual bool | CanRead (const wxFSFile &file) const =0 |
Returns true if this filter is capable of reading file file. | |
virtual wxString | ReadFile (const wxFSFile &file) const =0 |
Reads the file and returns string with HTML document. |
wxHtmlFilter::wxHtmlFilter | ( | ) |
Constructor.
virtual bool wxHtmlFilter::CanRead | ( | const wxFSFile & | file | ) | const [pure virtual] |
Returns true if this filter is capable of reading file file.
例:
bool MyFilter::CanRead(const wxFSFile& file) { return (file.GetMimeType() == "application/x-ugh"); }
Reads the file and returns string with HTML document.
例:
wxString MyImgFilter::ReadFile(const wxFSFile& file) { return "<html><body><img src=\"" + file.GetLocation() + "\"></body></html>"; }