Phoenix Logo

phoenix_title wx.html.HtmlFilter

This class is the parent class of input filters for wx.html.HtmlWindow.

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

See also

Input Filters


class_hierarchy Class Hierarchy

Inheritance diagram for class HtmlFilter:


method_summary Methods Summary

__init__ Constructor.
CanRead Returns True if this filter is capable of reading file file.
ReadFile Reads the file and returns string with HTML document.

api Class API



class wx.html.HtmlFilter(Object)

Possible constructors:

HtmlFilter()

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


Methods



__init__(self)

Constructor.



CanRead(self, file)

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

Example:

def CanRead(file):

    # file is a wx.FSFile in this case...
    return (file.GetMimeType() == "application/x-ugh")
Parameters:file (wx.FSFile) –
Return type:bool


ReadFile(self, file)

Reads the file and returns string with HTML document.

Example:

def ReadFile(file):

    # file is a wx.FSFile in this case...
    return "<html><body><img src=\"" + file.GetLocation() + \
           "\"></body></html>"
Parameters:file (wx.FSFile) –
Return type:string