update dev300-m58
[ooovba.git] / offapi / com / sun / star / awt / XLayoutContainer.idl
blobedee6681af5b764530c30b2371d60c7999c2d690
1 #ifndef __com_sun_star_awt_XLayoutContainer_idl__
2 #define __com_sun_star_awt_XLayoutContainer_idl__
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
23 //=============================================================================
25 module com { module sun { module star { module awt {
27 //=============================================================================
29 interface XLayoutUnit;
31 /** specifies the layout constraints for a surrounding container.
33 @since OOo 3.0
35 interface XLayoutContainer: com::sun::star::container::XChild
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 );
42 /** Remove a child. Some containers provide an interface for
43 adding children which you should use.
45 void removeChild( [in] com::sun::star::awt::XLayoutConstrains Child );
47 /** Returns a sequence of the children of this container. */
48 sequence< com::sun::star::awt::XLayoutConstrains > getChildren();
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 );
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 );
61 // TEMP: no need for this...
62 com::sun::star::awt::XLayoutUnit getLayoutUnit();
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 );
68 /** Used by the layouting unit to evaluate size damage, and force a
69 re-allocation. */
70 com::sun::star::awt::Size getRequestedSize();
72 /** Used by the layouting unit to evaluate size damage, and force a
73 re-allocation. */
74 com::sun::star::awt::Rectangle getAllocatedArea();
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 );
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();
85 //=============================================================================
87 }; }; }; };
89 #endif