Handbook
Glossary
next-elt ( loc document elt -- newloc )
Factor handbook
»
UI framework
»
Building user interfaces
»
Pre-made UI gadgets
»
Editor gadgets
»
Documents
»
Document elements
Prev:
prev-elt ( loc document elt -- newloc )
Vocabulary
documents
.
elements
Inputs
loc
a pair of integers
document
a
document
elt
an element
Outputs
newloc
a pair of integers
Generic word contract
Outputs the location of the first occurrence of the element following
loc
.
See also
prev-elt
Definition
IN:
documents.elements
GENERIC:
next-elt
( loc document elt -- newloc )
Methods
USING:
documents.elements
documents.elements.private
kernel
unicode
;
M:
char-elt
next-elt
drop
[
[
first-grapheme-from
]
modify-col
]
next
;
USING:
documents
documents.elements
kernel
;
M:
doc-elt
next-elt
drop
nip
doc-end
;
USING:
documents.elements
kernel
;
M:
one-char-elt
next-elt
2drop
;
USING:
arrays
documents
documents.elements
kernel
sequences
;
M:
one-line-elt
next-elt
drop
[
first
dup
]
dip
doc-line
length
2array
;
USING:
documents.elements
documents.elements.private
kernel
;
M:
one-word-elt
next-elt
drop
[
f
next-word
]
modify-col
;
USING:
accessors
documents
documents.elements
kernel
math
sequences
;
M:
page-elt
next-elt
3dup
[
first
]
[
last-line#
]
[
#lines>>
]
tri*
-
>
[
drop
nip
doc-end
]
[
nip
#lines>>
+line
]
if
;
USING:
documents.elements
documents.elements.private
kernel
;
M:
paragraph-elt
next-elt
drop
next-paragraph
;
USING:
documents.elements
documents.elements.private
kernel
;
M:
word-elt
next-elt
drop
[
[
blank-at?
next-word
]
modify-col
]
next
;
USING:
documents.elements
kernel
;
M:
word-start-elt
next-elt
2drop
;