3
8ßL]Ü	  ã               @   s6   d Z ddlmZ ddlmZ dd„ Zead
dd	„ZdS )za Defines the help interface for displaying the help associated with a
    Traits UI View object.
é    )Úabsolute_importé   )Útoolkitc             C   s   t ƒ j| j|ƒ dS )zB Default handler for showing the help associated with a view.
    N)r   Ú	show_helpÚui)ÚinfoÚcontrol© r	   ú3/tmp/pip-install-5sebvq2j/traitsui/traitsui/help.pyÚdefault_show_help#   s    r   Nc             C   s   t }| dk	r| a |S )aÎ   Sets a new global help provider function.

    The help provider function must have a signature of
    *function*(*info*, *control*), where *info* is a UIInfo object for the
    current view, and *control* is the UI control that invokes the function
    (typically, a **Help** button). It is provided in case the help provider
    needs to position the help window relative to the **Help** button.

    To retrieve the current help provider function, call this function with
    no arguments.

    Parameters
    ----------
    new_show_help : function
        The function to set as the new global help provider

    Returns
    -------
    previous : callable
        The previous global help provider function
    N)r   )Znew_show_helpÚresultr	   r	   r
   Úon_help_call0   s    r   )N)Ú__doc__Ú
__future__r   r   r   r   r   r	   r	   r	   r
   Ú<module>   s
   