summaryrefslogtreecommitdiff
path: root/offapi/com/sun/star/awt/XLayoutContainer.idl
blob: edee6681af5b764530c30b2371d60c7999c2d690 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
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