1 /*=========================================================================
4 Module: $RCSfile: bbtkWxGUIHtmlBrowser.h,v $
6 Date: $Date: 2008/07/23 11:46:11 $
7 Version: $Revision: 1.5 $
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);
62 //EED2 void OnSize( wxSizeEvent&);
66 WxGUIHtmlBrowser* mBrowser;
68 // any class wishing to process wxWidgets events must use this macro
69 //EED2 DECLARE_EVENT_TABLE()
74 /// Abstract class which defines the callbacks invoked by WxGUIHtmlBrowser
75 class WxGUIHtmlBrowserUser
78 WxGUIHtmlBrowserUser() {}
79 virtual ~WxGUIHtmlBrowserUser() {}
81 virtual bool WxGUIHtmlBrowserUserOnLinkClicked(const std::string& target)
87 // class WxGUIConsole;
90 class BBTK_EXPORT WxGUIHtmlBrowser : public wxPanel
93 WxGUIHtmlBrowser ( wxWindow *parent, wxSize size,
94 WxGUIHtmlBrowserUser* = 0 );
96 bool GoTo(std::string&);
99 void OnBackButton(wxCommandEvent& );
100 void OnForwardButton(wxCommandEvent& );
101 void OnHomeButton(wxCommandEvent& );
102 void OnReloadButton(wxCommandEvent& );
103 // void OnRunButton(wxCommandEvent& );
104 void OnLinkClicked(wxHtmlLinkEvent& );
105 void OnURLEnter( wxCommandEvent&);
106 void OnSize( wxSizeEvent&);
109 // void OnCell(wxHtmlCellEvent& );
111 void SetSize( wxSize );
113 std::string GetCurrentPage();
116 WxHtmlWindow* mwxHtmlWindow;
118 wxButton* mwxBackButton;
119 wxButton* mwxForwardButton;
120 wxButton* mwxHomeButton;
121 wxButton* mwxReloadButton;
122 // wxButton* mwxRunButton;
124 WxGUIHtmlBrowserUser* mUser;
126 // any class wishing to process wxWidgets events must use this macro
127 DECLARE_EVENT_TABLE()