1#ifndef __com_sun_star_awt_XLayoutContainer_idl__
2#define __com_sun_star_awt_XLayoutContainer_idl__
3
4#ifndef __com_sun_star_awt_XLayoutConstrains_idl__
5#include <com/sun/star/awt/XLayoutConstrains.idl>
6#endif
7#ifndef __com_sun_star_awt_Rectangle_idl__
8#include <com/sun/star/awt/Rectangle.idl>
9#endif
10#ifndef __com_sun_star_beans_XPropertySet_idl__
11#include <com/sun/star/beans/XPropertySet.idl>
12#endif
13#ifndef __com_sun_star_container_XChild_idl__
14#include <com/sun/star/container/XChild.idl>
15#endif
16#ifndef __com_sun_star_awt_MaxChildrenException_idl__
17#include <com/sun/star/awt/MaxChildrenException.idl>
18#endif
19#ifndef __com_sun_star_awt_XLayoutUnit_idl__
20#include <com/sun/star/awt/XLayoutUnit.idl>
21#endif
22
23//=============================================================================
24
25module com {  module sun {  module star {  module awt {
26
27//=============================================================================
28
29interface XLayoutUnit;
30
31/** specifies the layout constraints for a surrounding container.
32
33    @since OOo 3.0
34 */
35interface XLayoutContainer: com::sun::star::container::XChild
36{
37	/** Adds a child. Some containers provide an interface for
38	   adding children which you should use. */
39    void addChild( [in] com::sun::star::awt::XLayoutConstrains Child )
40		raises( com::sun::star::awt::MaxChildrenException );
41
42	/** Remove a child. Some containers provide an interface for
43	   adding children which you should use.
44    */
45    void removeChild( [in] com::sun::star::awt::XLayoutConstrains Child );
46
47    /** Returns a sequence of the children of this container. */
48    sequence< com::sun::star::awt::XLayoutConstrains > getChildren();
49
50	/** Read/modify some child layout properties. XPropertySet provides a
51	   rich API that allows, e.g., for introspection.
52	   Should rarely be a need to use; containers shall provide an interface
53	   for setting properties more confortably. */
54    com::sun::star::beans::XPropertySet getChildProperties(
55		[in] com::sun::star::awt::XLayoutConstrains Child );
56
57	/** Set at initilization, this object should be notified when a containers state
58	   changes, that may affect its size, to queue a layout re-calculation. */
59	void setLayoutUnit( [in] com::sun::star::awt::XLayoutUnit Unit );
60
61	// TEMP: no need for this...
62	com::sun::star::awt::XLayoutUnit getLayoutUnit();
63
64	/** To be used by the parent for the purpose of layout management.
65	   For widgets, use XWindow::setPosSize() */
66    void allocateArea( [in] com::sun::star::awt::Rectangle NewArea );
67
68	/** Used by the layouting unit to evaluate size damage, and force a
69	   re-allocation. */
70	com::sun::star::awt::Size getRequestedSize();
71
72	/** Used by the layouting unit to evaluate size damage, and force a
73	   re-allocation. */
74    com::sun::star::awt::Rectangle getAllocatedArea();
75
76	/** For flow layouting (e.g. wrap-able labels). TODO: We might want to
77	   re-design this approach -- check XLayoutConstrains::calcAdjustedSize(). */
78	long getHeightForWidth( [in] long Width );
79
80	/** For flow layouting (e.g. wrap-able labels). TODO: We might want to
81	   re-design this approach -- check XLayoutConstrains::calcAdjustedSize(). */
82	boolean hasHeightForWidth();
83};
84
85//=============================================================================
86
87}; }; }; };
88
89#endif
90