Add a new event type for new window creation, document and implement under MSW. Update the sample to veto new window events, this means under Window we no long get Internet Explorer windows appearing for some links.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/SOC2011_WEBVIEW@67785 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Steve Lamerton
2011-05-26 18:43:18 +00:00
parent a427ca2713
commit 853b6cd0e4
5 changed files with 47 additions and 8 deletions

View File

@@ -363,6 +363,7 @@ wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_WEB, wxEVT_COMMAND_WEB_VIEW_NAVIGATING, wx
wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_WEB, wxEVT_COMMAND_WEB_VIEW_NAVIGATED, wxWebNavigationEvent );
wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_WEB, wxEVT_COMMAND_WEB_VIEW_LOADED, wxWebNavigationEvent );
wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_WEB, wxEVT_COMMAND_WEB_VIEW_ERROR, wxWebNavigationEvent );
wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_WEB, wxEVT_COMMAND_WEB_VIEW_NEWWINDOW, wxWebNavigationEvent );
typedef void (wxEvtHandler::*wxWebNavigationEventFunction)
(wxWebNavigationEvent&);
@@ -386,6 +387,10 @@ typedef void (wxEvtHandler::*wxWebNavigationEventFunction)
wx__DECLARE_EVT1(wxEVT_COMMAND_WEB_VIEW_ERROR, id, \
wxHtmlNavigatingEventHandler(fn))
#define EVT_WEB_VIEW_NEWWINDOW(id, fn) \
wx__DECLARE_EVT1(wxEVT_COMMAND_WEB_VIEW_NEWWINDOW, id, \
wxHtmlNavigatingEventHandler(fn))
#endif // wxUSE_WEB
#endif // _WX_WEB_VIEW_H_