Handbook
Glossary
editor-text-dim ( font lines editor -- dim )
Vocabulary
ui
.
gadgets
.
editors
Inputs
font
an
object
lines
an
object
editor
an
object
Outputs
dim
an
object
Definition
USING:
accessors
arrays
assocs
fonts
kernel
namespaces
opengl
sequences
ui.text
ui.text.private
;
IN:
ui.gadgets.editors
::
editor-text-dim
( font lines editor -- dim )
font
strip-font-colors
gl-scale-factor
get-global
2array
:>
key editor
text-dim-cache>>
:>
previous previous
[
previous
key>>
key
=
]
[
f
]
if
[
previous
dims>>
]
[
H{
}
]
if
:>
old
H{
}
clone
:>
current lines
{
0 0
}
[|
total string |
string current
[
dup
old
at
[
nip
]
[
font
swap
text-dim
]
if*
]
cache
total
swap
combine-text-dim
]
reduce
:>
dim key current
editor-text-dims
boa
editor
text-dim-cache<<
dim
;