diff options
Diffstat (limited to 'offapi/com/sun/star/awt/XLayoutContainer.idl')
-rw-r--r-- | offapi/com/sun/star/awt/XLayoutContainer.idl | 89 |
1 files changed, 89 insertions, 0 deletions
diff --git a/offapi/com/sun/star/awt/XLayoutContainer.idl b/offapi/com/sun/star/awt/XLayoutContainer.idl new file mode 100644 index 000000000000..46711f551af6 --- /dev/null +++ b/offapi/com/sun/star/awt/XLayoutContainer.idl @@ -0,0 +1,89 @@ +#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 OOo 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 |