/**************************************************************
 * 
 * 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
 * 
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 * 
 *************************************************************/


#ifndef __com_sun_star_awt_tree_XMutableTreeDataModel_idl__
#define __com_sun_star_awt_tree_XMutableTreeDataModel_idl__

#ifndef __com_sun_star_awt_tree_XTreeDataModel_idl__
#include <com/sun/star/awt/tree/XTreeDataModel.idl>
#endif

#ifndef __com_sun_star_awt_tree_XMutableTreeNode_idl__
#include <com/sun/star/awt/tree/XMutableTreeNode.idl>
#endif

//=============================================================================

module com {  module sun {  module star {  module awt {  module tree {

//=============================================================================

/** This is the editable version of the <type>XTreeDataModel</type>.

    <p>Note that only <type>XTreeNode</type> created from the same instance with <member>createNode</member>
    are valids nodes for this instance.</p>
 */
published interface XMutableTreeDataModel : XTreeDataModel
{
    /** creates a new tree node with the given value and given settings.

        @param DisplayValue
            should be convertable to a string and is used by the <type>XTreeControl</type>
            as a textual represenation 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 <type>XTreeControl</type>, even when it has no child nodes.

        @returns
            a new <type>XMutableTreeNode</type> 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 <type>XMutableTreeNode</type> 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 <type>XTreeDataModel</type>.
    */
    void setRoot( [in] XMutableTreeNode RootNode )
        raises( ::com::sun::star::lang::IllegalArgumentException );
};

//=============================================================================

}; }; }; }; };

#endif