a
    «ˆcÔ  ã                   @   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 e¡s®eeeeƒƒd
dd	dƒZe 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ÚbuildZdocsÚmayavic                 C   s4   t jdkrt 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/wcpy/lib/python3.9/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} |ƒ  ¡  dS )z" Open the TVTK class browser.
    r   )ÚTVTKClassChooserN)Ztvtk.tools.tvtk_docr   Z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__Z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 r   )r   r   r   r   r   r"   _   s    zTVTKClassBrowser.performNr#   r   r   r   r   r)   T   s   r)   )r'   r   r   r   Úos.pathr   r   Zpyface.action.apir   Ztraitsui.apir   Z
mayavi.apir   Zmayavi.core.commonr   Zmayavi.preferences.apir   ÚapiÚ__file__Z	local_dirr   Úexistsr   r   r   r   r)   r   r   r   r   Ú<module>   s,   	

ÿ

