Handbook
Glossary
>label ( obj -- gadget )
Factor handbook
»
UI framework
»
Building user interfaces
»
Pre-made UI gadgets
»
Label gadgets
Prev:
<label-control> ( model -- gadget )
Vocabulary
ui
.
gadgets
.
labels
Inputs
obj
a label specifier
Outputs
gadget
a new
gadget
Word description
Convert the object into a gadget suitable for use as the label of a button. If
obj
is already a gadget, does nothing. Otherwise creates a
label
gadget if it is a string and an empty gadget if
obj
is
f
.
Definition
IN:
ui.gadgets.labels
GENERIC:
>label
( obj -- gadget )
Methods
USING:
arrays
ui.gadgets.labels
;
M:
array
>label
<label>
;
USING:
kernel
ui.gadgets
ui.gadgets.labels
;
M:
f
>label
drop
<gadget>
;
USING:
ui.gadgets.icons
ui.gadgets.labels
ui.images
;
M:
image-name
>label
<icon>
;
USING:
kernel
ui.gadgets.labels
;
M:
object
>label
;
USING:
strings
ui.gadgets.labels
;
M:
string
>label
<label>
;