From 047ea2e26ab5fb33a8ac3d0414d83e3b3a0aa47c Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Wed, 24 Apr 2013 02:40:02 +0000 Subject: [PATCH] Add GetParser methods for the tag handlers git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73839 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/html/htmlpars.h | 3 +++ include/wx/html/winpars.h | 1 + interface/wx/html/htmlpars.h | 8 +++++++- interface/wx/html/winpars.h | 12 ++++++++++++ 4 files changed, 23 insertions(+), 1 deletion(-) diff --git a/include/wx/html/htmlpars.h b/include/wx/html/htmlpars.h index 045060a4ea..d34d1a1a89 100644 --- a/include/wx/html/htmlpars.h +++ b/include/wx/html/htmlpars.h @@ -228,6 +228,9 @@ public: virtual void SetParser(wxHtmlParser *parser) { m_Parser = parser; } + virtual wxHtmlParser* GetParser() const + { return m_Parser; } + // Returns list of supported tags. The list is in uppercase and // tags are delimited by ','. // Example : "I,B,FONT,P" diff --git a/include/wx/html/winpars.h b/include/wx/html/winpars.h index 3347e4e369..562a9dd37d 100644 --- a/include/wx/html/winpars.h +++ b/include/wx/html/winpars.h @@ -269,6 +269,7 @@ public: wxHtmlWinTagHandler() : wxHtmlTagHandler() {} virtual void SetParser(wxHtmlParser *parser) {wxHtmlTagHandler::SetParser(parser); m_WParser = (wxHtmlWinParser*) parser;} + virtual wxHtmlWinParser* GetParser() const { return (wxHtmlWinParser*)m_Parser; } protected: wxHtmlWinParser *m_WParser; // same as m_Parser, but overcasted diff --git a/interface/wx/html/htmlpars.h b/interface/wx/html/htmlpars.h index 1fad764ba9..0bdd74f285 100644 --- a/interface/wx/html/htmlpars.h +++ b/interface/wx/html/htmlpars.h @@ -66,10 +66,16 @@ public: /** Assigns @a parser to this handler. Each @b instance of handler - is guaranteed to be called only from the parser. + is guaranteed to be called only from the one parser. */ virtual void SetParser(wxHtmlParser* parser); + /** + Returns the parser associated with this tag handler. + */ + virtual wxHtmlParser* GetParser() const; + + protected: /** diff --git a/interface/wx/html/winpars.h b/interface/wx/html/winpars.h index 36cc0cf97b..01ef3585bc 100644 --- a/interface/wx/html/winpars.h +++ b/interface/wx/html/winpars.h @@ -50,6 +50,18 @@ public: */ class wxHtmlWinTagHandler : public wxHtmlTagHandler { +public: + /** + Assigns @a parser to this handler. Each @b instance of handler + is guaranteed to be called only from the one parser. + */ + virtual void SetParser(wxHtmlWinParser* parser); + + /** + Returns the parser associated with this tag handler. + */ + virtual wxHtmlWinParser* GetParser() const; + protected: /** Value of this attribute is identical to value of m_Parser. -- 2.45.2