3
6ßL]  ã               @   s(   d dl mZmZmZ G dd„ deƒZdS )é    )ÚAnyÚ	InterfaceÚUnicodec               @   s8   e Zd ZdZeZeZdd„ Zdd„ Z	dd„ Z
dd	„ Zd
S )ÚICommandzÄ The command interface.  The state of the data can be changed by passing
    an instance that implements this interface to the 'push()' method of a
    command stack along with any arguments.
    c             C   s   dS )a¼   This is called by the command stack to do the command and to return
        any value.  The command must save any state necessary for the 'redo()'
        and 'undo()' methods to work.  The class's __init__() must also ensure
        that deep copies of any arguments are made if appropriate.  It is
        guaranteed that this will only ever be called once and that it will be
        called before any call to 'redo()' or 'undo()'.
        N© )Úselfr   r   ú=/tmp/pip-install-5sebvq2j/apptools/apptools/undo/i_command.pyÚdo(   s    zICommand.doc             C   s   dS )a²   This is called by the command stack to try and merge another
        command with this one.  True is returned if the commands were merged.
        'other' is the command that is about to be executed.  If the commands
        are merged then 'other' will discarded and not placed on the command
        stack.  A subsequent undo or redo of this modified command must have
        the same effect as the two original commands.
        Nr   )r   Úotherr   r   r   Úmerge1   s    zICommand.mergec             C   s   dS )zÞ This is called by the command stack to redo the command.  Any
        returned value will replace the value that the command stack references
        from the original call to 'do()' or previous call to 'redo()'.
        Nr   )r   r   r   r   Úredo:   s    zICommand.redoc             C   s   dS )z: This is called by the command stack to undo the command. Nr   )r   r   r   r   Úundo@   s    zICommand.undoN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   Údatar   Únamer	   r   r   r   r   r   r   r   r      s   		r   N)Z
traits.apir   r   r   r   r   r   r   r   Ú<module>   s   