Handbook
Glossary
add-incremental ( gadget incremental -- )
Factor handbook
»
UI framework
»
Building user interfaces
»
Gadget hierarchy and layouts
»
Incremental layouts
Prev:
<incremental> ( -- incremental )
Next:
clear-incremental ( incremental -- )
Vocabulary
ui
.
gadgets
.
incremental
Inputs
gadget
a
gadget
incremental
an
incremental
Outputs
None
Word description
Adds the gadget to the incremental layout and performs relayout immediately in constant time.
Side effects
Modifies
incremental
See also
<incremental>
,
clear-incremental
Definition
USING:
accessors
combinators
kernel
namespaces
ui.gadgets
ui.gadgets.private
;
IN:
ui.gadgets.incremental
:
add-incremental
( gadget incremental -- )
not-in-layout
dup
scroll-children
2dup
(add-gadget)
t
in-layout?
[
{
[
drop
prefer-incremental
]
[
drop
layout-later
]
[
incremental-loc
]
[
update-cursor
]
[
nip
prefer-incremental
]
[
nip
parent>>
[
invalidate*
]
when*
]
}
2cleave
]
with-variable
;