summaryrefslogtreecommitdiffstats
path: root/offapi/com/sun/star/awt/tree
diff options
context:
space:
mode:
Diffstat (limited to 'offapi/com/sun/star/awt/tree')
-rw-r--r--offapi/com/sun/star/awt/tree/ExpandVetoException.idl44
-rw-r--r--offapi/com/sun/star/awt/tree/MutableTreeDataModel.idl41
-rw-r--r--offapi/com/sun/star/awt/tree/MutableTreeNode.idl39
-rw-r--r--offapi/com/sun/star/awt/tree/TreeControl.idl86
-rw-r--r--offapi/com/sun/star/awt/tree/TreeControlModel.idl97
-rw-r--r--offapi/com/sun/star/awt/tree/TreeDataModelEvent.idl54
-rw-r--r--offapi/com/sun/star/awt/tree/TreeExpansionEvent.idl45
-rw-r--r--offapi/com/sun/star/awt/tree/XMutableTreeDataModel.idl71
-rw-r--r--offapi/com/sun/star/awt/tree/XMutableTreeNode.idl109
-rw-r--r--offapi/com/sun/star/awt/tree/XTreeControl.idl269
-rw-r--r--offapi/com/sun/star/awt/tree/XTreeDataModel.idl72
-rw-r--r--offapi/com/sun/star/awt/tree/XTreeDataModelListener.idl82
-rw-r--r--offapi/com/sun/star/awt/tree/XTreeEditListener.idl72
-rw-r--r--offapi/com/sun/star/awt/tree/XTreeExpansionListener.idl76
-rw-r--r--offapi/com/sun/star/awt/tree/XTreeNode.idl92
15 files changed, 1249 insertions, 0 deletions
diff --git a/offapi/com/sun/star/awt/tree/ExpandVetoException.idl b/offapi/com/sun/star/awt/tree/ExpandVetoException.idl
new file mode 100644
index 000000000..cf792059e
--- /dev/null
+++ b/offapi/com/sun/star/awt/tree/ExpandVetoException.idl
@@ -0,0 +1,44 @@
+/* -*- 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_awt_tree_ExpandVetoException_idl__
+#define __com_sun_star_awt_tree_ExpandVetoException_idl__
+
+#include <com/sun/star/util/VetoException.idl>
+#include <com/sun/star/awt/tree/TreeExpansionEvent.idl>
+
+
+module com { module sun { module star { module awt { module tree {
+
+
+/** Exception used to stop an expand/collapse from happening.
+ @see XTreeExpansionListener
+ @see XTreeControl
+ */
+exception ExpandVetoException : com::sun::star::util::VetoException
+{
+ /** The event that the exception was created for. */
+ TreeExpansionEvent Event;
+};
+
+
+}; }; }; }; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/awt/tree/MutableTreeDataModel.idl b/offapi/com/sun/star/awt/tree/MutableTreeDataModel.idl
new file mode 100644
index 000000000..5901dd8e9
--- /dev/null
+++ b/offapi/com/sun/star/awt/tree/MutableTreeDataModel.idl
@@ -0,0 +1,41 @@
+/* -*- 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_awt_tree_MutableTreeDataModel_idl__
+#define __com_sun_star_awt_tree_MutableTreeDataModel_idl__
+
+#include <com/sun/star/awt/tree/XMutableTreeDataModel.idl>
+#include <com/sun/star/awt/tree/XMutableTreeNode.idl>
+
+
+module com { module sun { module star { module awt { module tree {
+
+
+/** If you do not want to implement the XTreeDataModel yourself, use this service.
+ This implementation uses MutableTreeNode for its nodes.
+ */
+service MutableTreeDataModel : XMutableTreeDataModel
+{
+};
+
+
+}; }; }; }; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/awt/tree/MutableTreeNode.idl b/offapi/com/sun/star/awt/tree/MutableTreeNode.idl
new file mode 100644
index 000000000..646f4de25
--- /dev/null
+++ b/offapi/com/sun/star/awt/tree/MutableTreeNode.idl
@@ -0,0 +1,39 @@
+/* -*- 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_awt_tree_MutableTreeNode_idl__
+#define __com_sun_star_awt_tree_MutableTreeNode_idl__
+
+#include <com/sun/star/awt/tree/XMutableTreeNode.idl>
+
+
+module com { module sun { module star { module awt { module tree {
+
+
+/** Represents an editable tree node as used by the MutableTreeDataModel
+ */
+service MutableTreeNode : XMutableTreeNode
+{
+};
+
+
+}; }; }; }; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/awt/tree/TreeControl.idl b/offapi/com/sun/star/awt/tree/TreeControl.idl
new file mode 100644
index 000000000..084474977
--- /dev/null
+++ b/offapi/com/sun/star/awt/tree/TreeControl.idl
@@ -0,0 +1,86 @@
+/* -*- 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_awt_tree_TreeControl_idl__
+#define __com_sun_star_awt_tree_TreeControl_idl__
+
+#include <com/sun/star/awt/tree/XTreeControl.idl>
+
+
+module com { module sun { module star { module awt { module tree {
+
+
+/** A control that displays a set of hierarchical data as an outline.
+
+ <p>
+ <h4>The Data Model</h4>
+ <p>A specific node in a tree is identified by a XTreeNode.
+ A leaf node is a node without any children and that returns `FALSE` when calling XTreeNode::hasChildrenOnDemand().
+ An expanded node is a non-leaf node that will displays its children when all its ancestors are expanded.
+ A collapsed node is one which hides them.
+ A node is visible when all parent nodes are expanded and the node itself is in the display area.
+ </p>
+
+ <p>The nodes are retrieved from a XTreeDataModel.
+ You can implement it yourself or use the MutableTreeDataModel
+ which uses XMutableTreeNode and XMutableTreeDataModel
+ for a simple and mutable data model.
+
+ <p>The data model must be set at the TreeControlModel::TreeDataModel property.</p>
+
+ <h4>Selection</h4>
+ <p>If you are interested in knowing when the selection changes implement a
+ com::sun::star::view::XSelectionChangeListener and add the instance with the method
+ ::com::sun::star::view::XSelectionSupplier::addSelectionChangeListener().
+ You than will be notified for any selection change.
+ </p>
+
+ <p>
+ If you are interested in detecting either double-click events or when a user clicks on a node,
+ regardless of whether or not it was selected, you can get the com::sun::star::awt::XWindow
+ and add yourself as a com::sun::star::awt::XMouseClickHandler. You can use the
+ method XTreeControl::getNodeForLocation() to retrieve the node that was under the
+ mouse at the time the event was fired.
+ </p>
+
+ <h4>Adding child nodes on demand</h4>
+ <p>If you want to add child nodes to your tree on demand you can do the following.
+ <ul>
+ <li>Make sure the parent node returns `TRUE` for XTreeNode::hasChildrenOnDemand() either
+ by implementing XTreeNode yourself or if you use the MutableTreeDataModel,
+ use XMutableTreeNode::setHasChildrenOnDemand().</li>
+ <li>Implement a XTreeExpansionListener and add the instance with the method
+ XTreeControl::addTreeExpansionListener().</li>
+ </ul>
+ Now you get called when the node will become expanded or collapsed.
+ So on XTreeExpansionListener::treeExpanding() you can
+ check the TreeExpansionEvent if the parent node with children on demand is going to
+ be expanded and in that case add the missing child nodes. You can also veto the expansion or
+ collapsing of a parent node by using the ExpandVetoException.
+ </p>
+ */
+service TreeControl: XTreeControl
+{
+};
+
+
+}; }; }; }; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/awt/tree/TreeControlModel.idl b/offapi/com/sun/star/awt/tree/TreeControlModel.idl
new file mode 100644
index 000000000..018df931f
--- /dev/null
+++ b/offapi/com/sun/star/awt/tree/TreeControlModel.idl
@@ -0,0 +1,97 @@
+/* -*- 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_awt_tree_TreeControlModel_idl__
+#define __com_sun_star_awt_tree_TreeControlModel_idl__
+
+#include <com/sun/star/awt/tree/XTreeDataModel.idl>
+#include <com/sun/star/awt/UnoControlModel.idl>
+#include <com/sun/star/view/SelectionType.idl>
+
+
+module com { module sun { module star { module awt { module tree {
+
+
+/** specifies the standard model of a TreeControl.
+ */
+service TreeControlModel
+{
+ /** specifies the standard model of a com::sun::star::awt::UnoControl. */
+ service ::com::sun::star::awt::UnoControlModel;
+
+ /** Specifies the selection mode that is enabled for this tree.
+ <p>The default value is com::sun::star::view::SelectionType::NONE</p>
+ */
+ [property] ::com::sun::star::view::SelectionType SelectionType;
+
+ /** Specifies the XTreeDataModel that is providing the hierarchical data.
+
+ <p>You can implement your own instance of XTreeDataModel or use
+ the MutableTreeDataModel.
+ */
+ [property] XTreeDataModel DataModel;
+
+ /** Specifies if the root node of the tree is displayed.
+ <p>If <var>RootDisplayed</var> is set to `FALSE`, the root node of a model is no longer
+ a valid node for the XTreeControl and can't be used with any method of
+ XTreeControl.
+ <p>The default value is `TRUE`</p>
+ */
+ [property] boolean RootDisplayed;
+
+ /** Specifies whether the node handles should be displayed.
+ <p>The handles are doted lines that visualize the tree like hierarchy<p>
+ <p>The default value is `TRUE`</p>
+ */
+ [property] boolean ShowsHandles;
+
+ /** Specifies whether the node handles should also be displayed at root level.
+ <p>The default value is `TRUE`</p>
+ */
+ [property] boolean ShowsRootHandles;
+
+ /** Specifies the height of each row, in pixels.
+ <p>If the specified value is less than or equal to zero, the row height is the maximum height
+ of all rows.</p>
+ <p>The default value is 0</p>
+ */
+ [property] long RowHeight;
+
+ /** Specifies whether the nodes of the tree are editable.
+ <p>The default value is `FALSE`</p>
+
+ @see XTreeControl::startEditingAtNode()
+ @see XTreeEditListener
+ */
+ [property] boolean Editable;
+
+ /** Specifies what happens when editing is interrupted by selecting another node in the tree,
+ a change in the tree's data, or by some other means.
+ <p>Setting this property to `TRUE` causes the changes to be automatically saved when editing
+ is interrupted. `FALSE` means that editing is canceled and changes are lost
+ <p>The default value is `FALSE`</p>
+ */
+ [property] boolean InvokesStopNodeEditing;
+};
+
+
+}; }; }; }; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/awt/tree/TreeDataModelEvent.idl b/offapi/com/sun/star/awt/tree/TreeDataModelEvent.idl
new file mode 100644
index 000000000..c84f3ebee
--- /dev/null
+++ b/offapi/com/sun/star/awt/tree/TreeDataModelEvent.idl
@@ -0,0 +1,54 @@
+/* -*- 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_awt_tree_TreeDataModelEvent_idl__
+#define __com_sun_star_awt_tree_TreeDataModelEvent_idl__
+
+#include <com/sun/star/lang/EventObject.idl>
+#include <com/sun/star/awt/tree/XTreeNode.idl>
+
+
+module com { module sun { module star { module awt { module tree {
+
+
+/** An event used by a XTreeDataModel to notify changes in the data
+ model to the XTreeControl.
+ You usually need to fill this event only if you implement the XTreeDataModel
+ yourself.
+
+ @see XTreeDataModel
+ @see XTreeControl
+ @see XTreeDataModelListener
+ */
+struct TreeDataModelEvent : ::com::sun::star::lang::EventObject
+{
+ /** contains the changed, added or removed nodes.
+ <p> All nodes must have #ParentNode as parent. */
+ sequence< XTreeNode > Nodes;
+
+ /** holds the parent node for changed, added or removed nodes.
+ <p> If this is null, #Nodes must contain only the root node */
+ XTreeNode ParentNode;
+};
+
+
+}; }; }; }; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/awt/tree/TreeExpansionEvent.idl b/offapi/com/sun/star/awt/tree/TreeExpansionEvent.idl
new file mode 100644
index 000000000..61238eda9
--- /dev/null
+++ b/offapi/com/sun/star/awt/tree/TreeExpansionEvent.idl
@@ -0,0 +1,45 @@
+/* -*- 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_awt_tree_TreeExpansionEvent_idl__
+#define __com_sun_star_awt_tree_TreeExpansionEvent_idl__
+
+#include <com/sun/star/lang/EventObject.idl>
+#include <com/sun/star/awt/tree/XTreeNode.idl>
+
+
+module com { module sun { module star { module awt { module tree {
+
+
+/** This event tells you what node is currently expanding or collapsing.
+
+ @see XTreeExpansionListener
+ @see XTreeControl
+ */
+struct TreeExpansionEvent : ::com::sun::star::lang::EventObject
+{
+ /* The node that has been expanded/collapsed.*/
+ com::sun::star::awt::tree::XTreeNode Node;
+};
+
+
+}; }; }; }; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/awt/tree/XMutableTreeDataModel.idl b/offapi/com/sun/star/awt/tree/XMutableTreeDataModel.idl
new file mode 100644
index 000000000..1bdf94273
--- /dev/null
+++ b/offapi/com/sun/star/awt/tree/XMutableTreeDataModel.idl
@@ -0,0 +1,71 @@
+/* -*- 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_awt_tree_XMutableTreeDataModel_idl__
+#define __com_sun_star_awt_tree_XMutableTreeDataModel_idl__
+
+#include <com/sun/star/awt/tree/XTreeDataModel.idl>
+#include <com/sun/star/awt/tree/XMutableTreeNode.idl>
+
+
+module com { module sun { module star { module awt { module tree {
+
+
+/** This is the editable version of the XTreeDataModel.
+
+ <p>Note that only XTreeNode created from the same instance with createNode()
+ are valid nodes for this instance.</p>
+ */
+interface XMutableTreeDataModel : XTreeDataModel
+{
+ /** creates a new tree node with the given value and given settings.
+
+ @param DisplayValue
+ should be convertible to a string and is used by the XTreeControl
+ as a textual representation of the created node.
+
+ @param ChildrenOnDemand
+ if `TRUE` is used as a parameter, the created node will be treated as a non-leaf
+ node by the XTreeControl, even when it has no child nodes.
+
+ @returns
+ a new XMutableTreeNode that can be used for this model.
+
+ @see XTreeNode::getDisplayValue()
+ @see XTreeNode::hasChildrenOnDemand()
+ */
+ XMutableTreeNode createNode( [in] any DisplayValue, [in] boolean ChildrenOnDemand );
+
+ /** changes the root node of this model to <var>RootNode</var>.
+
+ @param RootNode
+ the XMutableTreeNode that becomes the new root node of this model.
+
+ @throws ::com::sun::star::lang::IllegalArgumentException
+ if <var>RootNode</var> is not a valid node of this XTreeDataModel.
+ */
+ void setRoot( [in] XMutableTreeNode RootNode )
+ raises( ::com::sun::star::lang::IllegalArgumentException );
+};
+
+
+}; }; }; }; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/awt/tree/XMutableTreeNode.idl b/offapi/com/sun/star/awt/tree/XMutableTreeNode.idl
new file mode 100644
index 000000000..72529350a
--- /dev/null
+++ b/offapi/com/sun/star/awt/tree/XMutableTreeNode.idl
@@ -0,0 +1,109 @@
+/* -*- 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_awt_tree_XMutableTreeNode_idl__
+#define __com_sun_star_awt_tree_XMutableTreeNode_idl__
+
+#include <com/sun/star/awt/tree/XTreeNode.idl>
+#include <com/sun/star/lang/IllegalArgumentException.idl>
+
+#include <com/sun/star/lang/IndexOutOfBoundsException.idl>
+
+
+module com { module sun { module star { module awt { module tree {
+
+
+/** Represents a mutable tree node as used by the MutableTreeDataModel
+ */
+interface XMutableTreeNode : XTreeNode
+{
+ /** appends <var>ChildNode</var> to this instance.
+
+ @throws ::com::sun::star::lang::IllegalArgumentException
+ if <var>ChildNode</var> is not a valid node of the corresponding XTreeDataModel.
+ */
+ void appendChild( [in] XMutableTreeNode ChildNode )
+ raises( com::sun::star::lang::IllegalArgumentException );
+
+ /** inserts <var>ChildNode</var> to this instance at the given index.
+
+ @param Index
+ the index where the node will be inserted to this instance.
+
+ @param ChildNode
+ the node to insert.
+
+ @throws ::com::sun::star::lang::IllegalArgumentException
+ if <var>ChildNode</var> is not a valid node of the corresponding XTreeDataModel.
+
+ @throws ::com::sun::star::lang::IndexOutOfBoundsException
+ if <var>Index</var> is less than 0 or greater than XTreeNode::getChildCount().
+ */
+ void insertChildByIndex( [in] long Index, [in] XMutableTreeNode ChildNode )
+ raises( com::sun::star::lang::IllegalArgumentException,
+ com::sun::star::lang::IndexOutOfBoundsException );
+
+ /** removes the node from this instance at the specified index.
+
+ @param Index
+ the index of the node to be removed from this instance.
+
+ @throws ::com::sun::star::lang::IndexOutOfBoundsException
+ if <var>Index</var> is less than 0 or greater than XTreeNode::getChildCount().
+ */
+ void removeChildByIndex( [in] long Index )
+ raises( com::sun::star::lang::IndexOutOfBoundsException );
+
+ /** Changes if the children of this node are created on demand.
+
+ @see XTreeNode::hasChildrenOnDemand()
+ */
+ void setHasChildrenOnDemand( [in] boolean ChildrenOnDemand );
+
+ /** sets the display value of this node */
+ void setDisplayValue( [in] any Value );
+
+ /** Stores an implementation dependent value.
+
+ <p>You can use this attribute to store data for this node that
+ is independent of the display value</p>
+ */
+ [attribute] any DataValue;
+
+ /** The URL for a graphic that is rendered before the text part of this node.
+ <p>If this URL is empty, no graphic is rendered.
+ */
+ void setNodeGraphicURL( [in] string URL );
+
+ /** The URL for a graphic that is rendered to visualize expanded non leaf nodes.
+ <p>If <var>URL</var> is empty, XTreeControl::DefaultExpandedGraphicURL is used.
+ */
+ void setExpandedGraphicURL( [in] string URL );
+
+ /** The URL for a graphic that is rendered to visualize collapsed non leaf nodes.
+ <p>If <var>URL</var> is empty, XTreeControl::DefaultCollapsedGraphicURL is used.
+ */
+ void setCollapsedGraphicURL( [in] string URL );
+};
+
+
+}; }; }; }; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/awt/tree/XTreeControl.idl b/offapi/com/sun/star/awt/tree/XTreeControl.idl
new file mode 100644
index 000000000..657f27677
--- /dev/null
+++ b/offapi/com/sun/star/awt/tree/XTreeControl.idl
@@ -0,0 +1,269 @@
+/* -*- 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_awt_tree_XTreeControl_idl__
+#define __com_sun_star_awt_tree_XTreeControl_idl__
+
+#include <com/sun/star/awt/XControl.idl>
+#include <com/sun/star/awt/tree/XTreeExpansionListener.idl>
+#include <com/sun/star/view/XMultiSelectionSupplier.idl>
+#include <com/sun/star/awt/tree/XTreeEditListener.idl>
+
+
+module com { module sun { module star { module awt { module tree {
+
+
+/** An interface to a control that displays a set of hierarchical data as an outline.
+
+ @see TreeControl
+ */
+interface XTreeControl
+{
+ /** This interfaces provides access to the selection of tree nodes for this control.
+
+ <p>valid selection values for this interface are
+ XTreeNode or sequence&lt;XTreeNode&gt;.</p>
+
+ ::com::sun::star::view::XSelectionSupplier::getSelection()
+ returns an empty any for no selection, an any with XTreeNode for
+ a single selection and a sequence&lt;XTreeNode&gt; for a multiselection.
+ */
+ interface ::com::sun::star::view::XMultiSelectionSupplier;
+
+ // expanding/collapsing/visible
+
+ /** Returns `TRUE` if <var>Node</var> is currently expanded.
+
+ @param Node
+ the XTreeNode specifying the node to check.
+
+ @returns
+ `FALSE` if <var>Node</var> or at least one of its parent nodes are collapsed,
+ `TRUE` if <var>Node</var> and all of its parent nodes are expanded.
+
+ @throws ::com::sun::star::lang::IllegalArgumentException
+ if <var>Node</var> is not a valid node of the corresponding XTreeDataModel.
+ */
+ boolean isNodeExpanded( [in] XTreeNode Node )
+ raises( ::com::sun::star::lang::IllegalArgumentException );
+
+ /** Returns `TRUE` if <var>Node</var> is currently collapsed.
+
+ @param Node
+ the XTreeNode specifying the node to check
+
+ @returns
+ `TRUE` if <var>Node</var> or at least one of its parent nodes are collapsed,
+ `FALSE` if <var>Node</var> and all of its parent nodes are expanded
+
+ @throws ::com::sun::star::lang::IllegalArgumentException
+ if <var>Node</var> is not a valid node of the corresponding XTreeDataModel.
+ */
+ boolean isNodeCollapsed( [in] XTreeNode Node )
+ raises( ::com::sun::star::lang::IllegalArgumentException );
+
+ /** Ensures that <var>Node</var> is currently visible.
+ <p>This includes expanding all parent nodes and scroll the control so this
+ node is visible in the controls display area.</p>
+
+ @param Node
+ the XTreeNode specifying the node to make visible.
+
+ @throws ::com::sun::star::lang::IllegalArgumentException
+ if <var>Node</var> is not a valid node of the corresponding XTreeDataModel.
+
+ @throws ExpandVetoException
+ if <var>Node</var>can't be made visible since at least one of the parent nodes are
+ collapsed and expanding failed because at least one of the registered
+ XTreeExpansionListener raised an ExpandVetoException.
+ */
+ void makeNodeVisible( [in] XTreeNode Node )
+ raises( com::sun::star::lang::IllegalArgumentException, ExpandVetoException );
+
+ /** Returns `TRUE` if <var>Node</var> is currently visible.
+ <p>Visible means it is either the root or all of its parents are expanded.</p>
+
+ @returns
+ `TRUE` if <var>Node</var> is visible, otherwise `FALSE`
+
+ @throws ::com::sun::star::lang::IllegalArgumentException
+ if <var>Node</var> is not a valid node of the corresponding XTreeDataModel.
+ */
+ boolean isNodeVisible( [in] XTreeNode Node )
+ raises( com::sun::star::lang::IllegalArgumentException );
+
+ /** Ensures that <var>Node</var> is expanded and visible.
+ <p>If <var>Node</var> is a leaf node, this will have no effect.</p>
+
+ @param Node
+ the XTreeNode identifying a node.
+
+ @throws ::com::sun::star::lang::IllegalArgumentException
+ if <var>Node</var> is not a valid node of the corresponding XTreeDataModel.
+
+ @throws ExpandVetoException
+ if expanding <var>Node</var> failed because at least one of the registered
+ XTreeExpansionListener raised an ExpandVetoException.
+ */
+ void expandNode( [in] XTreeNode Node )
+ raises( com::sun::star::lang::IllegalArgumentException, ExpandVetoException );
+
+ /** Ensures that <var>Node</var> is collapsed.
+
+ @param Node
+ the XTreeNode identifying a node
+
+ @throws ::com::sun::star::lang::IllegalArgumentException
+ if <var>Node</var> is not a valid node of the corresponding XTreeDataModel.
+
+ @throws ExpandVetoException
+ if collapsing <var>Node</var> failed because at least one of the registered
+ XTreeExpansionListener raised an ExpandVetoException.
+ */
+ void collapseNode( [in] XTreeNode Node )
+ raises( com::sun::star::lang::IllegalArgumentException, ExpandVetoException );
+
+ /** Adds a listener for TreeExpansion events.
+
+ @param Listener
+ a XTreeExpansionListener that will be notified when a tree
+ node is expanded or collapsed.
+ */
+ void addTreeExpansionListener( [in] XTreeExpansionListener Listener );
+
+ /** Removes a listener for TreeExpansion events.
+
+ @param Listener
+ the XTreeExpansionListener to remove.
+ */
+ void removeTreeExpansionListener( [in] XTreeExpansionListener Listener );
+
+ /** If the given URL points to a loadable graphic, the graphic is rendered
+ before expanded non leaf nodes.
+
+ <p>This can be overridden for individual nodes by XTreeNode::getExpandedGraphicURL()</p>
+ */
+ [attribute] string DefaultExpandedGraphicURL;
+
+ /** If the given URL points to a loadable graphic, the graphic is rendered
+ before collapsed non leaf nodes.
+
+ <p>This can be overridden for individual nodes by XTreeNode::getCollapsedGraphicURL()</p>
+ */
+ [attribute] string DefaultCollapsedGraphicURL;
+
+ // tree geometry
+
+ /** Returns the node at the specified location.
+
+ @param x
+ an integer giving the number of pixels horizontally from the left edge of the controls display area
+ @param y
+ an integer giving the number of pixels vertically from the top edge of the controls display area
+ @returns
+ the XTreeNode for the node at that location, or 0 if there is no node at the given position
+ */
+ XTreeNode getNodeForLocation( [in] long x, [in] long y );
+
+ /** Returns the node that is closest to x,y.
+ <p>If no nodes are currently viewable, or there is no model, returns null,
+ otherwise it always returns a valid node. To test if the node is exactly
+ at x, y, use getNodeForLocation().
+
+ @param x
+ an integer giving the number of pixels horizontally from the left edge of the controls display area
+ @param y
+ an integer giving the number of pixels vertically from the top edge of the controls display area
+ @returns
+ the XTreeNode for the node closest to that location, null if nothing is viewable or there is no model
+ */
+ XTreeNode getClosestNodeForLocation( [in] long x, [in] long y );
+
+ /** returns the rectangle occupied by the visual representation of the given node
+
+ @param Node
+ the node whose geometry should be obtained
+ @throws ::com::sun::star::lang::IllegalArgumentException
+ if the given node is `NULL`, or does not belong to the tree's data model
+ */
+ ::com::sun::star::awt::Rectangle
+ getNodeRect( [in] XTreeNode Node )
+ raises( ::com::sun::star::lang::IllegalArgumentException );
+
+ // tree editing
+
+ /** Returns `TRUE` if one of tree's nodes is being currently edited.
+ <p>The node that is being edited can be obtained using com::sun::star::view::XSelectionSupplier::getSelection().
+
+ @returns
+ `TRUE` if the user is currently editing a node
+ */
+ boolean isEditing();
+
+ /** Ends the current editing session.
+ <p>All registered XTreeEditListener are notified if an editing session was in progress</p>
+ <p>Has no effect if the tree isn't being edited.</p>
+
+ @returns
+ `TRUE` if editing was in progress and is now stopped, `FALSE` if editing was not in progress
+ */
+ boolean stopEditing();
+
+ /** Cancels the current editing session.
+ <p>Has no effect if the tree isn't being edited.</p>
+ */
+ void cancelEditing();
+
+ /** Selects <var>Node</var> and initiates editing.
+
+ <p>If TreeControlModel::Editable is `FALSE` or if there are no
+ registered XTreeEditListener, this call has no effect.</p>
+
+ <p>Calling this method also ensures that <var>Node</var> will become visible.</p>
+
+ @param Node
+ the XTreeNode identifying a node.
+
+ @throws ::com::sun::star::lang::IllegalArgumentException
+ if <var>Node</var> is not a valid node of the corresponding XTreeDataModel.
+ */
+ void startEditingAtNode( [in] XTreeNode Node )
+ raises( ::com::sun::star::lang::IllegalArgumentException );
+
+ /** Adds a XTreeEditListener.
+
+ @param Listener
+ a XTreeEditListener that will be notified
+ before and after a tree node is edited.
+ */
+ void addTreeEditListener( [in] XTreeEditListener Listener );
+
+ /** Removes a XTreeEditListener.
+
+ @param Listener
+ the XTreeEditListener to remove
+ */
+ void removeTreeEditListener( [in] XTreeEditListener Listener );
+};
+
+
+}; }; }; }; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/awt/tree/XTreeDataModel.idl b/offapi/com/sun/star/awt/tree/XTreeDataModel.idl
new file mode 100644
index 000000000..0f2b8816b
--- /dev/null
+++ b/offapi/com/sun/star/awt/tree/XTreeDataModel.idl
@@ -0,0 +1,72 @@
+/* -*- 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_awt_tree_XTreeDataModel_idl__
+#define __com_sun_star_awt_tree_XTreeDataModel_idl__
+
+#include <com/sun/star/awt/tree/XTreeDataModelListener.idl>
+#include <com/sun/star/lang/IllegalArgumentException.idl>
+#include <com/sun/star/lang/XComponent.idl>
+#include <com/sun/star/awt/tree/XTreeNode.idl>
+
+
+module com { module sun { module star { module awt { module tree {
+
+
+/** An instance of this interface is used by the TreeControl to
+ retrieve the hierarchical outline data that is displayed in the actual control.
+
+ <p>If you implement your own XTreeDataModel you need to notify registered
+ XTreeDataModelListener if your model changes after the control is created.
+ If this is not done correctly the TreeControl will not update the data properly.</p>
+
+ If you do not need your own model implementation, you can also use the MutableTreeDataModel.
+*/
+interface XTreeDataModel : ::com::sun::star::lang::XComponent
+{
+ /** Returns the root of the tree.
+ <p>Returns null only if the tree has no nodes.
+
+ @returns
+ the root of the tree
+ */
+ XTreeNode getRoot();
+
+ /** Adds a listener for the TreeDataModelEvent posted after the tree changes.
+
+ @param Listener
+ the listener to add.
+ */
+ void addTreeDataModelListener( [in] XTreeDataModelListener Listener );
+
+
+ /** Removes a listener previously added with addTreeDataModelListener().
+
+ @param Listener
+ the listener to remove.
+ */
+ void removeTreeDataModelListener( [in] XTreeDataModelListener Listener );
+
+};
+
+
+}; }; }; }; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/awt/tree/XTreeDataModelListener.idl b/offapi/com/sun/star/awt/tree/XTreeDataModelListener.idl
new file mode 100644
index 000000000..85a9cb395
--- /dev/null
+++ b/offapi/com/sun/star/awt/tree/XTreeDataModelListener.idl
@@ -0,0 +1,82 @@
+/* -*- 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_awt_tree_XTreeDataModelListener_idl__
+#define __com_sun_star_awt_tree_XTreeDataModelListener_idl__
+
+#include <com/sun/star/lang/XEventListener.idl>
+
+#include <com/sun/star/awt/tree/TreeDataModelEvent.idl>
+
+
+
+module com { module sun { module star { module awt { module tree {
+
+
+/** An instance of this interface is used by the TreeControl to
+ get notifications about data model changes.
+
+ <p>Usually you must not implement this interface yourself as it is already handled
+ by the TreeControl, but you must notify it correctly if
+ you implement the XTreeDataModel yourself</p>.
+ */
+interface XTreeDataModelListener: com::sun::star::lang::XEventListener
+{
+ /** Invoked after a node (or a set of siblings) has changed in some way.
+ The node(s) have not changed locations in the tree or altered their
+ children arrays, but other attributes have changed and may affect
+ presentation.
+
+ Example: the name of a file has changed, but it is in the same location in the file system.
+
+ To indicate the root has changed, TreeDataModelEvent::Nodes will contain
+ the root node and TreeDataModelEvent::ParentNode will be empty.
+ */
+ void treeNodesChanged( [in] TreeDataModelEvent Event );
+
+ /** Invoked after nodes have been inserted into the tree.
+
+ Use TreeDataModelEvent::ParentNode to get the parent of the new node(s).
+ TreeDataModelEvent::Nodes contains the new node(s).
+ */
+ void treeNodesInserted( [in] TreeDataModelEvent Event );
+
+ /** Invoked after nodes have been removed from the tree.
+ <p>Note that if a subtree is removed from the tree,
+ this method may only be invoked once for the root of the removed subtree,
+ not once for each individual set of siblings removed.
+
+ Use TreeDataModelEvent::ParentNode to get the former parent of the deleted node(s).
+ TreeDataModelEvent::Nodes contains the removed node(s).
+ */
+ void treeNodesRemoved( [in] TreeDataModelEvent Event );
+
+ /** Invoked after the tree has drastically changed structure from a given node down.
+
+ Use TreeDataModelEvent::ParentNode to get the node which
+ structure has changed. TreeDataModelEvent::Nodes is empty.
+ */
+ void treeStructureChanged( [in] TreeDataModelEvent Event );
+};
+
+
+}; }; }; }; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/awt/tree/XTreeEditListener.idl b/offapi/com/sun/star/awt/tree/XTreeEditListener.idl
new file mode 100644
index 000000000..6fc0c4f65
--- /dev/null
+++ b/offapi/com/sun/star/awt/tree/XTreeEditListener.idl
@@ -0,0 +1,72 @@
+/* -*- 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_awt_tree_XTreeEditListener_idl__
+#define __com_sun_star_awt_tree_XTreeEditListener_idl__
+
+#include <com/sun/star/awt/tree/XTreeNode.idl>
+#include <com/sun/star/lang/XEventListener.idl>
+#include <com/sun/star/util/VetoException.idl>
+
+
+module com { module sun { module star { module awt { module tree {
+
+
+/** You can implement this interface and register with XTreeControl::addTreeEditListener()
+ to get notifications when editing of a node starts and ends.
+
+ <p>You have to set the TreeControlModel::Editable property to
+ `TRUE` before a tree supports editing.</p>
+ */
+interface XTreeEditListener : ::com::sun::star::lang::XEventListener
+{
+ /** This method is called from the TreeControl implementation when editing of
+ <var>Node</var> is requested by calling XTreeControl::startEditingAtNode().
+
+ @param Node
+ the XTreeNode for that an edit request was fired by calling
+ XTreeControl::startEditingAtNode()
+
+ @throws VetoException
+ if thrown the editing will not start.
+ */
+ void nodeEditing( [in] XTreeNode Node )
+ raises ( ::com::sun::star::util::VetoException );
+
+ /** This method is called from the TreeControl implementation when editing
+ of <var>Node</var> is finished and was not canceled.
+
+ <p>Implementations that register a XTreeEditListener must update the
+ display value at the Node.</p>
+
+ @param Node
+ the XTreeNode for that an edit request was fired by calling
+ XTreeControl::startEditingAtNode()
+
+ @param NewText
+ the text that was entered by the user.
+ */
+ void nodeEdited( [in] XTreeNode Node, [in] string NewText );
+};
+
+
+}; }; }; }; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/awt/tree/XTreeExpansionListener.idl b/offapi/com/sun/star/awt/tree/XTreeExpansionListener.idl
new file mode 100644
index 000000000..99e4c103b
--- /dev/null
+++ b/offapi/com/sun/star/awt/tree/XTreeExpansionListener.idl
@@ -0,0 +1,76 @@
+/* -*- 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_awt_tree_XTreeExpansionListener_idl__
+#define __com_sun_star_awt_tree_XTreeExpansionListener_idl__
+
+#include <com/sun/star/lang/XEventListener.idl>
+
+#include <com/sun/star/awt/tree/TreeExpansionEvent.idl>
+#include <com/sun/star/awt/tree/ExpandVetoException.idl>
+
+
+module com { module sun { module star { module awt { module tree {
+
+
+/** An instance of this interface can get notifications from a TreeControl
+ when nodes are expanded or collapsed.
+
+ @see XTreeControl::addTreeExpansionListener
+ @see XTreeControl::removeTreeExpansionListener
+ */
+interface XTreeExpansionListener: com::sun::star::lang::XEventListener
+{
+ /** Invoked when a node with children on demand is about to be expanded.
+
+ <p>This event is invoked before the treeExpanding()
+ event.</p>
+ */
+ void requestChildNodes( [in] TreeExpansionEvent Event );
+
+ /** Invoked whenever a node in the tree is about to be expanded.
+
+ @throws ExpandVetoException
+ to notify the calling XTreeControl that expanding
+ TreeExpansionEvent::Node should fail.
+ */
+ void treeExpanding( [in] TreeExpansionEvent Event )
+ raises ( ExpandVetoException );
+
+ /** Invoked whenever a node in the tree is about to be collapsed.
+
+ @throws ExpandVetoException
+ to notify the calling XTreeControl that collapsing
+ TreeExpansionEvent::Node should fail.
+ */
+ void treeCollapsing( [in] TreeExpansionEvent Event )
+ raises ( ExpandVetoException );
+
+ /** Called whenever a node in the tree has been successfully expanded. */
+ void treeExpanded( [in] TreeExpansionEvent Event );
+
+ /** Called whenever a node in the tree has been successfully collapsed. */
+ void treeCollapsed( [in] TreeExpansionEvent Event );
+};
+
+
+}; }; }; }; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/awt/tree/XTreeNode.idl b/offapi/com/sun/star/awt/tree/XTreeNode.idl
new file mode 100644
index 000000000..050160e47
--- /dev/null
+++ b/offapi/com/sun/star/awt/tree/XTreeNode.idl
@@ -0,0 +1,92 @@
+/* -*- 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_awt_tree_XTreeNode_idl__
+#define __com_sun_star_awt_tree_XTreeNode_idl__
+
+#include <com/sun/star/container/XEnumerationAccess.idl>
+#include <com/sun/star/lang/IndexOutOfBoundsException.idl>
+
+
+module com { module sun { module star { module awt { module tree {
+
+
+/** An instance implementing this interface represents the model data for an entry in a
+ XTreeDataModel.
+ <p>The TreeControl uses this interface to retrieve the model
+ information needed to display a hierarchical outline</p>
+ <p>Each XTreeNode in a XTreeDataModel must be unique.
+ */
+interface XTreeNode
+{
+ /** Returns the child tree node at <var>Index</var>.
+
+ @throws ::com::sun::star::lang::IndexOutOfBoundsException
+ if <var>Index</var> is less than 0 or equal or greater than getChildCount().
+ */
+ XTreeNode getChildAt( [in] long Index )
+ raises( com::sun::star::lang::IndexOutOfBoundsException );
+
+ /** Returns the number of child nodes. */
+ long getChildCount();
+
+ /** Returns the parent node of this node. */
+ XTreeNode getParent();
+
+ /** Returns the index of <var>Node</var> in this instances children.
+ @returns
+ The child index of <var>Node</var>,
+ or -1 if <var>Node</var> is no child of this instance.
+ */
+ long getIndex( [in] XTreeNode Node);
+
+ /** Returns `TRUE` if the children of this node are created on demand.
+ <p>A TreeControl will handle a node that returns `TRUE` always
+ like a node that has child nodes, even if getChildCount()
+ returns 0.</p>
+
+ @see TreeExpansionListener;
+ */
+ boolean hasChildrenOnDemand();
+
+ /** If not empty, the textual representation of this any is used as the text part of this node.
+ */
+ any getDisplayValue();
+
+ /** The URL for a graphic that is rendered before the text part of this node.
+ <p>If this URL is empty, no graphic is rendered.
+ */
+ string getNodeGraphicURL();
+
+ /** The URL for a graphic that is rendered to visualize expanded non leaf nodes.
+ <p>If <var>URL</var> is empty, XTreeControl::DefaultExpandedGraphicURL is used.
+ */
+ string getExpandedGraphicURL();
+
+ /** The URL for a graphic that is rendered to visualize collapsed non leaf nodes.
+ <p>If <var>URL</var> is empty, XTreeControl::DefaultCollapsedGraphicURL is used.
+ */
+ string getCollapsedGraphicURL();
+};
+
+
+}; }; }; }; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */