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