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