.. wxPython Phoenix documentation

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

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

.. include:: headings.inc



.. _wx.adv.ExtHelpController:

==========================================================================================================================================
|phoenix_title|  **wx.adv.ExtHelpController**
==========================================================================================================================================

This class implements help via an external browser.          

It requires the name of a directory containing the documentation and a file mapping numerical Section numbers to relative ``URLS``. 

The map file contains two or three fields per line: numeric_id relative_URL [; comment/documentation] 

The numeric_id is the id used to look up the entry in :meth:`~wx.adv.ExtHelpController.DisplaySection`/DisplayBlock(). The relative_URL is a filename of an html file, relative to the help directory. The optional comment/documentation field (after a ';') is used for keyword searches, so some meaningful text here does not hurt. If the documentation itself contains a ';', only the part before that will be displayed in the listbox, but all of it used for search. 

Lines starting with ';' will be ignored. 







         



.. seealso:: :ref:`HelpController`    







|

|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>ExtHelpController</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.adv.ExtHelpController_inheritance.png" alt="Inheritance diagram of ExtHelpController" 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.adv.ExtHelpController.html" title="wx.adv.ExtHelpController" alt="" coords="5,160,184,189"/> <area shape="rect" id="node2" href="wx.HelpControllerBase.html" title="wx.HelpControllerBase" alt="" coords="12,83,176,112"/> <area shape="rect" id="node3" href="wx.Object.html" title="wx.Object" alt="" coords="53,5,135,35"/> </map> 
   </p>

|


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

================================================================================ ================================================================================
:meth:`~wx.adv.ExtHelpController.__init__`                                       
:meth:`~wx.adv.ExtHelpController.DisplayBlock`                                   Display help for URL (using DisplayHelp) or keyword (using KeywordSearch)
:meth:`~wx.adv.ExtHelpController.DisplayContents`                                Display list of all help entries.
:meth:`~wx.adv.ExtHelpController.DisplayHelp`                                    Call the browser using a relative URL.
:meth:`~wx.adv.ExtHelpController.DisplaySection`                                 Display help for id sectionNo.
:meth:`~wx.adv.ExtHelpController.GetFrameParameters`                             Obtains the latest settings used by the help frame and the help frame.
:meth:`~wx.adv.ExtHelpController.Initialize`                                     This must be called to tell the controller where to find the documentation.
:meth:`~wx.adv.ExtHelpController.KeywordSearch`                                  Search comment/documentation fields in map file and present a list to chose from.
:meth:`~wx.adv.ExtHelpController.LoadFile`                                       If file is "", reloads file given in Initialize.
:meth:`~wx.adv.ExtHelpController.OnQuit`                                         Does nothing.
:meth:`~wx.adv.ExtHelpController.Quit`                                           Does nothing.
:meth:`~wx.adv.ExtHelpController.SetFrameParameters`                             Allows one to override the default settings for the help frame.
:meth:`~wx.adv.ExtHelpController.SetViewer`                                      Tell it which browser to use.
================================================================================ ================================================================================


|


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

================================================================================ ================================================================================
:attr:`~wx.adv.ExtHelpController.FrameParameters`                                See :meth:`~wx.adv.ExtHelpController.GetFrameParameters`
================================================================================ ================================================================================


|


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


.. class:: wx.adv.ExtHelpController(HelpControllerBase)

   **Possible constructors**::

       ExtHelpController(parentWindow=None)
       
   
   This class implements help via an external browser.



   .. method:: __init__(self, parentWindow=None)




      :param `parentWindow`: 
      :type `parentWindow`: wx.Window







   .. method:: DisplayBlock(self, blockNo)

      Display help for URL (using DisplayHelp) or keyword (using KeywordSearch)                  

                


      :param `blockNo`: 
      :type `blockNo`: long




      :rtype: `bool`







      :returns: 

         ``True`` on success   








   .. method:: DisplayContents(self)

      Display list of all help entries.                  

                

      :rtype: `bool`







      :returns: 

         ``True`` on success   








   .. method:: DisplayHelp(self, relativeURL)

      Call the browser using a relative URL.                  


      :param `relativeURL`: 
      :type `relativeURL`: string




      :rtype: `bool`








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



      |overload| Overloaded Implementations:

      **~~~**

      
      **DisplaySection** `(self, sectionNo)`
      
      Display help for id sectionNo.                  
      
                      
      
      
      :param `sectionNo`: 
      :type `sectionNo`: int
      
      
      
      
      :rtype: `bool`
      
      
      
      
      
      
      
      :returns: 
      
         ``True`` on success   
      
      
      
      
      
      
      
      **~~~**

      
      **DisplaySection** `(self, section)`
      
      Display help for id sectionNo :meth:`DisplaySection` .                  
      
                      
      
      
      :param `section`: 
      :type `section`: string
      
      
      
      
      :rtype: `bool`
      
      
      
      
      
      
      
      :returns: 
      
         ``True`` on success   
      
      
      
      
      
      
      
      **~~~**






   .. method:: GetFrameParameters(self, size=None, pos=None, newFrameEachTime=None)

      Obtains the latest settings used by the help frame and the help frame.                  


      :param `size`: 
      :type `size`: wx.Size
      :param `pos`: 
      :type `pos`: wx.Point
      :param `newFrameEachTime`: 
      :type `newFrameEachTime`: bool




      :rtype: :ref:`Frame`








   .. method:: Initialize(self, dir)

      This must be called to tell the controller where to find the documentation.                  

      If a locale is set, look in file/localename, i.e. If passed "/usr/local/myapp/help" and the current :ref:`wx.Locale`  is set to be "de", then look in "/usr/local/myapp/help/de/" first and fall back to "/usr/local/myapp/help" if that doesn't exist. 




      :param `dir`: directory name where to fine the help files  
      :type `dir`: string






      :rtype: `bool`



                  



      :returns: 

         ``True`` on success   








   .. method:: KeywordSearch(self, k, mode=HELP_SEARCH_ALL)

      Search comment/documentation fields in map file and present a list to chose from.                  




      :param `k`: string to search for, empty string will list all entries  
      :type `k`: string
      :param `mode`: optional parameter allows the search the index (wx``wx.HELP_SEARCH_INDEX``) but this currently only supported by the :ref:`wx.html.HtmlHelpController`.  
      :type `mode`: wx.HelpSearchMode








      :rtype: `bool`



                  



      :returns: 

         ``True`` on success   








   .. method:: LoadFile(self, file=EmptyString)

      If file is "", reloads file given in Initialize.                  




      :param `file`: Name of help directory.  
      :type `file`: string






      :rtype: `bool`



                  



      :returns: 

         ``True`` on success   








   .. method:: OnQuit(self)

      Does nothing.                   





   .. method:: Quit(self)

      Does nothing.                  

      :rtype: `bool`








   .. method:: SetFrameParameters(self, titleFormat, size, pos=DefaultPosition, newFrameEachTime=False)

      Allows one to override the default settings for the help frame.                  


      :param `titleFormat`: 
      :type `titleFormat`: string
      :param `size`: 
      :type `size`: wx.Size
      :param `pos`: 
      :type `pos`: wx.Point
      :param `newFrameEachTime`: 
      :type `newFrameEachTime`: bool







   .. method:: SetViewer(self, viewer=EmptyString, flags=HELP_NETSCAPE)

      Tell it which browser to use.                  

      The Netscape support will check whether Netscape is already running (by looking at the .netscape/lock file in the user's home directory) and tell it to load the page into the existing window. 




      :param `viewer`: The command to call a browser/html viewer.   
      :type `viewer`: string
      :param `flags`: Set this to ``wx.HELP_NETSCAPE`` if the browser is some variant of Netscape.   
      :type `flags`: long






                  





   .. attribute:: FrameParameters

      See :meth:`~wx.adv.ExtHelpController.GetFrameParameters`

