28 #include "wx/msw/wrapwin.h"
36 void
HtmlWindow::OnLinkClicked(const wxHtmlLinkInfo& link)
38 if (link.GetHref().StartsWith(_T(
"http://")))
39 wxLaunchDefaultBrowser(link.GetHref());
41 wxHtmlWindow::OnLinkClicked(link);
50 control->Create(m_parentAsWindow,
52 GetPosition(), GetSize(),
53 GetStyle(wxT(
"style"), wxHW_SCROLLBAR_AUTO),
56 if (HasParam(wxT(
"borders")))
58 control->SetBorders(GetDimension(wxT(
"borders")));
61 if (HasParam(wxT(
"url")))
63 wxString url = GetParamValue(wxT(
"url"));
64 wxFileSystem& fsys = GetCurFileSystem();
66 wxFSFile *f = fsys.OpenFile(url);
69 control->LoadPage(f->GetLocation());
73 control->LoadPage(url);
76 else if (HasParam(wxT(
"htmlcode")))
78 control->SetPage(GetText(wxT(
"htmlcode")));
89 return IsOfClass(node, wxT(
"HtmlWindow"));
IMPLEMENT_DYNAMIC_CLASS(wxTreeListHeaderWindow, wxWindow)
Modified wxHtmlWindow for open external links.
virtual bool CanHandle(wxXmlNode *node)
Internal use to identify right xml handler.
xrc handler for HTMLWindow
Definition of HTMLWindow class which supports opening external links in default web browser...