1 /////////////////////////////////////////////////////////////////////////////
4 // Author: Vaclav Slavik
5 // Copyright: (c) 1999 Vaclav Slavik
6 // Licence: wxWindows Licence
7 /////////////////////////////////////////////////////////////////////////////
10 #ifndef __HTMLFILTER_H__
11 #define __HTMLFILTER_H__
14 #pragma interface "htmlfilter.h"
21 #include "wx/filesys.h"
24 //--------------------------------------------------------------------------------
26 // This class is input filter. It can "translate" files
27 // in non-HTML format to HTML format
28 // interface to access certain
29 // kinds of files (HTPP, FTP, local, tar.gz etc..)
30 //--------------------------------------------------------------------------------
32 class WXDLLEXPORT wxHtmlFilter
: public wxObject
34 DECLARE_ABSTRACT_CLASS(wxHtmlFilter
)
37 wxHtmlFilter() : wxObject() {}
39 virtual bool CanRead(const wxFSFile
& file
) const = 0;
40 // returns TRUE if this filter is able to open&read given file
42 virtual wxString
ReadFile(const wxFSFile
& file
) const = 0;
43 // reads given file and returns HTML document.
44 // Returns empty string if opening failed
49 //--------------------------------------------------------------------------------
50 // wxHtmlFilterPlainText
51 // This filter is used as default filter if no other can
52 // be used (= uknown type of file). It is used by
53 // wxHtmlWindow itself.
54 //--------------------------------------------------------------------------------
57 class WXDLLEXPORT wxHtmlFilterPlainText
: public wxHtmlFilter
59 DECLARE_DYNAMIC_CLASS(wxHtmlFilterPlainText
)
62 virtual bool CanRead(const wxFSFile
& file
) const;
63 virtual wxString
ReadFile(const wxFSFile
& file
) const;
69 #endif // __HTMLFILTER_H__