]> gitweb.factorcode.org Git - factor.git/blob - basis/ui/pens/pens-docs.factor
factor: clean up whitespace in -docs files
[factor.git] / basis / ui / pens / pens-docs.factor
1 IN: ui.pens
2 USING: help.markup help.syntax kernel ui.gadgets ;
3
4 HELP: draw-interior
5 { $values { "gadget" gadget } { "pen" object } }
6 { $contract "Draws the interior of a gadget by making OpenGL calls. The " { $snippet "interior" } " slot may be set to objects implementing this generic word." } ;
7
8 HELP: draw-boundary
9 { $values { "gadget" gadget } { "pen" object } }
10 { $contract "Draws the boundary of a gadget by making OpenGL calls. The " { $snippet "boundary" } " slot may be set to objects implementing this generic word." } ;
11
12 ARTICLE: "ui-pen-protocol" "UI pen protocol"
13 "The " { $snippet "interior" } " and " { $snippet "boundary" } " slots of a gadget facilitate easy factoring and sharing of drawing logic. Objects stored in these slots must implement the pen protocol:"
14 { $subsections
15     draw-interior
16     draw-boundary
17 }
18 "The default value of these slots is the " { $link f } " singleton, which implements the above protocol by doing nothing."
19 $nl
20 "Some other pre-defined implementations:"
21 { $vocab-subsection "Gradient pens" "ui.pens.gradient" }
22 { $vocab-subsection "Image pens" "ui.pens.image" }
23 { $vocab-subsection "Polygon pens" "ui.pens.polygon" }
24 { $vocab-subsection "Solid pens" "ui.pens.solid" }
25 { $vocab-subsection "Tile pens" "ui.pens.tile" }
26 "Custom implementations must follow the guidelines set forth in " { $link "ui-paint-custom" } "." ;