]> gitweb.factorcode.org Git - factor.git/blob - core/ui/text/elements.facts
66c3fe2b2533abba75337e3e912e783d1fec1879
[factor.git] / core / ui / text / elements.facts
1 IN: gadgets-text
2 USING: help ;
3
4 HELP: prev-elt
5 { $values { "loc" "a pair of integers" } { "document" document } { "elt" "an element" } { "newloc" "a pair of integers" } }
6 { $contract "Outputs the location of the first occurrence of the element prior to " { $snippet "loc" } "." }
7 { $see-also next-elt } ;
8
9 HELP: next-elt
10 { $values { "loc" "a pair of integers" } { "document" document } { "elt" "an element" } { "newloc" "a pair of integers" } }
11 { $contract "Outputs the location of the first occurrence of the element following " { $snippet "loc" } "." }
12 { $see-also prev-elt } ;
13
14 HELP: char-elt
15 { $class-description "An element representing a single character." } ;
16
17 HELP: one-word-elt
18 { $class-description "An element representing a single word. The " { $link prev-elt } " and " { $link next-elt } " words return the location of the beginning and the end of the word at the current location." }
19 { $see-also word-elt } ;
20
21 HELP: word-elt
22 { $class-description "An element representing a single word. The " { $link prev-elt } " and " { $link next-elt } " words return the location of the previous and next word from the current location." }
23 { $see-also one-word-elt } ;
24
25 HELP: one-line-elt
26 { $class-description "An element representing a single line. The " { $link prev-elt } " and " { $link next-elt } " words return the location of the beginning and the end of the line at the current location." }
27 { $see-also line-elt } ;
28
29 HELP: line-elt
30 { $class-description "An element representing a single line. The " { $link prev-elt } " and " { $link next-elt } " words return the location of the previous and next line from the current location." }
31 { $see-also one-line-elt } ;
32
33 HELP: doc-elt
34 { $class-description "An element representing the entire document. The " { $link prev-elt } " word outputs the start of the document and the " { $link next-elt } " word outputs the end of the document." } ;