#ifdef _USE_WXWIDGETS_ #ifndef __bbtkWxBrowser_h_INCLUDED__ #define __bbtkWxBrowser_h_INCLUDED__ #include "bbtkWx.h" //#include #include namespace bbtk { class WxBrowser; class WxHtmlWindow : public virtual wxHtmlWindow { public: WxHtmlWindow( wxWindow *parent, int id, WxBrowser* browser, wxSize size) : wxHtmlWindow(parent, id, wxDefaultPosition, size, wxHW_SCROLLBAR_AUTO, _T("bbtk::WxBrowser")), mBrowser(browser) { } // wxHtmlOpeningStatus OnOpeningURL(wxHtmlURLType type,const wxString& url, wxString *redirect); virtual void OnLinkClicked(const wxHtmlLinkInfo& link); private: WxBrowser* mBrowser; }; class WxBrowser : public wxPanel { public: WxBrowser ( wxWindow *parent, wxSize size ); bool GoTo(std::string&); void OnBackButton(wxCommandEvent& ); void OnForwardButton(wxCommandEvent& ); void OnLinkClicked(wxHtmlLinkEvent& ); void OnURLEnter( wxCommandEvent&); void UpdateURL(); // void OnCell(wxHtmlCellEvent& ); void SetSize( wxSize ); private: WxHtmlWindow* mwxHtmlWindow; wxTextCtrl* mwxURL; wxButton* mwxBackButton; wxButton* mwxForwardButton; // any class wishing to process wxWidgets events must use this macro DECLARE_EVENT_TABLE() }; } #endif #endif