factor/core/ui/gadgets/presentations.facts

41 lines
2.2 KiB
Plaintext

IN: gadgets-presentations
USING: help gadgets gadgets-buttons gadgets-lists prettyprint
generic models ;
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 } "."
$terpri
"Presentations are created by calling " { $link <presentation> } "."
$terpri
"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 ]" } "." }
} }
{ $see-also "presentations" <command-button> } ;
HELP: invoke-presentation
{ $values { "presentation" presentation } { "command" command } }
{ $description "Calls the " { $link presentation-hook } " and then invokes the command on the " { $link presentation-object } "." }
{ $see-also invoke-primary invoke-secondary } ;
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." }
{ $see-also invoke-secondary } ;
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 "RETURN" } " key press." }
{ $see-also invoke-primary } ;
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" } ;
HELP: <presentation-help>
{ $values { "model" model } { "gadget" "a new " { $link gadget } } }
{ $description "Creates a new " { $link gadget } " displaying a " { $link summary } " of the model value." }
{ $notes "If the " { $snippet "model" } " is " { $link world-status } ", this gadget will display " { $link presentation } " mouse over help." } ;