wxRuby Documentation Home

# Wx::HtmlFilter

This class is the parent class of input filters for HtmlWindow.
It allows you to read and display files of different file formats.

## Derived from

Object

## See Also

Overview

## Methods

- HtmlFilter.new
- HtmlFilter#can_read
- HtmlFilter#read_file

### HtmlFilter.new

### HtmlFilter#can_read

Boolean can_read(%(arg-type)FSFile% file)

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

Example:

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

### HtmlFilter#read_file

String read_file(%(arg-type)FSFile% file)

Reads the file and returns string with HTML document.

Example:

String MyImgFilter::ReadFile(const FSFile& file) { return “
”" + file.GetLocation() + “\”>
"; }

[This page automatically generated from the Textile source at 2023-06-09 00:45:26 +0000]