a
    ¦ˆc1  ã                   @   sL   d Z ddlZddlmZmZmZmZmZ G dd„ deƒZG dd„ deƒZ	dS )zµ Interace and mixins for layered panels.

A layered panel contains one or more named layers, with only one layer
visible at any one time (think of a 'tab' control minus the tabs!).
é    N)ÚAnyÚDictÚ	HasTraitsÚ	InterfaceÚStrc                   @   s4   e Zd ZdZeƒ Zeƒ Zdd„ Zdd„ Z	dd„ Z
dS )	ÚILayeredPanelzÚ A Layered panel.

    A layered panel contains one or more named layers, with only one layer
    visible at any one time (think of a 'tab' control minus the tabs!).  Each
    layer is a toolkit-specific control.

    c                 C   s   dS )z— Adds a layer with the specified name.

        All layers are hidden when they are added.  Use 'show_layer' to make a
        layer visible.

        N© )ÚselfÚnameZlayerr   r   úY/home/yuhw/wc/wire-cell-python/wcpy/lib/python3.9/site-packages/pyface/i_layered_panel.pyÚ	add_layer+   s    zILayeredPanel.add_layerc                 C   s   dS )z* Shows the layer with the specified name. Nr   ©r	   r
   r   r   r   Ú
show_layer3   s    zILayeredPanel.show_layerc                 C   s   dS )ú9 Does the panel contain a layer with the specified name? Nr   r   r   r   r   Ú	has_layer6   s    zILayeredPanel.has_layerN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   Úcurrent_layerr   Úcurrent_layer_namer   r   r   r   r   r   r   r      s   r   c                       s>   e Zd ZdZeƒ Zeƒ ZeeƒZ	dd„ Z
d‡ fdd„	Z‡  ZS )ÚMLayeredPanelzß A Layered panel mixin.

    A layered panel contains one or more named layers, with only one layer
    visible at any one time (think of a 'tab' control minus the tabs!).  Each
    layer is a toolkit-specific control.
    c                 C   s
   || j v S )r   )Ú_layersr   r   r   r   r   S   s    zMLayeredPanel.has_layerNc                    s>   |  dd¡}tƒ jf d|i|¤Ž |r:|  ¡  t dt¡ dS )z Creates a new LayeredPanel. ÚcreateTÚparentzšautomatic widget creation is deprecated and will be removed in a future Pyface version, use create=False and explicitly call create() for future behaviourN)ÚpopÚsuperÚ__init__r   ÚwarningsÚwarnÚPendingDeprecationWarning)r	   r   Ztraitsr   ©Ú	__class__r   r   r   [   s    üzMLayeredPanel.__init__)N)r   r   r   r   r   r   r   r   r   r   r   r   Ú__classcell__r   r   r!   r   r   :   s   
r   )
r   r   Z
traits.apir   r   r   r   r   r   r   r   r   r   r   Ú<module>   s   $