# wxHtmlFilter Class Reference
[HTML]

`#include <wx/html/htmlfilt.h>`

Inheritance diagram for wxHtmlFilter:
[legend]

## Detailed Description

This class is the parent class of input filters for wxHtmlWindow.

It allows you to read and display files of different file formats.

##

Library: wxHTML

Category: HTML

See also:
  Input Filters

## 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.

List of all members.

## Constructor & Destructor Documentation

wxHtmlFilter::wxHtmlFilter | ( |  | ) |

Constructor.

## Member Function Documentation

virtual bool wxHtmlFilter::CanRead | ( | const wxFSFile & | file | ) | const`[pure virtual]`

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

Example:

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

virtual wxString wxHtmlFilter::ReadFile | ( | const wxFSFile & | file | ) | const`[pure virtual]`

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>";
            }

|  | [ top ]