Handbook
Glossary
incremental
Factor handbook
»
UI framework
»
Building user interfaces
»
Gadget hierarchy and layouts
»
Incremental layouts
Next:
<incremental> ( -- incremental )
Vocabulary
ui
.
gadgets
.
incremental
Class description
Incremental layout gadgets inherit from
pack
and implement an optimization where the relayout operation after adding a child to be done in constant time.
Incremental layout gadgets are created by calling
<incremental>
.
Children are managed with the
add-incremental
and
clear-incremental
words.
An example of an incremental is the 'output' of a 'pane' gadget.
Not every
pack
can use incremental layout, since incremental layout does not support non-default values for the
align
,
fill
, and
gap
slots.
Definition
USING:
ui.gadgets.packs
;
IN:
ui.gadgets.incremental
TUPLE:
incremental
<
pack
cursor
;
Methods
USING:
kernel
ui.gadgets.incremental
ui.gadgets.private
;
M:
incremental
dim-changed
drop
;
USING:
accessors
generic
kernel
ui.gadgets
ui.gadgets.incremental
;
M:
incremental
pref-dim*
dup
layout-state>>
[
dup
M\
incremental
pref-dim*
(call-next-method)
>>cursor
]
when
cursor>>
;