layout* ( gadget -- )
Factor handbook > UI framework > Building user interfaces > Gadget hierarchy and layouts > Implementing layout gadgets

Next:pref-dim ( gadget -- dim )


Vocabulary
ui.gadgets

Inputs and outputs
gadgeta gadget


Generic word contract
Lays out the children of the gadget according to the gadget's policy. The dimensions of the gadget are already set by the parent by the time this word is called.

Notes
User code should not call this word directly, instead call relayout and relayout-1.

See also
pref-dim, pref-dim*, layout

Definition


Methods










M:: frame-buffer layout* ( FRAME-BUFFER -- )
FRAME-BUFFER last-dim>> [
FRAME-BUFFER dim>> = [
FRAME-BUFFER pixels>> :> OLD-PIXELS FRAME-BUFFER
last-dim>> first gl-scale >fixnum :> OLD-WIDTH
FRAME-BUFFER init-frame-buffer-pixels FRAME-BUFFER
[ dim>> ] [ last-dim<< ] bi
FRAME-BUFFER pixels>> :> NEW-PIXELS FRAME-BUFFER
last-dim>> first gl-scale >fixnum :> NEW-WIDTH
OLD-PIXELS OLD-WIDTH NEW-PIXELS NEW-WIDTH
copy-pixels
] unless
] [
FRAME-BUFFER init-frame-buffer-pixels FRAME-BUFFER
[ dim>> ] [ last-dim<< ] bi
] if* ;