1 /////////////////////////////////////////////////////////////////////////////
4 // Author: Vaclav Slavik
5 // Copyright: (c) 1999 Vaclav Slavik
6 // Licence: wxWindows Licence
7 /////////////////////////////////////////////////////////////////////////////
10 #ifndef __HTMLFILTER_H__
11 #define __HTMLFILTER_H__
20 #include <wx/filesys.h>
23 //--------------------------------------------------------------------------------
25 // This class is input filter. It can "translate" files
26 // in non-HTML format to HTML format
27 // interface to access certain
28 // kinds of files (HTPP, FTP, local, tar.gz etc..)
29 //--------------------------------------------------------------------------------
31 class WXDLLEXPORT wxHtmlFilter
: public wxObject
33 DECLARE_ABSTRACT_CLASS(wxHtmlFilter
)
36 wxHtmlFilter() : wxObject() {}
38 virtual bool CanRead(const wxFSFile
& file
) = 0;
39 // returns TRUE if this filter is able to open&read given file
41 virtual wxString
ReadFile(const wxFSFile
& file
) = 0;
42 // reads given file and returns HTML document.
43 // Returns empty string if opening failed
48 //--------------------------------------------------------------------------------
49 // wxHtmlFilterPlainText
50 // This filter is used as default filter if no other can
51 // be used (= uknown type of file). It is used by
52 // wxHtmlWindow itself.
53 //--------------------------------------------------------------------------------
56 class WXDLLEXPORT wxHtmlFilterPlainText
: public wxHtmlFilter
58 DECLARE_DYNAMIC_CLASS(wxHtmlFilterPlainText
)
61 virtual bool CanRead(const wxFSFile
& file
);
62 virtual wxString
ReadFile(const wxFSFile
& file
);
68 #endif // __HTMLFILTER_H__