first +keyboard+ word-prop gesture>string $snippet ;
HELP:+keyboard+
{ $description "A key which may be set in the hashtable passed to " { $link define-operation } ". The value is a gesture." } ;
HELP:+primary+
{ $description "A key which may be set in the hashtable passed to " { $link define-operation } ". If set to a true value, this operation becomes the default operation performed when a presentation matching the operation's predicate is clicked with the mouse." } ;
HELP:operation
{ $description "An abstraction for an operation which may be performed on a presentation."
{ $values { "operation" operation } { "gesture""a gesture or " { $link f } } }
{ $description "Outputs the keyboard gesture associated with the operation." } ;
HELP:operations
{ $var-description "Global variable holding a vector of " { $link operation } " instances. New operations can be added with " { $link define-operation } "." } ;
{ $description "Outputs a sequence of operations applicable to the given object, by testing each defined operation's " { $snippet "predicate" } " quotation in turn." } ;
{ $description "Outputs the operation which should be invoked when a " { $snippet "RET" } " is pressed while a presentation of " { $snippet "obj" } " is selected in a list." } ;
{ $description "Defines an operation on objects matching the predicate. The hashtable can contain the following keys:"
{ $list
{ { $link +listener+ } " - if set to a true value, the operation will run in the listener" }
{ { $link +description+ } " - can be set to a string description of the operation" }
{ { $link +primary+ } " - if set to a true value, the operation will be output by " { $link primary-operation } " when applied to an object satisfying the predicate" }
{ { $link +secondary+ } " - if set to a true value, the operation will be output by " { $link secondary-operation } " when applied to an object satisfying the predicate" }
{ { $link +keyboard+ } " - can be set to a keyboard gesture; the guesture will be used by " { $link define-operation-map } }
{ $description "Defines a command map named " { $snippet "group" } " on " { $snippet "class" } " consisting of operations applicable to " { $snippet "object" } ". The translator quotation is applied to the target gadget, and the result of the translator is passed to the operation." } ;
{ $description "Converts the element to a quotation and calls it; the resulting quotation must have stack effect " { $snippet "( -- obj )" } ". Prints a list of operations applicable to the object, together with keyboard shortcuts." } ;
HELP:$operation
{ $values { "element""a sequence containing a single word" } }
{ $description "Prints the keyboard shortcut associated with the word, which must have been previously defined as an operation by a call to " { $link define-operation } "." } ;
ARTICLE: "ui-operations""Operations"
"Operations are commands performed on presentations."