3
<Ad]-  ã               @   s@   d Z ddlmZmZmZmZ G dd„ deƒZG dd„ deƒZdS )z, The base interface for all pyface widgets. é    )ÚAnyÚBoolÚ	HasTraitsÚ	Interfacec               @   s`   e Zd ZdZeZeZedƒZedƒZ	dd„ Z
dd„ Zdd„ Zd	d
„ Zdd„ Zdd„ Zdd„ ZdS )ÚIWidgetzl The base interface for all pyface widgets.

    Pyface widgets delegate to a toolkit specific control.
    Tc             C   s   dS )z¤ Show or hide the widget.

        Parameter
        ---------
        visible : bool
            Visible should be ``True`` if the widget should be shown.
        N© )ÚselfÚvisibler   r   úi/home/yuhw/wc/wire-cell-python/wcpy/lib/python3.6/site-packages/pyface-6.1.2-py3.6.egg/pyface/i_widget.pyÚshow+   s    zIWidget.showc             C   s   dS )z— Enable or disable the widget.

        Parameter
        ---------
        enabled : bool
            The enabled state to set the widget to.
        Nr   )r   Úenabledr   r   r
   Úenable4   s    zIWidget.enablec             C   s   dS )z# Destroy the control if it exists. Nr   )r   r   r   r
   Údestroy=   s    zIWidget.destroyc             C   s   dS )z— Creates the toolkit specific control.

        This method should create the control and assign it to the
        :py:attr:``control`` trait.
        Nr   )r   r   r   r
   Ú_createD   s    zIWidget._createc             C   s   dS )aU   Create toolkit specific control that represents the widget.

        Parameters
        ----------
        parent : toolkit control
            The toolkit control to be used as the parent for the widget's
            control.

        Returns
        -------
        control : toolkit control
            A control for the widget.
        Nr   )r   Úparentr   r   r
   Ú_create_controlK   s    zIWidget._create_controlc             C   s   dS )z- Set up toolkit-specific bindings for events Nr   )r   r   r   r
   Ú_add_event_listenersZ   s    zIWidget._add_event_listenersc             C   s   dS )z- Remove toolkit-specific bindings for events Nr   )r   r   r   r
   Ú_remove_event_listeners]   s    zIWidget._remove_event_listenersN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   Úcontrolr   r   r	   r   r   r   r   r   r   r   r   r   r   r   r
   r      s   		r   c               @   s0   e Zd ZdZdd„ Zdd„ Zdd„ Zdd	„ Zd
S )ÚMWidgetzr The mixin class that contains common code for toolkit specific
    implementations of the IWidget interface.
    c             C   s   | j | jƒ| _| jƒ  dS )z— Creates the toolkit specific control.

        This method should create the control and assign it to the
        :py:attr:``control`` trait.
        N)r   r   r   r   )r   r   r   r
   r   j   s    zMWidget._createc             C   s   t ‚dS )aU   Create toolkit specific control that represents the widget.

        Parameters
        ----------
        parent : toolkit control
            The toolkit control to be used as the parent for the widget's
            control.

        Returns
        -------
        control : toolkit control
            A control for the widget.
        N)ÚNotImplementedError)r   r   r   r   r
   r   s   s    zMWidget._create_controlc             C   s   dS )z- Set up toolkit-specific bindings for events Nr   )r   r   r   r
   r   ƒ   s    zMWidget._add_event_listenersc             C   s   dS )z- Remove toolkit-specific bindings for events Nr   )r   r   r   r
   r   ‡   s    zMWidget._remove_event_listenersN)r   r   r   r   r   r   r   r   r   r   r   r
   r   a   s
   	r   N)	r   Z
traits.apir   r   r   r   r   Úobjectr   r   r   r   r
   Ú<module>   s   L