phoenix_title wx.html2.WebViewWindowFeatures

A class describing the window information for a new child window.

An object of this class can be obtained using wx.html2.WebViewEvent.GetTargetWindowFeatures while handling wxEVT_WEBVIEW_NEWWINDOW_FEATURES .

If a wxEVT_WEBVIEW_NEWWINDOW is not vetoed, a wxEVT_WEBVIEW_NEWWINDOW_FEATURES event will be sent to the application. The application can then create a new window and call WebViewEvent.GetTargetWindowInfo() to get this class providing information about the new window. A new child web view will be available via GetChildWebView. The application can then place the child web view into the new window by calling wx.html2.WebView.Create on the child web view.

Sample JavaScript opening a new window:

Sample C++ code handling a new window request:

Added in version 4.3/wxWidgets-3.3.0.


class_hierarchy Class Hierarchy

Inheritance diagram for class WebViewWindowFeatures:

method_summary Methods Summary

GetChildWebView

Get the child web view for the target window.

GetPosition

Returns the position of the new window if specified by a window.open() call.

GetSize

Returns the size of the new window if specified by a window.open() call.

ShouldDisplayMenuBar

Returns True if the target window is expected to display a menu bar as specified by a window.open() call.

ShouldDisplayScrollBars

Returns True if the target window is expected to display scroll bars as specified by a window.open() call.

ShouldDisplayStatusBar

Returns True if the target window is expected to display a status bar as specified by a window.open() call.

ShouldDisplayToolBar

Returns True if the target window is expected to display a tool bar as specified by a window.open() call.


property_summary Properties Summary

ChildWebView

See GetChildWebView

Position

See GetPosition

Size

See GetSize


api Class API

class wx.html2.WebViewWindowFeatures(object)

A class describing the window information for a new child window.


Methods

GetChildWebView(self)

Get the child web view for the target window.

This is available in the event handler for wxEVT_WEBVIEW_NEWWINDOW_FEATURES and wx.html2.WebView.Create must be called on the child web view directly.

The requested URL will be loaded automatically in the child web view.

Return type:

wx.html2.WebView



GetPosition(self)

Returns the position of the new window if specified by a window.open() call.

Return type:

Point



GetSize(self)

Returns the size of the new window if specified by a window.open() call.

Return type:

Size



ShouldDisplayMenuBar(self)

Returns True if the target window is expected to display a menu bar as specified by a window.open() call.

Return type:

bool



ShouldDisplayScrollBars(self)

Returns True if the target window is expected to display scroll bars as specified by a window.open() call.

Return type:

bool



ShouldDisplayStatusBar(self)

Returns True if the target window is expected to display a status bar as specified by a window.open() call.

Return type:

bool



ShouldDisplayToolBar(self)

Returns True if the target window is expected to display a tool bar as specified by a window.open() call.

Return type:

bool


Properties

ChildWebView

See GetChildWebView



Position

See GetPosition



Size

See GetSize