]>
Commit | Line | Data |
---|---|---|
5526e819 | 1 | ///////////////////////////////////////////////////////////////////////////// |
69941f05 | 2 | // Name: htmlfilt.h |
5526e819 VS |
3 | // Purpose: filters |
4 | // Author: Vaclav Slavik | |
69941f05 | 5 | // RCS-ID: $Id$ |
5526e819 VS |
6 | // Copyright: (c) 1999 Vaclav Slavik |
7 | // Licence: wxWindows Licence | |
8 | ///////////////////////////////////////////////////////////////////////////// | |
9 | ||
10 | ||
69941f05 VS |
11 | #ifndef _WX_HTMLFILT_H_ |
12 | #define _WX_HTMLFILT_H_ | |
5526e819 VS |
13 | |
14 | #ifdef __GNUG__ | |
69941f05 | 15 | #pragma interface |
5526e819 VS |
16 | #endif |
17 | ||
18 | #include "wx/defs.h" | |
4dcaf11a | 19 | |
5526e819 VS |
20 | #if wxUSE_HTML |
21 | ||
4dcaf11a | 22 | #include "wx/filesys.h" |
5526e819 VS |
23 | |
24 | ||
25 | //-------------------------------------------------------------------------------- | |
26 | // wxHtmlFilter | |
27 | // This class is input filter. It can "translate" files | |
28 | // in non-HTML format to HTML format | |
29 | // interface to access certain | |
30 | // kinds of files (HTPP, FTP, local, tar.gz etc..) | |
31 | //-------------------------------------------------------------------------------- | |
32 | ||
33 | class WXDLLEXPORT wxHtmlFilter : public wxObject | |
34 | { | |
35 | DECLARE_ABSTRACT_CLASS(wxHtmlFilter) | |
36 | ||
37 | public: | |
38 | wxHtmlFilter() : wxObject() {} | |
214b7e74 GD |
39 | #ifdef __WXMAC_X__ |
40 | virtual ~wxHtmlFilter() {} | |
41 | #endif | |
5526e819 | 42 | |
420ec58a | 43 | virtual bool CanRead(const wxFSFile& file) const = 0; |
5526e819 VS |
44 | // returns TRUE if this filter is able to open&read given file |
45 | ||
420ec58a | 46 | virtual wxString ReadFile(const wxFSFile& file) const = 0; |
5526e819 VS |
47 | // reads given file and returns HTML document. |
48 | // Returns empty string if opening failed | |
49 | }; | |
50 | ||
51 | ||
52 | ||
53 | //-------------------------------------------------------------------------------- | |
54 | // wxHtmlFilterPlainText | |
55 | // This filter is used as default filter if no other can | |
56 | // be used (= uknown type of file). It is used by | |
57 | // wxHtmlWindow itself. | |
58 | //-------------------------------------------------------------------------------- | |
59 | ||
60 | ||
61 | class WXDLLEXPORT wxHtmlFilterPlainText : public wxHtmlFilter | |
62 | { | |
63 | DECLARE_DYNAMIC_CLASS(wxHtmlFilterPlainText) | |
64 | ||
65 | public: | |
420ec58a VS |
66 | virtual bool CanRead(const wxFSFile& file) const; |
67 | virtual wxString ReadFile(const wxFSFile& file) const; | |
5526e819 VS |
68 | }; |
69 | ||
70 | ||
71 | ||
69941f05 VS |
72 | #endif |
73 | #endif // _WX_HTMLFILT_H_ | |
5526e819 | 74 |