1 /*=========================================================================
4 Module: $RCSfile: bbtkWxGUIHtmlBrowser.h,v $
6 Date: $Date: 2008/03/20 09:51:29 $
7 Version: $Revision: 1.1 $
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() {}
79 // class WxGUIConsole;
82 class WxGUIHtmlBrowser : public wxPanel
85 WxGUIHtmlBrowser ( wxWindow *parent, wxSize size );
86 // WxGUIHtmlBrowserUser* = 0 );
88 bool GoTo(std::string&);
91 void OnBackButton(wxCommandEvent& );
92 void OnForwardButton(wxCommandEvent& );
93 void OnHomeButton(wxCommandEvent& );
94 void OnReloadButton(wxCommandEvent& );
95 // void OnRunButton(wxCommandEvent& );
96 void OnLinkClicked(wxHtmlLinkEvent& );
97 void OnURLEnter( wxCommandEvent&);
99 // void OnCell(wxHtmlCellEvent& );
101 void SetSize( wxSize );
103 std::string GetCurrentPage();
106 WxHtmlWindow* mwxHtmlWindow;
108 wxButton* mwxBackButton;
109 wxButton* mwxForwardButton;
110 wxButton* mwxHomeButton;
111 wxButton* mwxReloadButton;
112 // wxButton* mwxRunButton;
114 // WxGUIHtmlBrowserUser* mUser;
116 // any class wishing to process wxWidgets events must use this macro
117 DECLARE_EVENT_TABLE()