]> gitweb.factorcode.org Git - factor.git/blob - basis/ui/gadgets/line-support/line-support-docs.factor
Fix conflict in images vocab
[factor.git] / basis / ui / gadgets / line-support / line-support-docs.factor
1 IN: ui.gadgets.line-support
2 USING: help.markup help.syntax ;
3
4 ARTICLE: "ui.gadgets.line-support" "Gadget line support"
5 "The " { $vocab-link "ui.gadgets.line-support" } " vocabulary provides common code shared by gadgets which display a sequence of lines of text. Currently, the two gadgets that use it are " { $link "ui.gadgets.editors" } " and " { $link "ui.gadgets.tables" } "."
6 $nl
7 "The class of line gadgets:"
8 { $subsection line-gadget }
9 { $subsection line-gadget? }
10 "Line gadgets are backed by a model which must be a sequence. The number of lines in the gadget is the length of the sequence."
11 $nl
12 "Line gadgets cannot be created and used directly, instead a subclass must be defined:"
13 { $subsection new-line-gadget }
14 "Subclasses must implement a generic word:"
15 { $subsection draw-line }
16 "Two optional generic words may be implemented; if they are not implemented in the subclass, a default implementation based on font metrics will be used:"
17 { $subsection line-height }
18 { $subsection line-leading }
19 "Validating line numbers:"
20 { $subsection validate-line }
21 "Working with visible lines:"
22 { $subsection visible-lines }
23 { $subsection first-visible-line }
24 { $subsection last-visible-line }
25 "Converting y co-ordinates to line numbers, and vice versa:"
26 { $subsection line>y }
27 { $subsection y>line } ;
28
29 ABOUT: "ui.gadgets.line-support"