Program: bbtk
Module: $RCSfile: bbtkWxGUIHtmlBrowser.cxx,v $
Language: C++
- Date: $Date: 2008/03/20 15:27:57 $
- Version: $Revision: 1.2 $
+ Date: $Date: 2008/03/21 14:59:39 $
+ Version: $Revision: 1.3 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
//========================================================================
- WxGUIHtmlBrowser::WxGUIHtmlBrowser ( wxWindow *parent, wxSize size )
+ WxGUIHtmlBrowser::WxGUIHtmlBrowser ( wxWindow *parent, wxSize size,
+ WxGUIHtmlBrowserUser* user)
:
- wxPanel ( parent, -1, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL)
- // , mWxGUIConsole(0)
+ wxPanel ( parent, -1, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL),
+ mUser(user)
{
wxPanel* panel = this;
//========================================================================
void WxGUIHtmlBrowser::OnLinkClicked(wxHtmlLinkEvent& e)
- {
- mwxHtmlWindow->LoadPage( e.GetLinkInfo().GetHref() );
+ {
+ std::cout << "BrOnLink"<<std::endl;
+
+ bool go = true;
+ if (mUser)
+ {
+ wxString file = wxPathOnly(mwxURL->GetValue());
+ file += std2wx(ConfigurationFile::GetInstance().Get_file_separator());
+ file += e.GetLinkInfo().GetHref();
+ go = mUser->WxGUIHtmlBrowserUserOnLinkClicked( wx2std( file ) );
+ }
+ if (go)
+ {
+ mwxHtmlWindow->LoadPage( e.GetLinkInfo().GetHref() );
UpdateURL();
- mwxHtmlWindow->LoadPage( mwxURL->GetValue() );
- }
+ }
+ // mwxHtmlWindow->LoadPage( mwxURL->GetValue() );
+ }
//========================================================================