3
5Ad]Ý	  ã               @   s˜   d Z ddlmZ ddlmZ ddlmZ ddlmZm	Z	 G dd„ deƒZ
G dd	„ d	e
ƒZx:ejD ]0Zejejed
œZe	eje
feƒZeeƒ ej< q`W dS )z#Actions to start various modules.

é    )Úregistry)ÚModuleMetadata)ÚPipelineInfo)ÚFilterActionÚ	new_classc               @   s   e Zd Zdd„ ZdS )ÚModuleActionc             C   s,   | j jƒ }|ƒ }| j}|j|ƒ ||j_dS )z Performs the action. N)ÚmetadataZget_callableÚmayaviÚ
add_moduleÚengineÚcurrent_selection)ÚselfÚeventÚcallableÚobjÚmv© r   ú|/home/yuhw/wc/wire-cell-python/wcpy/lib/python3.6/site-packages/mayavi-4.7.1-py3.6-linux-x86_64.egg/mayavi/action/modules.pyÚperform   s
    

zModuleAction.performN)Ú__name__Ú
__module__Ú__qualname__r   r   r   r   r   r      s   r   c               @   sD   e Zd ZdZdZdZed ddddedgdgdgd�d�Zdd	„ Z	d
S )ÚAddModuleManagerz2 An action that adds a ModuleManager to the tree. z0Add a ModuleManager to the current source/filterz(mayavi.core.module_manager.ModuleManagerz&Add ModuleManagerÚany)ZdatasetsZattribute_typesZ
attributes)ÚidÚ
class_nameZ	menu_nameÚtooltipÚdescriptionZ
input_infoc             C   s.   ddl m} |ƒ }| j}|j|ƒ ||j_dS )z Performs the action. r   )ÚModuleManagerN)Zmayavi.core.module_managerr   r	   r
   r   r   )r   r   r   Úmmr   r   r   r   r   3   s
    
zAddModuleManager.performN)
r   r   r   Ú__doc__r   r   r   r   r   r   r   r   r   r   r   "   s   r   )r   r   r   N)r    Zmayavi.core.registryr   Zmayavi.core.metadatar   Zmayavi.core.pipeline_infor   Zmayavi.action.filtersr   r   r   r   ÚmodulesÚmoduler   ÚdescÚdr   ÚactionÚglobalsr   r   r   r   Ú<module>   s   