1 USING: ui.gadgets help.markup help.syntax ui.gadgets.worlds
6 { $values { "target" object } { "commands" "a sequence of commands" } { "hook" { $quotation "( button -- )" } } { "menu" "a new " { $link gadget } } }
7 { $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." } ;
10 { $values { "owner" gadget } { "menu" gadget } }
11 { $description "Displays a popup menu in the " { $link world } " containing " { $snippet "owner" } " at the current mouse location. The popup menu can be any gadget." } ;
13 HELP: show-commands-menu
14 { $values { "target" gadget } { "commands" "a sequence of commands" } }
15 { $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 } "." }
16 { $notes "Useful for right-click context menus." } ;
18 ARTICLE: "ui.gadgets.menus" "Popup menus"
19 "The " { $vocab-link "ui.gadgets.menus" } " vocabulary implements popup menus."
20 { $subsection <commands-menu> }
21 { $subsection show-menu }
22 { $subsection show-commands-menu } ;
24 ABOUT: "ui.gadgets.menus"