factor/basis/ui/pens/pens-docs.factor

24 lines
1.3 KiB
Factor
Raw Normal View History

2009-02-12 04:58:42 -05:00
IN: ui.pens
USING: help.markup help.syntax kernel ui.gadgets ;
HELP: draw-interior
2009-02-14 22:53:39 -05:00
{ $values { "pen" object } { "gadget" gadget } }
2009-02-12 04:58:42 -05:00
{ $contract "Draws the interior of a gadget by making OpenGL calls. The " { $snippet "interior" } " slot may be set to objects implementing this generic word." } ;
HELP: draw-boundary
2009-02-14 22:53:39 -05:00
{ $values { "pen" object } { "gadget" gadget } }
2009-02-12 04:58:42 -05:00
{ $contract "Draws the boundary of a gadget by making OpenGL calls. The " { $snippet "boundary" } " slot may be set to objects implementing this generic word." } ;
ARTICLE: "ui-pen-protocol" "UI pen protocol"
"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:"
{ $subsection draw-interior }
{ $subsection draw-boundary }
"The default value of these slots is the " { $link f } " singleton, which implements the above protocol by doing nothing."
$nl
"Some other pre-defined implementations:"
2009-02-19 17:54:27 -05:00
{ $vocab-subsection "Gradient pens" "ui.pens.gradient" }
{ $vocab-subsection "Image pens" "ui.pens.image" }
{ $vocab-subsection "Polygon pens" "ui.pens.polygon" }
{ $vocab-subsection "Solid pens" "ui.pens.solid" }
{ $vocab-subsection "Tile pens" "ui.pens.tile" }
2009-02-12 04:58:42 -05:00
"Custom implementations must follow the guidelines set forth in " { $link "ui-paint-custom" } "." ;