]> git.saurik.com Git - wxWidgets.git/blame - interface/wx/html/htmlfilt.h
Make storing non-trivial data in wxThreadSpecificInfo possible.
[wxWidgets.git] / interface / wx / html / htmlfilt.h
CommitLineData
23324ae1
FM
1/////////////////////////////////////////////////////////////////////////////
2// Name: html/htmlfilt.h
e54c96f1 3// Purpose: interface of wxHtmlFilter
23324ae1 4// Author: wxWidgets team
526954c5 5// Licence: wxWindows licence
23324ae1
FM
6/////////////////////////////////////////////////////////////////////////////
7
8/**
9 @class wxHtmlFilter
7c913512 10
23324ae1
FM
11 This class is the parent class of input filters for wxHtmlWindow.
12 It allows you to read and display files of different file formats.
7c913512 13
23324ae1 14 @library{wxhtml}
5bddd46d 15 @category{html}
7c913512 16
5bddd46d 17 @see @ref overview_html_filters
23324ae1
FM
18*/
19class wxHtmlFilter : public wxObject
20{
21public:
22 /**
23 Constructor.
24 */
25 wxHtmlFilter();
26
27 /**
28 Returns @true if this filter is capable of reading file @e file.
23324ae1 29 Example:
5bddd46d
FM
30 @code
31 bool MyFilter::CanRead(const wxFSFile& file)
32 {
33 return (file.GetMimeType() == "application/x-ugh");
34 }
35 @endcode
23324ae1 36 */
da1ed74c 37 virtual bool CanRead(const wxFSFile& file) const = 0;
23324ae1
FM
38
39 /**
40 Reads the file and returns string with HTML document.
23324ae1 41 Example:
5bddd46d
FM
42 @code
43 wxString MyImgFilter::ReadFile(const wxFSFile& file)
44 {
45 return "<html><body><img src=\"" + file.GetLocation() +
46 "\"></body></html>";
47 }
48 @endcode
23324ae1 49 */
da1ed74c 50 virtual wxString ReadFile(const wxFSFile& file) const = 0;
23324ae1 51};
e54c96f1 52