1/************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27#ifndef __com_sun_star_awt_tree_XTreeDataModelListener_idl__ 28#define __com_sun_star_awt_tree_XTreeDataModelListener_idl__ 29 30#ifndef __com_sun_star_lang_XEventListener_idl__ 31#include <com/sun/star/lang/XEventListener.idl> 32#endif 33 34#ifndef __com_sun_star_awt_tree_TreeDataModelEvent_idl__ 35#include <com/sun/star/awt/tree/TreeDataModelEvent.idl> 36#endif 37 38 39//============================================================================= 40 41module com { module sun { module star { module awt { module tree { 42 43//============================================================================= 44 45/** An instance of this interface is used by the <type>TreeControl</type> to 46 get notifications about data model changes. 47 48 <p>Usually you must not implement this interface yourself as it is already handled 49 by the <type>TreeControl</type>, but you must notify it correctly if 50 you implement the <type>XTreeDataModel</type> yourself</p>. 51 */ 52published interface XTreeDataModelListener: com::sun::star::lang::XEventListener 53{ 54 /** Invoked after a node (or a set of siblings) has changed in some way. 55 The node(s) have not changed locations in the tree or altered their 56 children arrays, but other attributes have changed and may affect 57 presentation. 58 59 Example: the name of a file has changed, but it is in the same location in the file system. 60 61 To indicate the root has changed, <member>TreeDataModelEvent::Nodes</member> will contain 62 the root node and <member>TreeDataModelEvent::ParentNode</member> will be empty. 63 */ 64 void treeNodesChanged( [in] TreeDataModelEvent Event ); 65 66 /** Invoked after nodes have been inserted into the tree. 67 68 Use <member>TreeDataModelEvent::ParentNode</member> to get the parent of the new node(s). 69 <member>TreeDataModelEvent::Nodes</member> contains the new node(s). 70 */ 71 void treeNodesInserted( [in] TreeDataModelEvent Event ); 72 73 /** Invoked after nodes have been removed from the tree. 74 <p>Note that if a subtree is removed from the tree, 75 this method may only be invoked once for the root of the removed subtree, 76 not once for each individual set of siblings removed. 77 78 Use <member>TreeDataModelEvent::ParentNode</member> to get the former parent of the deleted node(s). 79 <member>TreeDataModelEvent::Nodes</member> contains the removed node(s). 80 */ 81 void treeNodesRemoved( [in] TreeDataModelEvent Event ); 82 83 /** Invoked after the tree has drastically changed structure from a given node down. 84 85 Use <member>TreeDataModelEvent::ParentNode</member> to get the node which 86 structure has changed. <member>TreeDataModelEvent::Nodes</member> is empty. 87 */ 88 void treeStructureChanged( [in] TreeDataModelEvent Event ); 89}; 90 91//============================================================================= 92 93}; }; }; }; }; 94 95#endif 96