Document elements
Factor handbook » UI framework » Building user interfaces » Pre-made UI gadgets » Editor gadgets » Documents

Prev:Document locations


Document elements, defined in the documents.elements vocabulary, overlay a hierarchy of structure on top of the flat sequence of characters presented by the document.

The different types of document elements correspond to the standard editing taxonomy:
one-char-elt

char-elt

one-word-elt

word-elt

one-line-elt

line-elt ( -- value )

paragraph-elt

page-elt

doc-elt


New locations can be created out of existing ones by finding the start or end of a document element nearest to a given location.
prev-elt ( loc document elt -- newloc )

next-elt ( loc document elt -- newloc )