a
    ¦ˆcÑ  ã                   @   sh   d Z ddlmZmZm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 )z2 The interface of a top-level application window. é    )Ú	HasTraitsÚInstanceÚList)ÚMenuBarManagerÚStatusBarManagerÚToolBarManager)ÚIWindow)ÚImagec                   @   sf   e Zd ZdZeƒ ZeeƒZee	ƒZ
eeƒZeeƒZdd„ Zdd„ Zdd„ Zdd	„ Zd
d„ Zdd„ ZdS )ÚIApplicationWindowa   The interface for a top-level application window.

    The application window has support for a menu bar, tool bar and a status
    bar (all of which are optional).

    Usage
    -----

    Create a sub-class of this class and override the
    :py:meth:`._create_contents` method.
    c                 C   s   dS )ae   Create and return the window's contents.

        Parameters
        ----------
        parent : toolkit control
            The window's toolkit control to be used as the parent for
            widgets in the contents.

        Returns
        -------
        control : toolkit control
            A control to be used for contents of the window.
        N© ©ÚselfÚparentr   r   ú^/home/yuhw/wc/wire-cell-python/wcpy/lib/python3.9/site-packages/pyface/i_application_window.pyÚ_create_contents9   s    z#IApplicationWindow._create_contentsc                 C   s   dS )zŸ Creates the menu bar (if required).

        Parameters
        ----------
        parent : toolkit control
            The window's toolkit control.
        Nr   r   r   r   r   Ú_create_menu_barH   s    z#IApplicationWindow._create_menu_barc                 C   s   dS )z¡ Creates the status bar (if required).

        Parameters
        ----------
        parent : toolkit control
            The window's toolkit control.
        Nr   r   r   r   r   Ú_create_status_barQ   s    z%IApplicationWindow._create_status_barc                 C   s   dS )zŸ Creates the tool bar (if required).

        Parameters
        ----------
        parent : toolkit control
            The window's toolkit control.
        Nr   r   r   r   r   Ú_create_tool_barZ   s    z#IApplicationWindow._create_tool_barc                 C   s   dS ©z· Creates the 'trim' widgets (the widgets around the window).

        Parameters
        ----------
        parent : toolkit control
            The window's toolkit control.
        Nr   r   r   r   r   Ú_create_trim_widgetsc   s    z'IApplicationWindow._create_trim_widgetsc                 C   s   dS )z% Sets the window icon (if required). Nr   )r   r   r   r   Ú_set_window_iconl   s    z#IApplicationWindow._set_window_iconN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r	   Ziconr   r   Úmenu_bar_managerr   Ústatus_bar_managerr   Útool_bar_managerr   Útool_bar_managersr   r   r   r   r   r   r   r   r   r   r
      s   				r
   c                       s(   e Zd ZdZ‡ fdd„Zdd„ Z‡  ZS )ÚMApplicationWindowz¼ The mixin class that contains common code for toolkit specific
    implementations of the :py:class:`IApplicationWindow` interface.

    Implements: destroy(), _create_trim_widgets()
    c                    s^   | j dur| j  ¡  | jdur(| j ¡  | jdur<| j ¡  | jD ]}| ¡  qBtƒ  ¡  dS )z# Destroy the control if it exists. N)r   Údestroyr   r   r   Úsuper)r   r   ©Ú	__class__r   r   r    {   s    







zMApplicationWindow.destroyc                 C   s*   |   ¡  |  |¡ |  |¡ |  |¡ dS r   )r   r   r   r   r   r   r   r   r   �   s    


z'MApplicationWindow._create_trim_widgets)r   r   r   r   r    r   Ú__classcell__r   r   r"   r   r   p   s   
r   N)r   Z
traits.apir   r   r   Zpyface.action.apir   r   r   Zpyface.i_windowr   Zpyface.ui_traitsr	   r
   r   r   r   r   r   Ú<module>   s   Z