34 lines
1.8 KiB
Plaintext
34 lines
1.8 KiB
Plaintext
IN: gadgets-presentations
|
|
USING: help gadgets gadgets-buttons gadgets-lists prettyprint
|
|
generic models operations ;
|
|
|
|
HELP: presentation
|
|
{ $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 } "."
|
|
$nl
|
|
"Presentations are created by calling " { $link <presentation> } "."
|
|
$nl
|
|
"Presentations have two slots:"
|
|
{ $list
|
|
{ { $link presentation-object } " - the object being presented." }
|
|
{ { $link presentation-hook } " - a quotation with stack effect " { $snippet "( presentation -- )" } ". The default value is " { $snippet "[ drop ]" } "." }
|
|
} } ;
|
|
|
|
HELP: invoke-presentation
|
|
{ $values { "presentation" presentation } { "operation" operation } }
|
|
{ $description "Calls the " { $link presentation-hook } " and then invokes the operation on the " { $link presentation-object } "." } ;
|
|
|
|
{ invoke-presentation invoke-primary invoke-secondary } related-words
|
|
|
|
HELP: invoke-primary
|
|
{ $values { "presentation" presentation } }
|
|
{ $description "Invokes the " { $link primary-operation } " associated to the " { $link presentation-object } ". This word is executed when the presentation is clicked with the left mouse button." } ;
|
|
|
|
HELP: invoke-secondary
|
|
{ $values { "presentation" presentation } }
|
|
{ $description "Invokes the " { $link secondary-operation } " associated to the " { $link presentation-object } ". This word is executed when a " { $link list } " receives a " { $snippet "RET" } " key press." } ;
|
|
|
|
HELP: <presentation>
|
|
{ $values { "label" "a label" } { "object" object } { "button" "a new " { $link button } } }
|
|
{ $description "Creates a new " { $link presentation } " derived from " { $link <roll-button> } "." }
|
|
{ $see-also "presentations" } ;
|