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¶
Methods Summary¶
Get the child web view for the target window. |
|
Returns the position of the new window if specified by a |
|
Returns the size of the new window if specified by a |
|
Returns |
|
Returns |
|
Returns |
|
Returns |
Properties Summary¶
See |
|
See |
|
See |
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_FEATURESandwx.html2.WebView.Createmust be called on the child web view directly.The requested URL will be loaded automatically in the child web view.
- Return type:
- 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:
- ShouldDisplayMenuBar(self)¶
Returns
Trueif the target window is expected to display a menu bar as specified by awindow.open()call.- Return type:
bool
- ShouldDisplayScrollBars(self)¶
Returns
Trueif the target window is expected to display scroll bars as specified by awindow.open()call.- Return type:
bool
- ShouldDisplayStatusBar(self)¶
Returns
Trueif the target window is expected to display a status bar as specified by awindow.open()call.- Return type:
bool
- ShouldDisplayToolBar(self)¶
Returns
Trueif the target window is expected to display a tool bar as specified by awindow.open()call.- Return type:
bool
Properties¶
- ChildWebView¶
See
GetChildWebView
- Position¶
See
GetPosition