]> git.saurik.com Git - wxWidgets.git/blame - include/wx/html/htmlproc.h
Remove unused wxLocale::GetUntranslatedString().
[wxWidgets.git] / include / wx / html / htmlproc.h
CommitLineData
892aeafc 1/////////////////////////////////////////////////////////////////////////////
80fdcdb9 2// Name: wx/html/htmlprep.h
892aeafc
VS
3// Purpose: HTML processor
4// Author: Vaclav Slavik
892aeafc 5// Copyright: (c) 2001 Vaclav Slavik
65571936 6// Licence: wxWindows licence
892aeafc
VS
7/////////////////////////////////////////////////////////////////////////////
8
892aeafc
VS
9#ifndef _WX_HTMLPREP_H_
10#define _WX_HTMLPREP_H_
11
892aeafc
VS
12#include "wx/defs.h"
13
14#if wxUSE_HTML
15
16#include "wx/string.h"
17
18// Priority of preprocessor in the chain. The higher, the earlier it is used
19enum
20{
21 wxHTML_PRIORITY_DONTCARE = 128, // if the order doesn't matter, use this
22 // priority
23 wxHTML_PRIORITY_SYSTEM = 256 // >=256 is only for wxHTML's internals
24};
25
6953da00 26// Classes derived from this class serve as simple text processors for
892aeafc
VS
27// wxHtmlWindow. wxHtmlWindow runs HTML markup through all registered
28// processors before displaying it, thus allowing for on-the-fly
29// modifications of the markup.
30
6acba9a7 31class WXDLLIMPEXP_HTML wxHtmlProcessor : public wxObject
892aeafc
VS
32{
33 DECLARE_ABSTRACT_CLASS(wxHtmlProcessor)
34
35public:
6953da00 36 wxHtmlProcessor() : wxObject(), m_enabled(true) {}
892aeafc
VS
37 virtual ~wxHtmlProcessor() {}
38
39 // Process input text and return processed result
40 virtual wxString Process(const wxString& text) const = 0;
41
42 // Return priority value of this processor. The higher, the sooner
43 // is the processor applied to the text.
44 virtual int GetPriority() const { return wxHTML_PRIORITY_DONTCARE; }
6953da00
WS
45
46 // Enable/disable the processor. wxHtmlWindow won't use a disabled
960ba969 47 // processor even if it is in its processors queue.
6953da00 48 virtual void Enable(bool enable = true) { m_enabled = enable; }
960ba969 49 bool IsEnabled() const { return m_enabled; }
6953da00 50
960ba969
VS
51protected:
52 bool m_enabled;
892aeafc
VS
53};
54
55#endif // wxUSE_HTML
56
57#endif // _WX_HTMLPROC_H_