factor/basis/ui/gadgets/menus/menus-docs.factor

27 lines
1.3 KiB
Factor
Raw Normal View History

2008-01-05 17:27:15 -05:00
USING: ui.gadgets help.markup help.syntax ui.gadgets.worlds
kernel ;
IN: ui.gadgets.menus
HELP: <commands-menu>
2009-10-21 18:40:43 -04:00
{ $values { "target" object } { "hook" { $quotation "( button -- )" } } { "commands" "a sequence of commands" } { "menu" "a new " { $link gadget } } }
2008-01-05 17:27:15 -05:00
{ $description "Creates a popup menu of commands which are to be invoked on " { $snippet "target" } ". The " { $snippet "hook" } " quotation is run before a command is invoked." } ;
2007-09-20 18:09:08 -04:00
HELP: show-menu
{ $values { "owner" gadget } { "menu" gadget } }
{ $description "Displays a popup menu in the " { $link world } " containing " { $snippet "owner" } " at the current mouse location. The popup menu can be any gadget." } ;
HELP: show-commands-menu
2008-11-30 18:56:33 -05:00
{ $values { "target" gadget } { "commands" "a sequence of commands" } }
{ $description "Displays a popup menu with the given commands. The commands act on the target gadget. This is just a convenience word that combines " { $link <commands-menu> } " with " { $link show-menu } "." }
{ $notes "Useful for right-click context menus." } ;
ARTICLE: "ui.gadgets.menus" "Popup menus"
"The " { $vocab-link "ui.gadgets.menus" } " vocabulary displays popup menus in " { $link "ui.gadgets.glass" } "."
{ $subsections
<commands-menu>
show-menu
show-commands-menu
} ;
ABOUT: "ui.gadgets.menus"