Docs » Autodocs » virtual.gadget » RethinkVirtualSize
RethinkVirtualSize -- Calculate the size of virtual group based
on the screen resolution.
RethinkVirtualSize(virtual, rootlayout, font, screen, layoutlimits)
A0 A1 A2 A3 D0
BOOL RethinkVirtualSize(Object *, Object *, struct TextFont *,
struct Screen *, struct LayoutLimits *)
This function is used to calculate the intial size of a layout
group that contains a virtual.gadget (and ONLY one!). Simply
call this function BEFORE you open the window:
RethinkVirtualSize(virtual, rootlayout, NULL, screen, &ll);
This ensures that the visible portion of the virtual group will
be as large as possible. Next open the window and set the window
limits to values that were returned by the function in the
LayoutLimits structure you've passed in:
WindowLimits( mywin, ll.MinWidth, ll.MinHeight,
ll.MaxWidth, ll.MaxHeight );
Last but not least, set the new minimum size for the virtual.gadget,
so that the user can resize the group:
virtual = the virtual.gadget.
rootlayout = the root layout.gadget of the window.
font = optional pointer to the font used by the layout. May be NULL.
screen = pointer to the screen where the window will be opened.
layoutlimits = optional pointer holding the actual minimum and maximum
dimension of the window.
If anything went wrong, this function returns FALSE (out of memory,
NULL screen pointer, ...).
The function may become obsolete in a later release of ReAction.