implemented URLs blocking in wxHtmlWindow

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13666 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2002-01-19 23:23:15 +00:00
parent 957686c882
commit 04db5c3f8f
6 changed files with 35 additions and 16 deletions

View File

@@ -40,7 +40,7 @@
wxList wxHtmlWinParser::m_Modules;
wxHtmlWinParser::wxHtmlWinParser(wxWindow *wnd) : wxHtmlParser()
wxHtmlWinParser::wxHtmlWinParser(wxHtmlWindow *wnd) : wxHtmlParser()
{
m_tmpStrBuf = NULL;
m_tmpStrBufSize = 0;
@@ -84,7 +84,6 @@ wxHtmlWinParser::wxHtmlWinParser(wxWindow *wnd) : wxHtmlParser()
}
}
wxHtmlWinParser::~wxHtmlWinParser()
{
int i, j, k, l, m;
@@ -102,21 +101,16 @@ wxHtmlWinParser::~wxHtmlWinParser()
delete[] m_tmpStrBuf;
}
void wxHtmlWinParser::AddModule(wxHtmlTagsModule *module)
{
m_Modules.Append(module);
}
void wxHtmlWinParser::RemoveModule(wxHtmlTagsModule *module)
{
m_Modules.DeleteObject(module);
}
void wxHtmlWinParser::SetFonts(wxString normal_face, wxString fixed_face, const int *sizes)
{
int i, j, k, l, m;
@@ -140,8 +134,6 @@ void wxHtmlWinParser::SetFonts(wxString normal_face, wxString fixed_face, const
}
}
void wxHtmlWinParser::InitParser(const wxString& source)
{
wxHtmlParser::InitParser(source);
@@ -169,8 +161,6 @@ void wxHtmlWinParser::InitParser(const wxString& source)
m_Container->InsertCell(new wxHtmlFontCell(CreateCurrentFont()));
}
void wxHtmlWinParser::DoneParser()
{
m_Container = NULL;
@@ -178,8 +168,6 @@ void wxHtmlWinParser::DoneParser()
wxHtmlParser::DoneParser();
}
wxObject* wxHtmlWinParser::GetProduct()
{
wxHtmlContainerCell *top;
@@ -192,6 +180,15 @@ wxObject* wxHtmlWinParser::GetProduct()
return top;
}
bool wxHtmlWinParser::CanOpenURL(const wxString& url) const
{
// FIXME - normalize the URL to full path before passing to
// OnOpeningURL!!
if ( m_Window )
return m_Window->OnOpeningURL(url);
else
return TRUE;
}
void wxHtmlWinParser::AddText(const wxChar* txt)
{