3
îÈ‘[Ô  ã               @   sê   d Z ddlmZ ddlZddlZddlmZmZ ddlmZ ddl	m
Z
 ddlZddlmZ ddlmZ eejjƒZeed	ƒZejeƒs®eeeeƒƒd
dd	dƒZejeƒs®dZdd„ Zdd„ Zdd„ ZG dd„ deƒZG dd„ deƒZdS )zActions for the help menu.

é    )ÚpathN)ÚjoinÚdirname)ÚAction)Úauto_close_message)Úerror)Úpreference_managerÚhtmlÚbuildÚdocsÚmayavic             C   s4   t jdkrtjd|  ƒ ndd l}|j| dd� d S )NÚdarwinz	open %s &r   é   )Z	autoraise)ÚsysÚplatformÚosÚsystemÚ
webbrowserÚopen)Úurlr   © r   úU/home/yuhw/wc/wire-cell-python/venv/lib/python3.6/site-packages/mayavi/action/help.pyÚbrowser_open#   s    
r   c              G   s(   t rtdƒ ttt dƒƒ ntdƒ dS )z5 Open the mayavi user manual index in a browser.
    zOpening help in web browser...z
index.htmlz)https://docs.enthought.com/mayavi/mayavi/N)ÚHTML_DIRr   r   r   )Úargsr   r   r   Úopen_help_index+   s    r   c              G   s   ddl m} |ƒ jƒ  dS )z" Open the TVTK class browser.
    r   )ÚTVTKClassChooserN)Ztvtk.tools.tvtk_docr   Úedit_traits)r   r   r   r   r   Úopen_tvtk_docs7   s    r   c               @   s    e Zd ZdZdZdZdd„ ZdS )Ú	HelpIndexz. An action that pop up the help in a browser. zThe Mayavi2 user guidec             C   s
   t ƒ  dS )z Performs the action. N)r   )ÚselfÚeventr   r   r   ÚperformL   s    zHelpIndex.performN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__ÚtooltipÚdescriptionr"   r   r   r   r   r   A   s   r   c               @   s    e Zd ZdZdZdZdd„ ZdS )ÚTVTKClassBrowserz: An action that opens the tvtk interactive class browser. z"The TVTK interactive class browserc             C   s
   t ƒ  dS )z Performs the action. N)r   )r    r!   r   r   r   r"   _   s    zTVTKClassBrowser.performN)r#   r$   r%   r&   r'   r(   r"   r   r   r   r   r)   T   s   r)   )r&   r   r   r   Úos.pathr   r   Úpyface.action.apir   Útraitsui.apir   Z
mayavi.apir   Úmayavi.core.commonr   Úmayavi.preferences.apir   ÚapiÚ__file__Z	local_dirr   Úexistsr   r   r   r   r)   r   r   r   r   Ú<module>   s*   



