blob: c7309f2d65394d662f90f6b8fe1dc1a89c368c53 [file] [log] [blame]
/**************************************************************
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*************************************************************/
#ifndef __com_sun_star_document_XUndoManagerListener_idl__
#define __com_sun_star_document_XUndoManagerListener_idl__
#include <com/sun/star/document/UndoManagerEvent.idl>
#include <com/sun/star/lang/XEventListener.idl>
//==================================================================================================================
module com { module sun { module star { module document {
//==================================================================================================================
/** implemented by components which want to be notified of changes in the Undo/Redo stacks of an Undo manager.
@see XUndoManager
*/
published interface XUndoManagerListener : ::com::sun::star::lang::XEventListener
{
/** is called when an undo action is added to the undo stack.
<p>Note that the action must not necessarily be the new top element of the stack: In case there's an
open Undo context, <member>UndoManagerEvent::UndoContextDepth</member> will be greater <code>0</code>,
and the newly added action will be subordinate of the context action.</p>
@see XUndoManager::addUndoAction
*/
void undoActionAdded( [in] UndoManagerEvent i_event );
/** is called when the top-most action of the undo stack has been undone.
@see XUndoManager::undo
*/
void actionUndone( [in] UndoManagerEvent i_event );
/** is called when the top-most action of the Redo stack has been re-applied.
@see XUndoManager::redo
*/
void actionRedone( [in] UndoManagerEvent i_event );
/** is called when both the Undo and the Redo stack have been cleared from all Undo actions.
@see XUndoManager::clear
*/
void allActionsCleared( [in] ::com::sun::star::lang::EventObject i_event );
/** is called when the the Redo stack has been cleared.
@see XUndoManager::clearRedo
*/
void redoActionsCleared( [in] ::com::sun::star::lang::EventObject i_event );
/** called when the complete undo manager has been reset
*/
void resetAll( [in] ::com::sun::star::lang::EventObject i_event );
/** is called when a new Undo context has been entered.
<p><member>UndoManagerEvent::UndoActionTitle</member> carries the title of the Undo context, and
<member>UndoManagerEvent::UndoContextDepth</member> the number of open Undo contexts, including the
one just entered.</p>
@see XUndoManager::enterUndoContext
*/
void enteredContext( [in] UndoManagerEvent i_event );
/** is called when a new hidden Undo context has been entered.
<p><member>UndoManagerEvent::UndoActionTitle</member> carries the title of the Undo context, and
<member>UndoManagerEvent::UndoContextDepth</member> the number of open Undo contexts, including the
one just entered.</p>
@see XUndoManager::enterUndoContext
*/
void enteredHiddenContext( [in] UndoManagerEvent i_event );
/** is called when an Undo context has been left.
<p><member>UndoManagerEvent::UndoActionTitle</member> carries the title of the Undo context, and
<member>UndoManagerEvent::UndoContextDepth</member> the number of open Undo contexts, exluding the
one just left.</p>
@see XUndoManager::leaveUndoContext
@see leftHiddenUndocontext
@see cancelledContext
*/
void leftContext( [in] UndoManagerEvent i_event );
/** is calledn when a hidden Undo context has been left.
<p><member>UndoManagerEvent::UndoActionTitle</member> is empty, as hidden Undo contexts don't have
a title.</p>
@see XUndoManager::leaveHiddenUndoContext
@see leftContext
@see cancelledContext
*/
void leftHiddenContext( [in] UndoManagerEvent i_event );
/** is called when an Undo context has been left, but no actions have been added within this context.
<p>In such a case, the context which has just been left will not contribute to the undo stack, but instead
be silently removed. Consequently, the <member>UndoManagerEvent::UndoActionTitle</member> is empty.</p>
@see XUndoManager::leaveUndoContext
@see leftContext
@see leftHiddenContext
*/
void cancelledContext( [in] UndoManagerEvent i_event );
};
//==================================================================================================================
}; }; }; };
//==================================================================================================================
#endif