2008-03-08 08:52:38 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: html/htmlfilt.h
|
2008-03-10 11:24:38 -04:00
|
|
|
// Purpose: interface of wxHtmlFilter
|
2008-03-08 08:52:38 -05:00
|
|
|
// Author: wxWidgets team
|
2010-07-13 09:29:13 -04:00
|
|
|
// Licence: wxWindows licence
|
2008-03-08 08:52:38 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
/**
|
|
|
|
@class wxHtmlFilter
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-03-08 08:52:38 -05: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 09:43:31 -05:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
@library{wxhtml}
|
2008-10-25 16:44:52 -04:00
|
|
|
@category{html}
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-10-25 16:44:52 -04:00
|
|
|
@see @ref overview_html_filters
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
|
|
|
class wxHtmlFilter : public wxObject
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
/**
|
|
|
|
Constructor.
|
|
|
|
*/
|
|
|
|
wxHtmlFilter();
|
|
|
|
|
|
|
|
/**
|
|
|
|
Returns @true if this filter is capable of reading file @e file.
|
|
|
|
Example:
|
2008-10-25 16:44:52 -04:00
|
|
|
@code
|
|
|
|
bool MyFilter::CanRead(const wxFSFile& file)
|
|
|
|
{
|
|
|
|
return (file.GetMimeType() == "application/x-ugh");
|
|
|
|
}
|
|
|
|
@endcode
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
2008-10-13 09:24:43 -04:00
|
|
|
virtual bool CanRead(const wxFSFile& file) const = 0;
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
Reads the file and returns string with HTML document.
|
|
|
|
Example:
|
2008-10-25 16:44:52 -04:00
|
|
|
@code
|
|
|
|
wxString MyImgFilter::ReadFile(const wxFSFile& file)
|
|
|
|
{
|
|
|
|
return "<html><body><img src=\"" + file.GetLocation() +
|
|
|
|
"\"></body></html>";
|
|
|
|
}
|
|
|
|
@endcode
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
2008-10-13 09:24:43 -04:00
|
|
|
virtual wxString ReadFile(const wxFSFile& file) const = 0;
|
2008-03-08 08:52:38 -05:00
|
|
|
};
|
2008-03-10 11:24:38 -04:00
|
|
|
|