CONTEXTMENU action attribute

The CONTEXTMENU attribute defines whether a context menu option must be displayed for an action.

Syntax

Syntax 1 (Dialog action handlers and form action defaults)

CONTEXTMENU = [ AUTO | YES | NO ]

Syntax 2 (Global .4ad action defaults file)

contextMenu = [ "yes" | "no" | "auto" ]

Usage

CONTEXTMENU is an action attribute defining whether the context menu option must be displayed for an action.

Important: Actions to be displayed in a context menu must have a TEXT attribute. If the TEXT attribute is not defined or is empty, the action will not be shown in the context menu.

Possible values for CONTEXTMENU are:

  1. NO indicates that no context menu option must be displayed for this action.
  2. YES indicates that a context menu option must always be displayed for this action, if the action is visible.
  3. AUTO means that the context menu option is displayed if no explicit action view is used for that action and the action is visible.
The default is YES.
Note: With some front-ends, the CONTEXTMENU=AUTO attribute will be interpreted as CONTEXTMENU=YES. Consider using CONTEXTMENU=NO or leave the default (CONTEXTMENU=YES).

This attribute applies to the actions defined by the current dialog in the current window. It can be specified as action default attribute in a global .4ad file, in the ACTION DEFAULTS section of form files, or as dialog action attribute.

Example

-- As action handler attribute
ON ACTION zoom ATTRIBUTES(CONTEXTMENU=YES)

-- As action default
ACTION DEFAULTS
  ACTION zoom (CONTEXTMENU=YES)
END

-- In a global action defaults file
<ActionDefault name="zoom" contextMenu="yes" ... />