Handbook
Glossary
label
Factor handbook
»
UI framework
»
Building user interfaces
»
Pre-made UI gadgets
»
Label gadgets
Next:
<label> ( string -- label )
Vocabulary
ui
.
gadgets
.
labels
Class description
A label displays a piece of text, either a single line string or an array of line strings. Labels are created by calling
<label>
.
Definition
USING:
ui.baseline-alignment
;
IN:
ui.gadgets.labels
TUPLE:
label
<
aligned-gadget
text font
;
Methods
USING:
accessors
ui.baseline-alignment
ui.gadgets.labels
ui.gadgets.labels.private
;
M:
label
baseline*
label-metrics
ascent>>
;
USING:
accessors
ui.baseline-alignment
ui.gadgets.labels
ui.gadgets.labels.private
;
M:
label
cap-height*
label-metrics
cap-height>>
;
USING:
fonts
kernel
ui.gadgets.labels
ui.gadgets.labels.private
ui.render
ui.text
;
M:
label
draw-gadget*
[
>label<
]
keep
[
label-background
[
font-with-background
]
when*
]
[
label-foreground
[
font-with-foreground
]
when*
]
bi-curry
compose
dip
draw-text
;
USING:
accessors
make
ui.gadgets
ui.gadgets.labels
;
M:
label
gadget-text*
string>>
%
;
USING:
arrays
math.functions
sequences
ui.gadgets
ui.gadgets.labels
ui.text
;
M:
label
pref-dim*
>label<
text-dim
first2
ceiling
2array
;