diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:06:44 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:06:44 +0000 |
commit | ed5640d8b587fbcfed7dd7967f3de04b37a76f26 (patch) | |
tree | 7a5f7c6c9d02226d7471cb3cc8fbbf631b415303 /offapi/com/sun/star/document/XUndoManagerListener.idl | |
parent | Initial commit. (diff) | |
download | libreoffice-upstream.tar.xz libreoffice-upstream.zip |
Adding upstream version 4:7.4.7.upstream/4%7.4.7upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | offapi/com/sun/star/document/XUndoManagerListener.idl | 136 |
1 files changed, 136 insertions, 0 deletions
diff --git a/offapi/com/sun/star/document/XUndoManagerListener.idl b/offapi/com/sun/star/document/XUndoManagerListener.idl new file mode 100644 index 000000000..449737b72 --- /dev/null +++ b/offapi/com/sun/star/document/XUndoManagerListener.idl @@ -0,0 +1,136 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * 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 . + */ + +#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 + @since OOo 3.4 + */ +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, UndoManagerEvent::UndoContextDepth 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 iEvent ); + + /** is called when the top-most action of the undo stack has been undone. + + @see XUndoManager::undo + */ + void actionUndone( [in] UndoManagerEvent iEvent ); + + /** is called when the top-most action of the Redo stack has been re-applied. + + @see XUndoManager::redo + */ + void actionRedone( [in] UndoManagerEvent iEvent ); + + /** 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 iEvent ); + + /** is called when the Redo stack has been cleared. + + @see XUndoManager::clearRedo + */ + void redoActionsCleared( [in] ::com::sun::star::lang::EventObject iEvent ); + + /** called when the complete undo manager has been reset + */ + void resetAll( [in] ::com::sun::star::lang::EventObject iEvent ); + + /** is called when a new Undo context has been entered. + + <p>UndoManagerEvent::UndoActionTitle carries the title of the Undo context, and + UndoManagerEvent::UndoContextDepth the number of open Undo contexts, including the + one just entered.</p> + + @see XUndoManager::enterUndoContext + */ + void enteredContext( [in] UndoManagerEvent iEvent ); + + /** is called when a new hidden Undo context has been entered. + + <p>UndoManagerEvent::UndoActionTitle carries the title of the Undo context, and + UndoManagerEvent::UndoContextDepth the number of open Undo contexts, including the + one just entered.</p> + + @see XUndoManager::enterUndoContext + */ + void enteredHiddenContext( [in] UndoManagerEvent iEvent ); + + /** is called when an Undo context has been left. + + <p>UndoManagerEvent::UndoActionTitle carries the title of the Undo context, and + UndoManagerEvent::UndoContextDepth the number of open Undo contexts, excluding the + one just left.</p> + + @see XUndoManager::leaveUndoContext + @see leftHiddenUndocontext + @see cancelledContext + */ + void leftContext( [in] UndoManagerEvent iEvent ); + + /** is called when a hidden Undo context has been left. + + <p>UndoManagerEvent::UndoActionTitle is empty, as hidden Undo contexts don't have + a title.</p> + + @see XUndoManager::leaveHiddenUndoContext + @see leftContext + @see cancelledContext + */ + void leftHiddenContext( [in] UndoManagerEvent iEvent ); + + /** 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 UndoManagerEvent::UndoActionTitle is empty.</p> + + @see XUndoManager::leaveUndoContext + @see leftContext + @see leftHiddenContext + */ + void cancelledContext( [in] UndoManagerEvent iEvent ); +}; + + +}; }; }; }; + + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |