2 Copyright © 2002-2007, The AROS Development Team. All rights reserved.
6 #include <intuition/classusr.h>
7 #include <clib/alib_protos.h>
8 #include <proto/intuition.h>
9 #include <proto/muimaster.h>
12 #include "muimaster_intern.h"
17 /*****************************************************************************
20 AROS_LH6(BOOL
, MUI_Layout
,
23 AROS_LHA(Object
*, obj
, A0
),
24 AROS_LHA(LONG
, left
, D0
),
25 AROS_LHA(LONG
, top
, D1
),
26 AROS_LHA(LONG
, width
, D2
),
27 AROS_LHA(LONG
, height
, D3
),
28 AROS_LHA(ULONG
, flags
, D4
),
31 struct Library
*, MUIMasterBase
, 21, MUIMaster
)
49 *****************************************************************************/
53 static const struct MUIP_Layout method
= { MUIM_Layout
};
54 Object
*parent
= _parent(obj
);
57 * Called only by groups, never by windows
59 // ASSERT(parent != NULL);
61 if (_flags(parent
) & MADF_ISVIRTUALGROUP
)
63 /* I'm not yet sure what to do by virtual groups in virtual groups,
64 * eighter add their offsets too or not, will be tested soon */
66 get(parent
,MUIA_Virtgroup_Left
,&val
);
68 get(parent
,MUIA_Virtgroup_Top
,&val
);
72 _left(obj
) = left
+ _mleft(parent
);
73 _top(obj
) = top
+ _mtop(parent
);
75 _height(obj
) = height
;
77 D(bug("muimaster.library/mui_layout.c: 0x%lx %ldx%ldx%ldx%ld\n",obj
,_left(obj
),_top(obj
),_right(obj
),_bottom(obj
)));
79 DoMethodA(obj
, (Msg
)&method
);