a1200   NEWS   APPS   DOCS   ABOUT
a1200
----
a1200
----
Autodocs
 Other:
 virtual.gadget
  --datasheet--
  RefreshVirtualGadget
  RethinkVirtualSize
  VIRTUAL_GetClass
Include
GuruMeditation
Docs » Autodocs » virtual.gadget » RethinkVirtualSize

NAME

       RethinkVirtualSize -- Calculate the size of virtual group based
on the screen resolution.

SYNOPSIS

       RethinkVirtualSize(virtual, rootlayout, font, screen, layoutlimits)
A0 A1 A2 A3 D0
BOOL RethinkVirtualSize(Object *, Object *, struct TextFont *,
struct Screen *, struct LayoutLimits *)

FUNCTION

      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:
SetAttrs( layoutgroup_containg_virtual,
LAYOUT_ModifyChild, virtual,
CHILD_MinWidth, 64,
CHILD_MinHeight, 48,
TAG_DONE );

INPUTS

      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.

RESULT

      If anything went wrong, this function returns FALSE (out of memory,
NULL screen pointer, ...).

BUGS

      The function may become obsolete in a later release of ReAction.

Comments

Name:
E-mail: Use this if you want a message if you get a response, will not be shown.
Comment:
Select correct short for:

Dual Crew

DJ
FC
TBL
DC

Comments:

$VER: d0.se 1.14 Copyright © 2011-2024 Tobias Geijersson support at d0 dot se