2008-03-08 13:52:38 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: html/htmlfilt.h
|
2008-03-10 15:24:38 +00:00
|
|
|
// Purpose: interface of wxHtmlFilter
|
2008-03-08 13:52:38 +00:00
|
|
|
// Author: wxWidgets team
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Licence: wxWindows license
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
/**
|
|
|
|
@class wxHtmlFilter
|
2008-03-08 14:43:31 +00:00
|
|
|
|
2008-03-08 13:52:38 +00:00
|
|
|
This class is the parent class of input filters for wxHtmlWindow.
|
|
|
|
It allows you to read and display files of different file formats.
|
2008-03-08 14:43:31 +00:00
|
|
|
|
2008-03-08 13:52:38 +00:00
|
|
|
@library{wxhtml}
|
2008-10-25 20:44:52 +00:00
|
|
|
@category{html}
|
2008-03-08 14:43:31 +00:00
|
|
|
|
2008-10-25 20:44:52 +00:00
|
|
|
@see @ref overview_html_filters
|
2008-03-08 13:52:38 +00:00
|
|
|
*/
|
|
|
|
class wxHtmlFilter : public wxObject
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
/**
|
|
|
|
Constructor.
|
|
|
|
*/
|
|
|
|
wxHtmlFilter();
|
|
|
|
|
|
|
|
/**
|
|
|
|
Returns @true if this filter is capable of reading file @e file.
|
|
|
|
Example:
|
2008-10-25 20:44:52 +00:00
|
|
|
@code
|
|
|
|
bool MyFilter::CanRead(const wxFSFile& file)
|
|
|
|
{
|
|
|
|
return (file.GetMimeType() == "application/x-ugh");
|
|
|
|
}
|
|
|
|
@endcode
|
2008-03-08 13:52:38 +00:00
|
|
|
*/
|
2008-10-13 13:24:43 +00:00
|
|
|
virtual bool CanRead(const wxFSFile& file) const = 0;
|
2008-03-08 13:52:38 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
Reads the file and returns string with HTML document.
|
|
|
|
Example:
|
2008-10-25 20:44:52 +00:00
|
|
|
@code
|
|
|
|
wxString MyImgFilter::ReadFile(const wxFSFile& file)
|
|
|
|
{
|
|
|
|
return "<html><body><img src=\"" + file.GetLocation() +
|
|
|
|
"\"></body></html>";
|
|
|
|
}
|
|
|
|
@endcode
|
2008-03-08 13:52:38 +00:00
|
|
|
*/
|
2008-10-13 13:24:43 +00:00
|
|
|
virtual wxString ReadFile(const wxFSFile& file) const = 0;
|
2008-03-08 13:52:38 +00:00
|
|
|
};
|
2008-03-10 15:24:38 +00:00
|
|
|
|