.. wxPython Phoenix documentation This file was generated by Phoenix's sphinx generator and associated tools, do not edit by hand. Copyright: (c) 2011-2020 by Total Control Software License: wxWindows License .. include:: headings.inc .. _wx.html2.WebViewWindowFeatures: ========================================================================================================================================== |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 :meth:`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 :meth:`~wx.html2.WebViewWindowFeatures.GetChildWebView`. The application can then place the child web view into the new window by calling :meth:`wx.html2.WebView.Create` on the child web view. Sample JavaScript opening a new window: Sample C++ code handling a new window request: .. versionadded:: 4.3/wxWidgets-3.3.0 | |class_hierarchy| Class Hierarchy ================================= .. raw:: html
Inheritance diagram for class WebViewWindowFeatures:
| |method_summary| Methods Summary ================================ ================================================================================ ================================================================================ :meth:`~wx.html2.WebViewWindowFeatures.GetChildWebView` Get the child web view for the target window. :meth:`~wx.html2.WebViewWindowFeatures.GetPosition` Returns the position of the new window if specified by a ``window.open()`` call. :meth:`~wx.html2.WebViewWindowFeatures.GetSize` Returns the size of the new window if specified by a ``window.open()`` call. :meth:`~wx.html2.WebViewWindowFeatures.ShouldDisplayMenuBar` Returns ``True`` if the target window is expected to display a menu bar as specified by a ``window.open()`` call. :meth:`~wx.html2.WebViewWindowFeatures.ShouldDisplayScrollBars` Returns ``True`` if the target window is expected to display scroll bars as specified by a ``window.open()`` call. :meth:`~wx.html2.WebViewWindowFeatures.ShouldDisplayStatusBar` Returns ``True`` if the target window is expected to display a status bar as specified by a ``window.open()`` call. :meth:`~wx.html2.WebViewWindowFeatures.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 ===================================== ================================================================================ ================================================================================ :attr:`~wx.html2.WebViewWindowFeatures.ChildWebView` See :meth:`~wx.html2.WebViewWindowFeatures.GetChildWebView` :attr:`~wx.html2.WebViewWindowFeatures.Position` See :meth:`~wx.html2.WebViewWindowFeatures.GetPosition` :attr:`~wx.html2.WebViewWindowFeatures.Size` See :meth:`~wx.html2.WebViewWindowFeatures.GetSize` ================================================================================ ================================================================================ | |api| Class API =============== .. class:: wx.html2.WebViewWindowFeatures(object) A class describing the window information for a new child window. .. method:: GetChildWebView(self) Get the child web view for the target window. This is available in the event handler for ``wxEVT_WEBVIEW_NEWWINDOW_FEATURES`` and :meth:`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. :rtype: :ref:`wx.html2.WebView` .. method:: GetPosition(self) Returns the position of the new window if specified by a ``window.open()`` call. :rtype: `Point` .. method:: GetSize(self) Returns the size of the new window if specified by a ``window.open()`` call. :rtype: `Size` .. method:: ShouldDisplayMenuBar(self) Returns ``True`` if the target window is expected to display a menu bar as specified by a ``window.open()`` call. :rtype: `bool` .. method:: ShouldDisplayScrollBars(self) Returns ``True`` if the target window is expected to display scroll bars as specified by a ``window.open()`` call. :rtype: `bool` .. method:: ShouldDisplayStatusBar(self) Returns ``True`` if the target window is expected to display a status bar as specified by a ``window.open()`` call. :rtype: `bool` .. method:: ShouldDisplayToolBar(self) Returns ``True`` if the target window is expected to display a tool bar as specified by a ``window.open()`` call. :rtype: `bool` .. attribute:: ChildWebView See :meth:`~wx.html2.WebViewWindowFeatures.GetChildWebView` .. attribute:: Position See :meth:`~wx.html2.WebViewWindowFeatures.GetPosition` .. attribute:: Size See :meth:`~wx.html2.WebViewWindowFeatures.GetSize`