1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements.  See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership.  The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License.  You may obtain a copy of the License at
10 *
11 *   http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied.  See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21
22
23#ifndef __com_sun_star_awt_tree_XTreeDataModelListener_idl__
24#define __com_sun_star_awt_tree_XTreeDataModelListener_idl__
25
26#ifndef __com_sun_star_lang_XEventListener_idl__
27#include <com/sun/star/lang/XEventListener.idl>
28#endif
29
30#ifndef __com_sun_star_awt_tree_TreeDataModelEvent_idl__
31#include <com/sun/star/awt/tree/TreeDataModelEvent.idl>
32#endif
33
34
35//=============================================================================
36
37module com {  module sun {  module star {  module awt {  module tree {
38
39//=============================================================================
40
41/** An instance of this interface is used by the <type>TreeControl</type> to
42    get notifications about data model changes.
43
44    <p>Usually you must not implement this interface yourself as it is already handled
45    by the <type>TreeControl</type>, but you must notify it correctly if
46    you implement the <type>XTreeDataModel</type> yourself</p>.
47 */
48published interface XTreeDataModelListener: com::sun::star::lang::XEventListener
49{
50    /** Invoked after a node (or a set of siblings) has changed in some way.
51        The node(s) have not changed locations in the tree or altered their
52        children arrays, but other attributes have changed and may affect
53        presentation.
54
55        Example: the name of a file has changed, but it is in the same location in the file system.
56
57        To indicate the root has changed, <member>TreeDataModelEvent::Nodes</member> will contain
58        the root node and <member>TreeDataModelEvent::ParentNode</member> will be empty.
59    */
60    void treeNodesChanged( [in] TreeDataModelEvent Event );
61
62    /** Invoked after nodes have been inserted into the tree.
63
64        Use <member>TreeDataModelEvent::ParentNode</member> to get the parent of the new node(s).
65        <member>TreeDataModelEvent::Nodes</member> contains the new node(s).
66    */
67    void treeNodesInserted( [in] TreeDataModelEvent Event );
68
69    /** Invoked after nodes have been removed from the tree.
70        <p>Note that if a subtree is removed from the tree,
71        this method may only be invoked once for the root of the removed subtree,
72        not once for each individual set of siblings removed.
73
74        Use <member>TreeDataModelEvent::ParentNode</member> to get the former parent of the deleted node(s).
75        <member>TreeDataModelEvent::Nodes</member> contains the removed node(s).
76    */
77    void treeNodesRemoved( [in] TreeDataModelEvent Event );
78
79    /** Invoked after the tree has drastically changed structure from a given node down.
80
81        Use <member>TreeDataModelEvent::ParentNode</member> to get the node which
82        structure has changed. <member>TreeDataModelEvent::Nodes</member> is empty.
83    */
84    void treeStructureChanged( [in] TreeDataModelEvent Event );
85};
86
87//=============================================================================
88
89}; }; }; }; };
90
91#endif
92