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
24#ifndef __com_sun_star_awt_tree_XTreeEditListener_idl__
25#define __com_sun_star_awt_tree_XTreeEditListener_idl__
26
27#ifndef __com_sun_star_awt_tree_XTreeNode_idl__
28#include <com/sun/star/awt/tree/XTreeNode.idl>
29#endif
30
31#ifndef __com_sun_star_lang_XEventListener_idl__
32#include <com/sun/star/lang/XEventListener.idl>
33#endif
34
35#ifndef __com_sun_star_util_VetoException_idl__
36#include <com/sun/star/util/VetoException.idl>
37#endif
38
39//=============================================================================
40
41module com { module sun { module star { module awt { module tree {
42
43//=============================================================================
44
45/** You can implement this interface and register with <method scope="XTreeControl">addTreeEditListener</method>
46    to get notifications when editing of a node starts and ends.
47
48    <p>You have to set the <member>TreeControlModel::Editable</member> property to
49    <TRUE/> before a tree supports editing.</p>
50 */
51published interface XTreeEditListener : ::com::sun::star::lang::XEventListener
52{
53    /** This method is called from the <type>TreeControl</type> implementation when editing of
54        <var>Node</var> is requested by calling <member>XTreeControl::startEditingAtNode()</member>.
55
56        @param Node
57            the <type>XTreeNode</type> for that an edit request was fired by calling
58            <method scope="XTreeControl">startEditingAtNode</method>
59
60        @throws VetoException
61            if thrown the editing will not start.
62    */
63    void nodeEditing( [in] XTreeNode Node )
64        raises ( ::com::sun::star::util::VetoException );
65
66    /** This method is called from the <type>TreeControl</type> implementation when editing
67        of <var>Node</var> is finished and was not canceled.
68
69        <p>Implementations that register a <type>XTreeEditListener</type> must update the
70        display value at the Node.</p>
71
72        @param Node
73            the <type>XTreeNode</type> for that an edit request was fired by calling
74            <method scope="XTreeControl">startEditingAtNode</method>
75
76        @param NewText
77            the text that was entered by the user.
78    */
79    void nodeEdited( [in] XTreeNode Node, [in] string NewText );
80};
81
82//=============================================================================
83
84}; }; }; }; };
85
86#endif
87