.. wxPython Phoenix documentation
This file was generated by Phoenix's sphinx generator and associated
tools, do not edit by hand.
Copyright: (c) 2011-2020 by Total Control Software
License: wxWindows License
.. include:: headings.inc
.. _wx.html.HtmlFilter:
==========================================================================================================================================
|phoenix_title| **wx.html.HtmlFilter**
==========================================================================================================================================
This class is the parent class of input filters for :ref:`wx.html.HtmlWindow`.
It allows you to read and display files of different file formats.
.. seealso:: :ref:`Input Filters `
|
|class_hierarchy| Class Hierarchy
=================================
.. raw:: html
Inheritance diagram for class HtmlFilter:
|
|method_summary| Methods Summary
================================
================================================================================ ================================================================================
:meth:`~wx.html.HtmlFilter.__init__` Constructor.
:meth:`~wx.html.HtmlFilter.CanRead` Returns ``True`` if this filter is capable of reading file `file`.
:meth:`~wx.html.HtmlFilter.ReadFile` Reads the file and returns string with HTML document.
================================================================================ ================================================================================
|
|api| Class API
===============
.. class:: wx.html.HtmlFilter(Object)
**Possible constructors**::
HtmlFilter() -> None
This class is the parent class of input filters for HtmlWindow.
.. method:: __init__(self)
Constructor.
:rtype: `None`
.. method:: CanRead(self, file : FSFile)
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")
:param `file`:
:type `file`: wx.FSFile
:rtype: `bool`
.. method:: ReadFile(self, file : FSFile)
Reads the file and returns string with HTML document.
Example: ::
def ReadFile(file):
# file is a wx.FSFile in this case...
return ""
:param `file`:
:type `file`: wx.FSFile
:rtype: `str`