]> git.saurik.com Git - wxWidgets.git/blame_incremental - interface/wx/html/htmlfilt.h
wxMessageBox off the main thread lost result code.
[wxWidgets.git] / interface / wx / html / htmlfilt.h
... / ...
CommitLineData
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*/
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.
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