a
    ¦ˆc1  ã                   @   s¨   d Z ddlmZ ddlmZmZmZ G dd„ deƒZG dd„ deƒZG d	d
„ d
eƒZ	G dd„ deƒZ
G dd„ deƒZG dd„ deƒZG dd„ deƒZG dd„ deƒZdS )zl A menu that mimics the standard MDI window menu.

This is the menu that has the tile/cascade actions etc.

é    )ÚStré   )ÚMenuManagerÚ	SeparatorÚWindowActionc                   @   s(   e Zd ZdZedƒZedƒZdd„ ZdS )ÚCascadeú Cascades the windows. zCa&scadezCascade the windowsc                 C   s   | j j ¡  dS )r   N)ÚwindowÚcontrolr   ©ÚselfÚevent© r   úY/home/yuhw/wc/wire-cell-python/wcpy/lib/python3.9/site-packages/pyface/mdi_window_menu.pyÚperform$   s    zCascade.performN©Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   ÚnameZtooltipr   r   r   r   r   r      s   r   c                   @   s(   e Zd ZdZedƒZedƒZdd„ ZdS )ÚTileú! Tiles the windows horizontally. z&TilezTile the windowsc                 C   s   | j j ¡  dS )r   N)r	   r
   r   r   r   r   r   r   6   s    zTile.performNr   r   r   r   r   r   *   s   r   c                   @   s(   e Zd ZdZedƒZedƒZdd„ ZdS )ÚArrangeIconsú Arranges the icons. z&Arrange IconszArrange the iconsc                 C   s   | j j ¡  dS )r   N)r	   r
   r   r   r   r   r   r   H   s    zArrangeIcons.performNr   r   r   r   r   r   <   s   r   c                   @   s(   e Zd ZdZedƒZedƒZdd„ ZdS )ÚNextú Activates the next window. z&NextzActivate the next windowc                 C   s   | j j ¡  dS )r   N)r	   r
   ZActivateNextr   r   r   r   r   Z   s    zNext.performNr   r   r   r   r   r   N   s   r   c                   @   s(   e Zd ZdZedƒZedƒZdd„ ZdS )ÚPreviousú  Activates the previous window. z	&PreviouszActivate the previous windowc                 C   s   | j j ¡  dS )r   N)r	   r
   ZActivatePreviousr   r   r   r   r   l   s    zPrevious.performNr   r   r   r   r   r   `   s   r   c                   @   s(   e Zd ZdZedƒZedƒZdd„ ZdS )ÚCloseú Closes the current window. z&ClosezClose the current windowc                 C   s    | j j ¡ }|dur| ¡  dS )r    N)r	   r
   ZGetActiveChildr   ©r   r   Úpager   r   r   r   ~   s    zClose.performNr   r   r   r   r   r   r   s   r   c                   @   s(   e Zd ZdZedƒZedƒZdd„ ZdS )ÚCloseAllz" Closes all of the child windows. z
Close A&llzClose all of the windows.c                 C   s   | j j ¡ D ]}| ¡  qdS )z Closes the child windows. N)r	   r
   ZGetChildrenr   r!   r   r   r   r   ’   s    zCloseAll.performNr   r   r   r   r   r#   †   s   r#   c                       s    e Zd ZdZ‡ fdd„Z‡  ZS )ÚMDIWindowMenuzu A menu that mimics the standard MDI window menus.

    This is the menu that has the tile/cascade actions etc.

    c                    sN   t ƒ jt|d�t|d�tƒ t|d�t|d�t|d�t|d�t	|d�dd�	 dS )z  Creates a new MDI window menu. )r	   z&Window)r   N)
ÚsuperÚ__init__r   r   r   r   r   r   r   r#   )r   r	   ©Ú	__class__r   r   r&   ¤   s    ÷zMDIWindowMenu.__init__)r   r   r   r   r&   Ú__classcell__r   r   r'   r   r$   ™   s   
r$   N)r   Z
traits.apir   Z
action.apir   r   r   r   r   r   r   r   r   r#   r$   r   r   r   r   Ú<module>   s   