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(
"style", wxHW_SCROLLBAR_AUTO),
56 if (HasParam(
"borders"))
58 control->SetBorders(GetDimension(
"borders"));
63 wxString url = GetParamValue(
"url");
64 wxFileSystem& fsys = GetCurFileSystem();
66 wxFSFile *f = fsys.OpenFile(url);
69 control->LoadPage(f->GetLocation());
73 control->LoadPage(url);
76 else if (HasParam(
"htmlcode"))
78 control->SetPage(GetText(
"htmlcode"));
89 return IsOfClass(node,
"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...