]> gitweb.factorcode.org Git - factor.git/commitdiff
Document ui.gadgets.line-support
authorSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Fri, 20 Feb 2009 00:21:05 +0000 (18:21 -0600)
committerSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Fri, 20 Feb 2009 00:21:05 +0000 (18:21 -0600)
basis/ui/gadgets/line-support/line-support-docs.factor [new file with mode: 0644]
basis/ui/ui-docs.factor

diff --git a/basis/ui/gadgets/line-support/line-support-docs.factor b/basis/ui/gadgets/line-support/line-support-docs.factor
new file mode 100644 (file)
index 0000000..164f8d3
--- /dev/null
@@ -0,0 +1,29 @@
+IN: ui.gadgets.line-support
+USING: help.markup help.syntax ;
+
+ARTICLE: "ui.gadgets.line-support" "Gadget line support"
+"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" } "."
+$nl
+"The class of line gadgets:"
+{ $subsection line-gadget }
+{ $subsection line-gadget? }
+"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."
+$nl
+"Line gadgets cannot be created and used directly, instead a subclass must be defined:"
+{ $subsection new-line-gadget }
+"Subclasses must implement a generic word:"
+{ $subsection draw-line }
+"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:"
+{ $subsection line-height }
+{ $subsection line-leading }
+"Validating line numbers:"
+{ $subsection validate-line }
+"Working with visible lines:"
+{ $subsection visible-lines }
+{ $subsection first-visible-line }
+{ $subsection last-visible-line }
+"Converting y co-ordinates to line numbers, and vice versa:"
+{ $subsection line>y }
+{ $subsection y>line } ;
+
+ABOUT: "ui.gadgets.line-support"
\ No newline at end of file
index 6e5fe6baafe66ac9a62f8fc02a3e1be4d532a331..d08dea299edafd4284ec09aeda793d8111997f7d 100644 (file)
@@ -234,6 +234,7 @@ $nl
 { $subsection "ui-paint" }
 { $subsection "ui-control-impl" }
 { $subsection "clipboard-protocol" }
+{ $subsection "ui.gadgets.line-support" }
 { $see-also "ui-layout-impl" } ;
 
 ARTICLE: "starting-ui" "Starting the UI"