]> git.saurik.com Git - wxWidgets.git/blame - include/wx/html/htmlfilter.h
Updated testconf, fixed mistake in install.
[wxWidgets.git] / include / wx / html / htmlfilter.h
CommitLineData
5526e819
VS
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
15#endif
16
17#include "wx/defs.h"
18#if wxUSE_HTML
19
20#include <wx/filesys.h>
21
22
23//--------------------------------------------------------------------------------
24// wxHtmlFilter
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//--------------------------------------------------------------------------------
30
31class WXDLLEXPORT wxHtmlFilter : public wxObject
32{
33 DECLARE_ABSTRACT_CLASS(wxHtmlFilter)
34
35 public:
36 wxHtmlFilter() : wxObject() {}
37
38 virtual bool CanRead(const wxFSFile& file) = 0;
39 // returns TRUE if this filter is able to open&read given file
40
41 virtual wxString ReadFile(const wxFSFile& file) = 0;
42 // reads given file and returns HTML document.
43 // Returns empty string if opening failed
44};
45
46
47
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//--------------------------------------------------------------------------------
54
55
56class WXDLLEXPORT wxHtmlFilterPlainText : public wxHtmlFilter
57{
58 DECLARE_DYNAMIC_CLASS(wxHtmlFilterPlainText)
59
60 public:
61 virtual bool CanRead(const wxFSFile& file);
62 virtual wxString ReadFile(const wxFSFile& file);
63};
64
65
66
67
68#endif // __HTMLFILTER_H__
69
70#endif