1 /*=========================================================================
4 Module: $RCSfile: bbtkWxGUIHtmlBrowser.h,v $
6 Date: $Date: 2008/03/21 18:31:57 $
7 Version: $Revision: 1.3 $
9 Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
10 l'Image). All rights reserved. See Doc/License.txt or
11 http://www.creatis.insa-lyon.fr/Public/bbtk/License.html for details.
13 This software is distributed WITHOUT ANY WARRANTY; without even
14 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 PURPOSE. See the above copyright notices for more information.
17 =========================================================================*//**
18 * \brief Short description in one line
20 * Long description which
21 * can span multiple lines
32 #ifdef _USE_WXWIDGETS_
35 #ifndef __bbtkWxGUIHtmlBrowser_h_INCLUDED__
36 #define __bbtkWxGUIHtmlBrowser_h_INCLUDED__
39 #include <wx/html/htmlwin.h>
44 class WxGUIHtmlBrowser;
46 class WxHtmlWindow : public virtual wxHtmlWindow
49 WxHtmlWindow( wxWindow *parent, int id, WxGUIHtmlBrowser* browser, wxSize size)
50 : wxHtmlWindow(parent, id,
54 _T("bbtk::WxGUIHtmlBrowser")),
59 // wxHtmlOpeningStatus OnOpeningURL(wxHtmlURLType type,const wxString& url, wxString *redirect);
60 //EED virtual void OnLinkClicked(const wxHtmlLinkInfo& link);
63 WxGUIHtmlBrowser* mBrowser;
69 /// Abstract class which defines the callbacks invoked by WxGUIHtmlBrowser
70 class WxGUIHtmlBrowserUser
73 WxGUIHtmlBrowserUser() {}
74 ~WxGUIHtmlBrowserUser() {}
76 virtual bool WxGUIHtmlBrowserUserOnLinkClicked(const std::string& target)
82 // class WxGUIConsole;
85 class BBTK_EXPORT WxGUIHtmlBrowser : public wxPanel
88 WxGUIHtmlBrowser ( wxWindow *parent, wxSize size,
89 WxGUIHtmlBrowserUser* = 0 );
91 bool GoTo(std::string&);
94 void OnBackButton(wxCommandEvent& );
95 void OnForwardButton(wxCommandEvent& );
96 void OnHomeButton(wxCommandEvent& );
97 void OnReloadButton(wxCommandEvent& );
98 // void OnRunButton(wxCommandEvent& );
99 void OnLinkClicked(wxHtmlLinkEvent& );
100 void OnURLEnter( wxCommandEvent&);
102 // void OnCell(wxHtmlCellEvent& );
104 void SetSize( wxSize );
106 std::string GetCurrentPage();
109 WxHtmlWindow* mwxHtmlWindow;
111 wxButton* mwxBackButton;
112 wxButton* mwxForwardButton;
113 wxButton* mwxHomeButton;
114 wxButton* mwxReloadButton;
115 // wxButton* mwxRunButton;
117 WxGUIHtmlBrowserUser* mUser;
119 // any class wishing to process wxWidgets events must use this macro
120 DECLARE_EVENT_TABLE()