]> git.saurik.com Git - wxWidgets.git/blob - include/wx/html/htmlfilter.h
Did somework on the generic dialogs,
[wxWidgets.git] / include / wx / html / htmlfilter.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: htmlfilter.h
3 // Purpose: filters
4 // Author: Vaclav Slavik
5 // Copyright: (c) 1999 Vaclav Slavik
6 // Licence: wxWindows Licence
7 /////////////////////////////////////////////////////////////////////////////
8
9
10 #ifndef __HTMLFILTER_H__
11 #define __HTMLFILTER_H__
12
13 #ifdef __GNUG__
14 #pragma interface "htmlfilter.h"
15 #endif
16
17 #include "wx/defs.h"
18
19 #if wxUSE_HTML
20
21 #include "wx/filesys.h"
22
23
24 //--------------------------------------------------------------------------------
25 // wxHtmlFilter
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 //--------------------------------------------------------------------------------
31
32 class WXDLLEXPORT wxHtmlFilter : public wxObject
33 {
34 DECLARE_ABSTRACT_CLASS(wxHtmlFilter)
35
36 public:
37 wxHtmlFilter() : wxObject() {}
38
39 virtual bool CanRead(const wxFSFile& file) const = 0;
40 // returns TRUE if this filter is able to open&read given file
41
42 virtual wxString ReadFile(const wxFSFile& file) const = 0;
43 // reads given file and returns HTML document.
44 // Returns empty string if opening failed
45 };
46
47
48
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 //--------------------------------------------------------------------------------
55
56
57 class WXDLLEXPORT wxHtmlFilterPlainText : public wxHtmlFilter
58 {
59 DECLARE_DYNAMIC_CLASS(wxHtmlFilterPlainText)
60
61 public:
62 virtual bool CanRead(const wxFSFile& file) const;
63 virtual wxString ReadFile(const wxFSFile& file) const;
64 };
65
66
67
68
69 #endif // __HTMLFILTER_H__
70
71 #endif