3
7฿L]N  ใ               @   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 )ฺCascadez Cascades the windows. zCa&scadezCascade the windowsc             C   s   | j jj  dS )z Cascades the windows. N)ฺwindowฺcontrolr   )ฺselfฺeventฉ r   ๚:/tmp/pip-install-5sebvq2j/pyface/pyface/mdi_window_menu.pyฺperform(   s    zCascade.performN)ฺ__name__ฺ
__module__ฺ__qualname__ฺ__doc__r   ฺnameฺ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 )ฺTilez! Tiles the windows horizontally. z&TilezTile the windowsc             C   s   | j jj  dS )z! Tiles the windows horizontally. N)r   r	   r   )r
   r   r   r   r   r   ;   s    zTile.performN)r   r   r   r   r   r   r   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 )ฺArrangeIconsz Arranges the icons. z&Arrange IconszArrange the iconsc             C   s   | j jj  dS )z Arranges the icons. N)r   r	   r   )r
   r   r   r   r   r   N   s    zArrangeIcons.performN)r   r   r   r   r   r   r   r   r   r   r   r   r   B   s   r   c               @   s(   e Zd ZdZedZedZdd ZdS )ฺNextz Activates the next window. z&NextzActivate the next windowc             C   s   | j jj  dS )z Activates the next window. N)r   r	   ZActivateNext)r
   r   r   r   r   r   a   s    zNext.performN)r   r   r   r   r   r   r   r   r   r   r   r   r   U   s   r   c               @   s(   e Zd ZdZedZedZdd ZdS )ฺPreviousz  Activates the previous window. z	&PreviouszActivate the previous windowc             C   s   | j jj  dS )z  Activates the previous window. N)r   r	   ZActivatePrevious)r
   r   r   r   r   r   t   s    zPrevious.performN)r   r   r   r   r   r   r   r   r   r   r   r   r   h   s   r   c               @   s(   e Zd ZdZedZedZdd ZdS )ฺClosez Closes the current window. z&ClosezClose the current windowc             C   s    | j jj }|dk	r|j  dS )z Closes the current window. N)r   r	   ZGetActiveChildr   )r
   r   ฺpager   r   r   r      s    zClose.performN)r   r   r   r   r   r   r   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"   x| j jj D ]}|j  qW dS )z Closes the child windows. N)r   r	   ZGetChildrenr   )r
   r   r   r   r   r   r      s    zCloseAll.performN)r   r   r   r   r   r   r   r   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                sR   t 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)ฺsuperr   ฺ__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   