]> git.saurik.com Git - wxWidgets.git/blame - include/wx/html/htmlfilt.h
Comment-only update
[wxWidgets.git] / include / wx / html / htmlfilt.h
CommitLineData
5526e819 1/////////////////////////////////////////////////////////////////////////////
80fdcdb9 2// Name: wx/html/htmlfilt.h
5526e819
VS
3// Purpose: filters
4// Author: Vaclav Slavik
5// Copyright: (c) 1999 Vaclav Slavik
65571936 6// Licence: wxWindows licence
5526e819
VS
7/////////////////////////////////////////////////////////////////////////////
8
69941f05
VS
9#ifndef _WX_HTMLFILT_H_
10#define _WX_HTMLFILT_H_
5526e819 11
5526e819 12#include "wx/defs.h"
4dcaf11a 13
5526e819
VS
14#if wxUSE_HTML
15
4dcaf11a 16#include "wx/filesys.h"
5526e819
VS
17
18
19//--------------------------------------------------------------------------------
20// wxHtmlFilter
21// This class is input filter. It can "translate" files
22// in non-HTML format to HTML format
23// interface to access certain
24// kinds of files (HTPP, FTP, local, tar.gz etc..)
25//--------------------------------------------------------------------------------
26
6acba9a7 27class WXDLLIMPEXP_HTML wxHtmlFilter : public wxObject
5526e819
VS
28{
29 DECLARE_ABSTRACT_CLASS(wxHtmlFilter)
30
dad9554b
VS
31public:
32 wxHtmlFilter() : wxObject() {}
33 virtual ~wxHtmlFilter() {}
5526e819 34
6953da00 35 // returns true if this filter is able to open&read given file
dad9554b 36 virtual bool CanRead(const wxFSFile& file) const = 0;
5526e819 37
dad9554b
VS
38 // Reads given file and returns HTML document.
39 // Returns empty string if opening failed
40 virtual wxString ReadFile(const wxFSFile& file) const = 0;
5526e819
VS
41};
42
43
44
45//--------------------------------------------------------------------------------
46// wxHtmlFilterPlainText
47// This filter is used as default filter if no other can
48// be used (= uknown type of file). It is used by
49// wxHtmlWindow itself.
50//--------------------------------------------------------------------------------
51
52
6acba9a7 53class WXDLLIMPEXP_HTML wxHtmlFilterPlainText : public wxHtmlFilter
5526e819
VS
54{
55 DECLARE_DYNAMIC_CLASS(wxHtmlFilterPlainText)
56
dad9554b
VS
57public:
58 virtual bool CanRead(const wxFSFile& file) const;
59 virtual wxString ReadFile(const wxFSFile& file) const;
5526e819
VS
60};
61
2b5f62a0
VZ
62//--------------------------------------------------------------------------------
63// wxHtmlFilterHTML
64// filter for text/html
65//--------------------------------------------------------------------------------
66
67class wxHtmlFilterHTML : public wxHtmlFilter
68{
69 DECLARE_DYNAMIC_CLASS(wxHtmlFilterHTML)
70
71 public:
72 virtual bool CanRead(const wxFSFile& file) const;
73 virtual wxString ReadFile(const wxFSFile& file) const;
74};
75
5526e819
VS
76
77
dad9554b
VS
78#endif // wxUSE_HTML
79
69941f05 80#endif // _WX_HTMLFILT_H_
5526e819 81