1 IN: ui.gadgets.line-support
2 USING: help.markup help.syntax ;
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" } "."
7 "The class of line gadgets:"
12 "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."
14 "Line gadgets cannot be created and used directly, instead a subclass must be defined:"
15 { $subsections new-line-gadget }
16 "Subclasses must implement a generic word:"
17 { $subsections draw-line }
18 "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:"
23 "Validating line numbers:"
24 { $subsections validate-line }
25 "Working with visible lines:"
31 "Converting y co-ordinates to line numbers, and vice versa:"
37 ABOUT: "ui.gadgets.line-support"