added ParseInnerSource() to make <pre>-like parsing easier
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38535 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -432,12 +432,27 @@ bool wxHtmlParser::RestoreState()
|
||||
return true;
|
||||
}
|
||||
|
||||
wxString wxHtmlParser::GetInnerSource(const wxHtmlTag& tag)
|
||||
{
|
||||
return GetSource()->Mid(tag.GetBeginPos(),
|
||||
tag.GetEndPos1() - tag.GetBeginPos());
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxHtmlTagHandler
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
IMPLEMENT_ABSTRACT_CLASS(wxHtmlTagHandler,wxObject)
|
||||
|
||||
void wxHtmlTagHandler::ParseInnerSource(const wxString& source)
|
||||
{
|
||||
// It is safe to temporarily change the source being parsed,
|
||||
// provided we restore the state back after parsing
|
||||
m_Parser->SetSourceAndSaveState(source);
|
||||
m_Parser->DoParsing();
|
||||
m_Parser->RestoreState();
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxHtmlEntitiesParser
|
||||
|
||||
Reference in New Issue
Block a user