]> gitweb.factorcode.org Git - factor.git/blob - unmaintained/ui/offscreen/offscreen-docs.factor
tools.test: Make the flag public. Finish porting tester changes to fuzzer.
[factor.git] / unmaintained / ui / offscreen / offscreen-docs.factor
1 ! Copyright (C) 2008 Joe Groff.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: help.markup help.syntax kernel quotations ui.gadgets
4 images strings ui.gadgets.worlds ;
5 IN: ui.offscreen
6
7 HELP: <offscreen-world>
8 { $values
9      { "gadget" gadget } { "title" string } { "status" "a boolean" }
10      { "world" offscreen-world }
11 }
12 { $description "Constructs an " { $link offscreen-world } " gadget with " { $snippet "gadget" } " as its only child. Generally you should use " { $link open-offscreen } " or " { $link do-offscreen } " instead of calling this word directly." } ;
13
14 HELP: close-offscreen
15 { $values
16      { "world" offscreen-world }
17 }
18 { $description "Releases the resources used by the rendering buffer for " { $snippet "world" } "." } ;
19
20 HELP: do-offscreen
21 { $values
22      { "gadget" gadget } { "quot" quotation }
23 }
24 { $description "Constructs an " { $link offscreen-world } " around " { $snippet "gadget" } " with " { $link open-offscreen } ", calls " { $snippet "quotation" } " with the world on the top of the stack, and cleans up the world with " { $link close-offscreen } " at the end of " { $snippet "quotation" } "." } ;
25
26 HELP: gadget>bitmap
27 { $values
28      { "gadget" gadget }
29      { "image" image }
30 }
31 { $description "Renders " { $snippet "gadget" } " to an " { $link offscreen-world } " and creates an " { $link image } " from its contents." } ;
32
33 HELP: offscreen-world
34 { $class-description "The class of " { $link world } " objects that render to an offscreen buffer." } ;
35
36 HELP: offscreen-world>bitmap
37 { $values
38      { "world" offscreen-world }
39      { "image" image }
40 }
41 { $description "Saves a copy of the contents of " { $snippet "world" } " to a " { $link image } " object." } ;
42
43 HELP: open-offscreen
44 { $values
45      { "gadget" gadget }
46      { "world" offscreen-world }
47 }
48 { $description "Creates and sets up an " { $link offscreen-world } " with " { $snippet "gadget" } " as its only child." } ;
49
50 { offscreen-world open-offscreen close-offscreen do-offscreen } related-words
51
52 ARTICLE: "ui.offscreen" "Offscreen UI rendering"
53 "The " { $vocab-link "ui.offscreen" } " provides words for rendering gadgets to an offscreen buffer so that bitmaps can be made from their contents."
54 { $subsections offscreen-world }
55 "Opening gadgets offscreen:"
56 { $subsections
57     open-offscreen
58     close-offscreen
59     do-offscreen
60 }
61 "Creating bitmaps from offscreen buffers:"
62 { $subsections
63     offscreen-world>bitmap
64     gadget>bitmap
65 } ;
66
67 ABOUT: "ui.offscreen"