.. wxPython Phoenix documentation

   This file was generated by Phoenix's sphinx generator and associated
   tools, do not edit by hand.

   Copyright: (c) 2011-2017 by Total Control Software
   License:   wxWindows License

.. include:: headings.inc



.. _wx.webkit.WebKitCtrl:

==========================================================================================================================================
|phoenix_title|  **wx.webkit.WebKitCtrl**
==========================================================================================================================================

This control is a native wrapper around the Safari web browsing engine.          

This wrapper differs from the one in :ref:`wx.html2.WebView`  in that this version supports functionality specific to WebKit, such as having RunScript return a value, which is a very critical feature in many web embedding scenarios. 

This class is only available on OSX.           




|

|class_hierarchy| Class Hierarchy
=================================

.. raw:: html

   <div id="toggleBlock" onclick="return toggleVisibility(this)" class="closed" style="cursor:pointer;">
   <img id="toggleBlock-trigger" src="_static/images/closed.png"/>
   Inheritance diagram for class <strong>WebKitCtrl</strong>:
   </div>
   <div id="toggleBlock-summary" style="display:block;"></div>
   <div id="toggleBlock-content" style="display:none;">
   <p class="graphviz">
   <center><img src="_static/images/inheritance/wx.webkit.WebKitCtrl_inheritance.png" alt="Inheritance diagram of WebKitCtrl" usemap="#dummy" class="inheritance"/></center>
   </div>
   <script type="text/javascript">toggleVisibilityOnLoad(document.getElementById('toggleBlock'))</script>
   <map id="dummy" name="dummy"> <area shape="rect" id="node1" href="wx.Control.html" title="wx.Control" alt="" coords="60,237,148,267"/> <area shape="rect" id="node6" href="wx.webkit.WebKitCtrl.html" title="wx.webkit.WebKitCtrl" alt="" coords="29,315,179,344"/> <area shape="rect" id="node2" href="wx.Window.html" title="wx.Window" alt="" coords="59,160,148,189"/> <area shape="rect" id="node3" href="wx.Object.html" title="wx.Object" alt="" coords="5,5,87,35"/> <area shape="rect" id="node4" href="wx.EvtHandler.html" title="wx.EvtHandler" alt="" coords="48,83,159,112"/> <area shape="rect" id="node5" href="wx.Trackable.html" title="wx.Trackable" alt="" coords="112,5,213,35"/> </map> 
   </p>

|


|method_summary| Methods Summary
================================

================================================================================ ================================================================================
:meth:`~wx.webkit.WebKitCtrl.__init__`                                           
:meth:`~wx.webkit.WebKitCtrl.CanDecreaseTextSize`                                
:meth:`~wx.webkit.WebKitCtrl.CanGetPageSource`                                   
:meth:`~wx.webkit.WebKitCtrl.CanGoBack`                                          
:meth:`~wx.webkit.WebKitCtrl.CanGoForward`                                       
:meth:`~wx.webkit.WebKitCtrl.CanIncreaseTextSize`                                
:meth:`~wx.webkit.WebKitCtrl.Create`                                             
:meth:`~wx.webkit.WebKitCtrl.DecreaseTextSize`                                   
:meth:`~wx.webkit.WebKitCtrl.GetPageSource`                                      
:meth:`~wx.webkit.WebKitCtrl.GetPageTitle`                                       
:meth:`~wx.webkit.WebKitCtrl.GetPageURL`                                         
:meth:`~wx.webkit.WebKitCtrl.GetScrollPos`                                       
:meth:`~wx.webkit.WebKitCtrl.GetSelection`                                       
:meth:`~wx.webkit.WebKitCtrl.GetTitle`                                           
:meth:`~wx.webkit.WebKitCtrl.GoBack`                                             
:meth:`~wx.webkit.WebKitCtrl.GoForward`                                          
:meth:`~wx.webkit.WebKitCtrl.IncreaseTextSize`                                   
:meth:`~wx.webkit.WebKitCtrl.IsEditable`                                         
:meth:`~wx.webkit.WebKitCtrl.LoadURL`                                            
:meth:`~wx.webkit.WebKitCtrl.MakeEditable`                                       
:meth:`~wx.webkit.WebKitCtrl.Print`                                              
:meth:`~wx.webkit.WebKitCtrl.Reload`                                             
:meth:`~wx.webkit.WebKitCtrl.RunScript`                                          
:meth:`~wx.webkit.WebKitCtrl.SetPageSource`                                      
:meth:`~wx.webkit.WebKitCtrl.SetPageTitle`                                       
:meth:`~wx.webkit.WebKitCtrl.SetScrollPos`                                       
:meth:`~wx.webkit.WebKitCtrl.SetTitle`                                           
:meth:`~wx.webkit.WebKitCtrl.Stop`                                               
================================================================================ ================================================================================


|


|property_summary| Properties Summary
=====================================

================================================================================ ================================================================================
:attr:`~wx.webkit.WebKitCtrl.PageSource`                                         See :meth:`~wx.webkit.WebKitCtrl.GetPageSource` and :meth:`~wx.webkit.WebKitCtrl.SetPageSource`
:attr:`~wx.webkit.WebKitCtrl.PageTitle`                                          See :meth:`~wx.webkit.WebKitCtrl.GetPageTitle` and :meth:`~wx.webkit.WebKitCtrl.SetPageTitle`
:attr:`~wx.webkit.WebKitCtrl.PageURL`                                            See :meth:`~wx.webkit.WebKitCtrl.GetPageURL`
:attr:`~wx.webkit.WebKitCtrl.ScrollPos`                                          See :meth:`~wx.webkit.WebKitCtrl.GetScrollPos` and :meth:`~wx.webkit.WebKitCtrl.SetScrollPos`
:attr:`~wx.webkit.WebKitCtrl.Selection`                                          See :meth:`~wx.webkit.WebKitCtrl.GetSelection`
:attr:`~wx.webkit.WebKitCtrl.Title`                                              See :meth:`~wx.webkit.WebKitCtrl.GetTitle` and :meth:`~wx.webkit.WebKitCtrl.SetTitle`
================================================================================ ================================================================================


|


|api| Class API
===============


.. class:: wx.webkit.WebKitCtrl(Control)

   **Possible constructors**::

       WebKitCtrl()
       
       WebKitCtrl(parent, winid=ID_ANY, strURL="", pos=DefaultPosition,
                  size=DefaultSize, style=0, validator=DefaultValidator,
                  name=WebKitCtrlNameStr)
       
   
   This control is a native wrapper around the Safari web browsing
   engine.



   .. method:: __init__(self, *args, **kw)



      |overload| Overloaded Implementations:

      **~~~**

      
      **__init__** `(self)`
      
      
      
      
      
      **~~~**

      
      **__init__** `(self, parent, winid=ID_ANY, strURL="", pos=DefaultPosition, size=DefaultSize, style=0, validator=DefaultValidator, name=WebKitCtrlNameStr)`
      
      
      
      
      :param `parent`: 
      :type `parent`: wx.Window
      :param `winid`: 
      :type `winid`: wx.WindowID
      :param `strURL`: 
      :type `strURL`: string
      :param `pos`: 
      :type `pos`: wx.Point
      :param `size`: 
      :type `size`: wx.Size
      :param `style`: 
      :type `style`: long
      :param `validator`: 
      :type `validator`: wx.Validator
      :param `name`: 
      :type `name`: string
      
      
      
      
      
      
      **~~~**






   .. method:: CanDecreaseTextSize(self)



      :rtype: `bool`








   .. method:: CanGetPageSource(self)



      :rtype: `bool`








   .. method:: CanGoBack(self)



      :rtype: `bool`








   .. method:: CanGoForward(self)



      :rtype: `bool`








   .. method:: CanIncreaseTextSize(self)



      :rtype: `bool`








   .. method:: Create(self, parent, winid=ID_ANY, strURL="", pos=DefaultPosition, size=DefaultSize, style=0, validator=DefaultValidator, name=WebKitCtrlNameStr)




      :param `parent`: 
      :type `parent`: wx.Window
      :param `winid`: 
      :type `winid`: wx.WindowID
      :param `strURL`: 
      :type `strURL`: string
      :param `pos`: 
      :type `pos`: wx.Point
      :param `size`: 
      :type `size`: wx.Size
      :param `style`: 
      :type `style`: long
      :param `validator`: 
      :type `validator`: wx.Validator
      :param `name`: 
      :type `name`: string




      :rtype: `bool`








   .. method:: DecreaseTextSize(self)






   .. method:: GetPageSource(self)



      :rtype: `string`








   .. method:: GetPageTitle(self)



      :rtype: `string`








   .. method:: GetPageURL(self)



      :rtype: `string`








   .. method:: GetScrollPos(self)



      :rtype: `int`








   .. method:: GetSelection(self)



      :rtype: `string`








   .. method:: GetTitle(self)



      :rtype: `string`








   .. method:: GoBack(self)



      :rtype: `bool`








   .. method:: GoForward(self)



      :rtype: `bool`








   .. method:: IncreaseTextSize(self)






   .. method:: IsEditable(self)



      :rtype: `bool`








   .. method:: LoadURL(self, url)




      :param `url`: 
      :type `url`: string







   .. method:: MakeEditable(self, enable=True)




      :param `enable`: 
      :type `enable`: bool







   .. method:: Print(self, showPrompt=False)




      :param `showPrompt`: 
      :type `showPrompt`: bool







   .. method:: Reload(self)






   .. method:: RunScript(self, javascript)




      :param `javascript`: 
      :type `javascript`: string




      :rtype: `string`








   .. method:: SetPageSource(self, source, baseUrl=EmptyString)




      :param `source`: 
      :type `source`: string
      :param `baseUrl`: 
      :type `baseUrl`: string







   .. method:: SetPageTitle(self, title)




      :param `title`: 
      :type `title`: string







   .. method:: SetScrollPos(self, pos)




      :param `pos`: 
      :type `pos`: int







   .. method:: SetTitle(self, title)




      :param `title`: 
      :type `title`: string







   .. method:: Stop(self)






   .. attribute:: PageSource

      See :meth:`~wx.webkit.WebKitCtrl.GetPageSource` and :meth:`~wx.webkit.WebKitCtrl.SetPageSource`


   .. attribute:: PageTitle

      See :meth:`~wx.webkit.WebKitCtrl.GetPageTitle` and :meth:`~wx.webkit.WebKitCtrl.SetPageTitle`


   .. attribute:: PageURL

      See :meth:`~wx.webkit.WebKitCtrl.GetPageURL`


   .. attribute:: ScrollPos

      See :meth:`~wx.webkit.WebKitCtrl.GetScrollPos` and :meth:`~wx.webkit.WebKitCtrl.SetScrollPos`


   .. attribute:: Selection

      See :meth:`~wx.webkit.WebKitCtrl.GetSelection`


   .. attribute:: Title

      See :meth:`~wx.webkit.WebKitCtrl.GetTitle` and :meth:`~wx.webkit.WebKitCtrl.SetTitle`

