popup parameter

Use the popup parameter to set or query the pop-up (context) menu.

 

Availability

query command
set command
current parameter
default parameter
install parameter

 

Scope

popup is scoped to the current view.
current.popup is scoped to the current view.
default.popup is globally scoped.
install.popup is globally scoped.

 

Syntax

query popup
set popup { default
          | [ menuItem menuAction
            | beginSubmenu menuItem
            | endSubmenu
            | separator
            ] [...]
          }
query current.popup
query default.popup
set default.popup { install
                  | [ menuItem menuAction
                    | beginSubmenu menuItem
                    | endSubmenu
                    | separator
                    ] [...]
                  }
query install.popup 

 

Parameters

default If you specify the default parameter for the set popup command, the current view will use the value of default.popup as the pop-up menu for the current document view.
[ menuItem menuAction
| beginSubmenu menuItem
| endSubmenu
| separator
] [...]
If you specify a pop-up menu for the set popup command, the current view will use the specified pop-up menu as its pop-up menu.  If you specify a pop-up menu for the set default.popup command, all document views that have default.popup set to default will use the specified pop-up menu.

Use the menuItem parameter to specify the text for the menu item.  It may either be a key for a string in the Resources.properties file, or a quoted string.  The menuAction parameter must be an editor action.

Use the beginSubmenu parameter to start a new submenu.  Use the menuItem parameter to set the text for the new submenu.  It may either be a key for a string in the Resources.properties file, or a quoted string.

Use the endSubmenu parameter to terminate the current submenu.

Use the separator parameter to insert a separator between two menu items.
install If you specify the install parameter for the set default.popup command, all of the views that have popup set to default will use the value of install.popup as the pop-up menu.

 

Description

The query current.popup command will return the pop-up menu that is being used by the current view.

 

Examples

query popup
set popup "Cut" cut "Copy" copy "Paste" paste
query current.popup
query default.popup
set default.popup install
query install.popup 

Related reference
query command
set command
current parameter
default parameter
install parameter