a
    ©ˆc   ã                   @   sT   d Z ddlmZmZmZ ddlmZ ddlmZ G dd„ deƒZ	G dd	„ d	eƒZ
d
S )z! The *definition* of a tool bar. é    )ÚInstanceÚListÚStré   )ÚGroup)ÚLocationc                       s,   e Zd ZdZ‡ fdd„Z‡ fdd„Z‡  ZS )ÚCGroupz² A trait type for a 'Group' or anything that can be cast to a 'Group'.

    Currently, the only cast allowed is from string -> Group using the
    string as the group's ID.

    c                    s   t ƒ jf dti|¤Ž dS )z Constructor. ÚklassN)ÚsuperÚ__init__r   )ÚselfÚkw©Ú	__class__© ú^/home/yuhw/wc/wire-cell-python/wcpy/lib/python3.9/site-packages/envisage/ui/action/tool_bar.pyr   !   s    zCGroup.__init__c                    s$   t |tƒrt|d�}tƒ  |||¡S )z Validate a value. )Úid)Ú
isinstanceÚstrr   r
   Úvalidate)r   ÚobjectÚnameÚvaluer   r   r   r   *   s    

zCGroup.validate)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   Ú__classcell__r   r   r   r   r      s   	r   c                   @   s@   e Zd ZdZeZeZeeƒZ	eZ
dd„ ZeZdd„ Zdd„ ZdS )	ÚToolBarz3 The *definition* of a menu in a menu bar or menu. c                 C   s
   d| j  S )z< Return the 'informal' string representation of the object. zToolBar(%s)©r   ©r   r   r   r   Ú__str__H   s    zToolBar.__str__c                 C   s   dS )ú Trait initializer. r   r   r    r   r   r   Ú_path_defaultS   s    zToolBar._path_defaultc                 C   s   | j S )r"   r   r    r   r   r   Ú_id_default\   s    zToolBar._id_defaultN)r   r   r   r   r   r   r   r   r   ÚgroupsÚ
class_namer!   Ú__repr__r#   r$   r   r   r   r   r   3   s   	r   N)r   Z
traits.apir   r   r   Úgroupr   Úlocationr   r   r   r   r   r   r   Ú<module>
   s
   