2 USING: help.markup help.syntax kernel ui.gadgets ;
5 { $values { "pen" object } { "gadget" gadget } }
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." } ;
9 { $values { "pen" object } { "gadget" gadget } }
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." } ;
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 { $subsection draw-interior }
15 { $subsection draw-boundary }
16 "The default value of these slots is the " { $link f } " singleton, which implements the above protocol by doing nothing."
18 "Some other pre-defined implementations:"
19 { $vocab-subsection "Gradient pens" "ui.pens.gradient" }
20 { $vocab-subsection "Image pens" "ui.pens.image" }
21 { $vocab-subsection "Polygon pens" "ui.pens.polygon" }
22 { $vocab-subsection "Solid pens" "ui.pens.solid" }
23 { $vocab-subsection "Tile pens" "ui.pens.tile" }
24 "Custom implementations must follow the guidelines set forth in " { $link "ui-paint-custom" } "." ;