Handbook
Glossary
notify ( gadget -- )
Factor handbook
»
UI framework
»
Implementing new gadgets
»
Implementing controls
Prev:
graft ( gadget -- )
Next:
ungraft ( gadget -- )
Vocabulary
ui
.
gadgets
.
private
Inputs
gadget
a
gadget
Outputs
None
Word description
Notifies the gadget that it has a graft message to handle.
See also
graft*
,
ungraft*
Definition
USING:
accessors
combinators
kernel
sequences
ui.gadgets
;
IN:
ui.gadgets.private
:
notify
( gadget -- )
dup
graft-state>>
[
first
{
f
f
}
{
t
t
}
?
>>graft-state
]
[
]
bi
{
{
{
f
t
}
[
dup
activate-control
graft*
]
}
{
{
t
f
}
[
dup
deactivate-control
ungraft*
]
}
}
case
;