3
<Ad]g	  ã               @   s(   d Z ddlmZmZ G dd„ deƒZdS )zD Base class defining common code for EnamlTaskPane and EnamlEditor. é    )Ú	HasTraitsÚInstancec               @   s0   e Zd ZdZedƒZdd„ Zdd„ Zdd„ Zd	S )
Ú	EnamlPanezD Base class defining common code for EnamlTaskPane and EnamlEditor. z*enaml.widgets.toolkit_object.ToolkitObjectc             C   s   t ‚dS )z‰ Return an Enaml component defining the contents of the pane.

        Returns
        -------
        component : ToolkitObject
        N)ÚNotImplementedError)Úself© r   úq/home/yuhw/wc/wire-cell-python/wcpy/lib/python3.6/site-packages/pyface-6.1.2-py3.6.egg/pyface/tasks/enaml_pane.pyÚcreate_component   s    zEnamlPane.create_componentc             C   s†   ddl m} | jƒ | _| jj}d| j_| jjƒ  | jjsB| jjƒ  | jjj	| _
|dk	rb| j
j|ƒ || j_t| j|ƒr‚| jjjƒ  dS )zA Create the toolkit-specific control that represents the editor. r   )ÚProxyConstraintsWidgetFN)Z enaml.widgets.constraints_widgetr
   r	   Ú	componentÚvisibleÚ
initializeZproxy_is_activeZactivate_proxyÚproxyZwidgetÚcontrolZ	setParentÚ
isinstanceZrequest_relayout)r   Úparentr
   r   r   r   r   Úcreate   s    


zEnamlPane.createc             C   s8   | j }|dk	r(|jƒ  | jjƒ  |jƒ  d| _ d| _dS )zJ Destroy the toolkit-specific control that represents the editor.
        N)r   Zhider   ÚdestroyZdeleteLater)r   r   r   r   r   r   =   s    
zEnamlPane.destroyN)	Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r	   r   r   r   r   r   r   r      s
   r   N)r   Z
traits.apir   r   r   r   r   r   r   Ú<module>   s   