a
    ¦ˆc¢	  ã                   @   s$   d Z ddlmZ G dd„ deƒZdS )úC The default action controller for menus, menu bars and tool bars. é    )Ú	HasTraitsc                   @   s8   e Zd ZdZdd„ Zdd„ Zdd„ Zdd	„ Zd
d„ ZdS )ÚActionControllerr   c                 C   s
   |  |¡S )ad   Control an action invocation.

        Parameters
        ----------
        action : Action instance
            The action to perform.
        event : ActionEvent instance
            The event that triggered the action.

        Returns
        -------
        result : any
            The result of the action's perform method (usually None).
        )Úperform)ÚselfÚactionÚevent© r	   úb/home/yuhw/wc/wire-cell-python/wcpy/lib/python3.9/site-packages/pyface/action/action_controller.pyr      s    zActionController.performc                 C   s   dS )a   Can add an action to a menu

        Parameters
        ----------
        action : Action instance
            The action to consider.

        Returns
        -------
        can_add : bool
            ``True`` if the action can be added to a menu/menubar.
        Tr	   ©r   r   r	   r	   r
   Úcan_add_to_menu(   s    z ActionController.can_add_to_menuc                 C   s   dS )z± Called when an action is added to the a menu/menubar.

        Parameters
        ----------
        action : Action instance
            The action added to the menu.
        Nr	   r   r	   r	   r
   Úadd_to_menu7   s    zActionController.add_to_menuc                 C   s   dS )a!   Returns True if the action can be added to a toolbar.

        Parameters
        ----------
        action : Action instance
            The action to consider.

        Returns
        -------
        can_add : bool
            ``True`` if the action can be added to a toolbar.
        Tr	   r   r	   r	   r
   Úcan_add_to_toolbarA   s    z#ActionController.can_add_to_toolbarc                 C   s   dS )z¯ Called when an action is added to the a toolbar.

        Parameters
        ----------
        action : Action instance
            The action added to the toolbar.
        Nr	   r   r	   r	   r
   Úadd_to_toolbarP   s    zActionController.add_to_toolbarN)	Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   r   r	   r	   r	   r
   r      s   
r   N)r   Z
traits.apir   r   r	   r	   r	   r
   Ú<module>
   s   