]> gitweb.factorcode.org Git - factor.git/blob - basis/ui/gadgets/presentations/presentations-docs.factor
c651e849a28288263026051ca13a33f0e4e45c7c
[factor.git] / basis / ui / gadgets / presentations / presentations-docs.factor
1 USING: help.markup help.syntax ui.gadgets.buttons
2 ui.gadgets.menus models ui.operations summary kernel
3 ui.gadgets.worlds ui.gadgets ui.gadgets.status-bar ;
4 IN: ui.gadgets.presentations
5
6 HELP: presentation
7 { $class-description "A presentation is a " { $link button } " which represents an object. Left-clicking a presentation invokes the default " { $link operation } ", and right-clicking displays a menu of possible operations output by " { $link object-operations } "."
8 $nl
9 "Presentations are created by calling " { $link <presentation> } "."
10 $nl
11 "Presentations have two slots:"
12 { $list
13     { { $snippet "object" } " - the object being presented." }
14     { { $snippet "hook" } " - a quotation with stack effect " { $snippet "( presentation -- )" } ". The default value is " { $snippet "[ drop ]" } "." }
15 } } ;
16
17 HELP: invoke-presentation
18 { $values { "presentation" presentation } { "command" "a command" } }
19 { $description "Calls the " { $snippet "hook" } " and then invokes the command on the " { $snippet "object" } "." } ;
20
21 { invoke-presentation invoke-primary invoke-secondary } related-words
22
23 HELP: invoke-primary
24 { $values { "presentation" presentation } } 
25 { $description "Invokes the " { $link primary-operation } " associated to the " { $snippet "object" } ". This word is executed when the presentation is clicked with the left mouse button." } ;
26
27 HELP: invoke-secondary
28 { $values { "presentation" presentation } } 
29 { $description "Invokes the " { $link secondary-operation } " associated to the " { $snippet "object" } ". This word is executed when a list receives a " { $snippet "RET" } " key press." } ;
30
31 HELP: <presentation>
32 { $values { "label" "a label" } { "object" object } { "button" "a new " { $link button } } }
33 { $description "Creates a new " { $link presentation } " derived from " { $link <roll-button> } "." }
34 { $see-also "presentations" } ;
35
36 { <button> <bevel-button> <command-button> <roll-button> <presentation> } related-words
37
38 { <commands-menu> <toolbar> operations-menu show-menu } related-words
39
40 { <status-bar> show-mouse-help show-status show-summary hide-status } related-words
41
42 HELP: show-mouse-help
43 { $values { "presentation" presentation } }
44 { $description "Displays a " { $link summary } " of the " { $snippet "object" } "in the status bar of the " { $link world } " containing this presentation. This word is executed when the mouse enters the presentation." } ;
45
46 ARTICLE: "ui.gadgets.presentations" "Presentation gadgets"
47 "Outliner gadgets are usually not constructed directly, and instead are written to " { $link "ui.gadgets.panes" } " with formatted stream output words (" { $link "presentations" } ")."
48 { $subsection presentation }
49 { $subsection <presentation> }
50 "Presentations remember the object they are presenting; operations can be performed on the presented object. See " { $link "ui-operations" } "." ;
51
52 ABOUT: "ui.gadgets.presentations"