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
>
7 #ifndef __com_sun_star_awt_Rectangle_idl__
8 #include
<com
/sun
/star
/awt
/Rectangle.idl
>
10 #ifndef __com_sun_star_beans_XPropertySet_idl__
11 #include
<com
/sun
/star
/beans
/XPropertySet.idl
>
13 #ifndef __com_sun_star_container_XChild_idl__
14 #include
<com
/sun
/star
/container
/XChild.idl
>
16 #ifndef __com_sun_star_awt_MaxChildrenException_idl__
17 #include
<com
/sun
/star
/awt
/MaxChildrenException.idl
>
19 #ifndef __com_sun_star_awt_XLayoutUnit_idl__
20 #include
<com
/sun
/star
/awt
/XLayoutUnit.idl
>
23 //=============================================================================
25 module com
{ module sun
{ module star
{ module awt
{
27 //=============================================================================
29 interface XLayoutUnit
;
31 /** specifies the layout constraints for a surrounding container.
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
70 com
::sun
::star
::awt
::Size getRequestedSize
();
72 /** Used by the layouting unit to evaluate size damage, and force a
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 //=============================================================================