NAME
LayoutLimits -- easy way to find out max and min size of layout
SYNOPSIS
LayoutLimits( layout, limits, font, screen );
a0 a1 a2 a3
void LayoutLimits( struct gadget *, struct layoutlimits *,
struct textfont *, struct screen * )
FUNCTION
This function is an easy way of getting the minimum and maximum
limit of the layout group. Effectively it create a rastport and
execute the GM_DOMAIN method for both minimum and maximum size
of the object filling in the LayoutLimits structure with the size
values. The font passed to this call will most likely affect the
results, so use the font you will use with the window. If you
pass a NULL for the font, the system default font (monospaced)
will be used. If you pass the optional screen pointer, the
gadget will be provided a drawinfo. this will let the gadget
adjust to the aspect ratio of the screen.
If you use the resulting size for openwindow() or windowlimits(),
remember that the results do not include window borders.
INPUTS
layout = the layout object to get the size on.
limits = a pointer to the struct LayoutLimits to fill.
font = the textfont to use on the domain requests. may be null
for system default font.
screen = optional pointer to the screen on which the layout
will be used on, or NULL.
NOTES
This function will invoke the object's GM_DOMAIN method twice,
with a NULL gadgetinfo. if you call it providing a screen
pointer, the taglist of the message will contain that screen's
drawinfo (ga_drawinfo) for aspect information.
SEE ALSO
gadgetclass/GM_DOMAIN