3
7ßL]  ã               @   sª   d Z ddlZddlmZ ddlmZmZmZmZ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jeƒZG d
d„ deeƒZe
eƒG dd„ deeƒƒZdS )z$ The interface for workbench views. é    N)ÚImageResource)ÚBoolÚEnumÚFloatÚInstanceÚListÚprovidesÚStr)Úcamel_case_to_wordsé   )ÚIPerspectiveItem)ÚIWorkbenchPartÚMWorkbenchPart)ÚPerspectiveItemc               @   sH   e Zd ZdZedƒZedƒZee	ƒZ
edƒZdd„ Zdd„ Zdd	„ Zd
S )ÚIViewz$ The interface for workbench views. FÚGeneralc             C   s   dS )z Activate the view.

        N© )Úselfr   r   ú;/tmp/pip-install-5sebvq2j/pyface/pyface/workbench/i_view.pyÚactivate7   s    zIView.activatec             C   s   dS )z Hide the view.

        Nr   )r   r   r   r   Úhide<   s    z
IView.hidec             C   s   dS )z Show the view.

        Nr   )r   r   r   r   ÚshowA   s    z
IView.showN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   Úbusyr	   Úcategoryr   r   ÚimageÚvisibler   r   r   r   r   r   r   r   !   s   r   c               @   sX   e Zd ZdZedƒZedƒZe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jd| |f ƒ |S )z Trait initializer. z%s.%szview %s has no Id - using <%s>)Útyper   r   ÚloggerÚwarn)r   Úidr   r   r   Ú_id_default_   s    zMView._id_defaultc             C   s$   t t| ƒjƒ}tjd| |f ƒ |S )z Trait initializer. z view %s has no name - using <%s>)r
   r!   r   r"   r#   )r   Únamer   r   r   Ú_name_defaulth   s    zMView._name_defaultc             C   s   | j j| ƒ dS )z Activate the view.

        N)ÚwindowZactivate_view)r   r   r   r   r   t   s    zMView.activatec             C   s   | j j| ƒ dS )z Hide the view. N)r(   Z	hide_view)r   r   r   r   r   }   s    z
MView.hidec             C   s   | j j| ƒ dS )z Show the view. N)r(   Z	show_view)r   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   r    G   s   		r    )r   ÚloggingZ
pyface.apir   Z
traits.apir   r   r   r   r   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   $
&