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