wxHtmlFilter::wxHtmlFilter
wxHtmlFilter::CanRead
wxHtmlFilter::ReadFile
wxHtmlFilter
Contents Up Previous Next

wxHtmlFilter

This class is an input filter for wxHtmlWindow. It allows you to read and display files of different file formats.

Derived from

wxObject

Include files

<wx/html/htmlfilt.h>

See Also

Overview

Members


wxHtmlFilter::wxHtmlFilter

wxHtmlFilter()

Constructor.


wxHtmlFilter::CanRead

bool CanRead(const wxFSFile& file)

Returns true if this filter is capable of reading file file.

Example:

bool MyFilter::CanRead(const wxFSFile& file)
{
    return (file.GetMimeType() == "application/x-ugh");
}

wxHtmlFilter::ReadFile

wxString ReadFile(const wxFSFile& file)

Reads the file and returns string with HTML document.

Example:

wxString MyImgFilter::ReadFile(const wxFSFile& file)
{
    return "<html><body><img src=\"" +
           file.GetLocation() +
	   "\"></body></html>";
}