a
    §ˆc  ã                   @   sš   d Z ddlZddlmZ ddlmZmZmZ ddlm	Z	 ddl
mZ ddlmZmZ dd	lmZ e e¡ZG d
d„ deeƒZeeƒG dd„ deeƒƒZdS )ú$ The interface for workbench views. é    N)ÚImage)ÚBoolÚStrÚprovides)Úcamel_case_to_wordsé   )ÚIPerspectiveItem)ÚIWorkbenchPartÚMWorkbenchPart)ÚPerspectiveItemc                   @   sF   e Zd ZdZedƒZedƒZeƒ Z	edƒZ
dd„ Zdd„ Zdd	„ Zd
S )ÚIViewr   FÚGeneralc                 C   s   dS ©z Activate the view.

        N© ©Úselfr   r   úZ/home/yuhw/wc/wire-cell-python/wcpy/lib/python3.9/site-packages/pyface/workbench/i_view.pyÚactivate3   s    zIView.activatec                 C   s   dS )z Hide the view.

        Nr   r   r   r   r   Úhide8   s    z
IView.hidec                 C   s   dS )z Show the view.

        Nr   r   r   r   r   Úshow=   s    z
IView.showN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   Úbusyr   Úcategoryr   ÚimageÚvisibler   r   r   r   r   r   r   r      s   r   c                   @   sV   e Zd ZdZedƒZedƒZeƒ Z	edƒZ
dd„ Zdd„ Zdd	„ Zd
d„ Zdd„ ZdS )ÚMViewzD Mixin containing common code for toolkit-specific implementations. Fr   c                 C   s.   dt | ƒjt | ƒjf }t d| |f ¡ |S )ú Trait initializer. z%s.%szview %s has no Id - using <%s>)Útyper   r   ÚloggerÚwarning)r   Úidr   r   r   Ú_id_default\   s    zMView._id_defaultc                 C   s$   t t| ƒjƒ}t d| |f ¡ |S )r    z view %s has no name - using <%s>)r   r!   r   r"   r#   )r   Únamer   r   r   Ú_name_defaulte   s    zMView._name_defaultc                 C   s   | j  | ¡ dS r   )ÚwindowZactivate_viewr   r   r   r   r   q   s    zMView.activatec                 C   s   | j  | ¡ dS )z Hide the view. N)r(   Z	hide_viewr   r   r   r   r   x   s    z
MView.hidec                 C   s   | j  | ¡ dS )z Show the view. N)r(   Z	show_viewr   r   r   r   r   }   s    z
MView.showN)r   r   r   r   r   r   r   r   r   r   r   r%   r'   r   r   r   r   r   r   r   r   C   s   	r   )r   ÚloggingZ
pyface.apir   Z
traits.apir   r   r   Ztraits.util.camel_caser   Zi_perspective_itemr	   Zi_workbench_partr
   r   Zperspective_itemr   Ú	getLoggerr   r"   r   r   r   r   r   r   Ú<module>   s   
&