]> git.saurik.com Git - wxWidgets.git/blob - interface/wx/html/htmlfilt.h
Move code removing "-psn_xxx" command line arguments to common code.
[wxWidgets.git] / interface / wx / html / htmlfilt.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: html/htmlfilt.h
3 // Purpose: interface of wxHtmlFilter
4 // Author: wxWidgets team
5 // Licence: wxWindows licence
6 /////////////////////////////////////////////////////////////////////////////
7
8 /**
9 @class wxHtmlFilter
10
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.
13
14 @library{wxhtml}
15 @category{html}
16
17 @see @ref overview_html_filters
18 */
19 class wxHtmlFilter : public wxObject
20 {
21 public:
22 /**
23 Constructor.
24 */
25 wxHtmlFilter();
26
27 /**
28 Returns @true if this filter is capable of reading file @e file.
29 Example:
30 @code
31 bool MyFilter::CanRead(const wxFSFile& file)
32 {
33 return (file.GetMimeType() == "application/x-ugh");
34 }
35 @endcode
36 */
37 virtual bool CanRead(const wxFSFile& file) const = 0;
38
39 /**
40 Reads the file and returns string with HTML document.
41 Example:
42 @code
43 wxString MyImgFilter::ReadFile(const wxFSFile& file)
44 {
45 return "<html><body><img src=\"" + file.GetLocation() +
46 "\"></body></html>";
47 }
48 @endcode
49 */
50 virtual wxString ReadFile(const wxFSFile& file) const = 0;
51 };
52