blob: 2d26e90bb304eb1e5831ed56eef6bddfaed5aabc [file] [log] [blame]
/**************************************************************
*
* 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_XLayoutContainer_idl__
#define __com_sun_star_awt_XLayoutContainer_idl__
#ifndef __com_sun_star_awt_XLayoutConstrains_idl__
#include <com/sun/star/awt/XLayoutConstrains.idl>
#endif
#ifndef __com_sun_star_awt_Rectangle_idl__
#include <com/sun/star/awt/Rectangle.idl>
#endif
#ifndef __com_sun_star_beans_XPropertySet_idl__
#include <com/sun/star/beans/XPropertySet.idl>
#endif
#ifndef __com_sun_star_container_XChild_idl__
#include <com/sun/star/container/XChild.idl>
#endif
#ifndef __com_sun_star_awt_MaxChildrenException_idl__
#include <com/sun/star/awt/MaxChildrenException.idl>
#endif
#ifndef __com_sun_star_awt_XLayoutUnit_idl__
#include <com/sun/star/awt/XLayoutUnit.idl>
#endif
//=============================================================================
module com { module sun { module star { module awt {
//=============================================================================
interface XLayoutUnit;
/** specifies the layout constraints for a surrounding container.
@since OpenOffice 3.0
*/
interface XLayoutContainer: com::sun::star::container::XChild
{
/** Adds a child. Some containers provide an interface for
adding children which you should use. */
void addChild( [in] com::sun::star::awt::XLayoutConstrains Child )
raises( com::sun::star::awt::MaxChildrenException );
/** Remove a child. Some containers provide an interface for
adding children which you should use.
*/
void removeChild( [in] com::sun::star::awt::XLayoutConstrains Child );
/** Returns a sequence of the children of this container. */
sequence< com::sun::star::awt::XLayoutConstrains > getChildren();
/** Read/modify some child layout properties. XPropertySet provides a
rich API that allows, e.g., for introspection.
Should rarely be a need to use; containers shall provide an interface
for setting properties more confortably. */
com::sun::star::beans::XPropertySet getChildProperties(
[in] com::sun::star::awt::XLayoutConstrains Child );
/** Set at initilization, this object should be notified when a containers state
changes, that may affect its size, to queue a layout re-calculation. */
void setLayoutUnit( [in] com::sun::star::awt::XLayoutUnit Unit );
// TEMP: no need for this...
com::sun::star::awt::XLayoutUnit getLayoutUnit();
/** To be used by the parent for the purpose of layout management.
For widgets, use XWindow::setPosSize() */
void allocateArea( [in] com::sun::star::awt::Rectangle NewArea );
/** Used by the layouting unit to evaluate size damage, and force a
re-allocation. */
com::sun::star::awt::Size getRequestedSize();
/** Used by the layouting unit to evaluate size damage, and force a
re-allocation. */
com::sun::star::awt::Rectangle getAllocatedArea();
/** For flow layouting (e.g. wrap-able labels). TODO: We might want to
re-design this approach -- check XLayoutConstrains::calcAdjustedSize(). */
long getHeightForWidth( [in] long Width );
/** For flow layouting (e.g. wrap-able labels). TODO: We might want to
re-design this approach -- check XLayoutConstrains::calcAdjustedSize(). */
boolean hasHeightForWidth();
};
//=============================================================================
}; }; }; };
#endif