The dynamic section adds new menu items to the context menu.
The section can have the following entry types, all of which are optional:
var block to
define "local" variables.
item entries.
These appear as top-level items in a context menu.
menu entries.
These appear as top-level sub-menus in a context menu.
separator
entries. These create a horizontal line between the given entries.
imports. The content of the
given file will be placed in the position of the import.
While the var block should be at the top of the section, the other entries can appear in any order.
In the following example, one top-level item is created, that is separated with a horizontal line from an adjacent sub-menu,
which in turn has one sub-item
on its own:
shell
{
dynamic
{
item(title = 'Hello, World!')
separator
menu(title = 'sub menu' image = #0000ff)
{
item(title = 'test sub-item')
}
}
}
menuitem is an umbrella term for those entry types, that may appear in a menu. These simply include the following:
items create a single menu entry.
Either a title or a image property is
mandatory (set to a non-null value). For further details, please refer to the properties section below.
item( title = value [property = value [...] ])
menu entries create a new sub-menu. They have properties and sub-entries.
Either a title or a image property is
mandatory (set to a non-null value). For further details, please refer to the properties section below.
menus can have the following entry types, all of which are optional:
var block to
define "local" variables.
item entries.
menu entries.
separator
entries. These create a horizontal line between the given entries.
imports. The content of the
given file will be placed in the position of the import.
menu( title = value [property = value [...] ])
{
[ item() [...] ]
[ menu(){} [...] ]
[ separator [...] ]
[ import 'path/to/import.nss' [...] ]
}
separators create a horizontal line.
separators do not have any mandatory properties. Please refer to the properties section below for further details.
separator
separator( property = value [property = value [...] ])
The Applies column shows, whether the property applies to menus, items and/or separators. If set in bold, then the property is mandatory for the given type.
| Property | Applies | Summary | ||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Where | M | Display menuitem if true is returned. Allows the evaluation of arbitrary
expressions, e.g.
ifDefault = true |
||||||||||||||||||||||||||||||||||
| Title | M | I | Sets the caption of the menuitem. It is mandatory for menu and item entries, unless a |
|||||||||||||||||||||||||||||||||
| Mode | M | I | S | Display menuitem by type of selection. The value has one of the following parameters
(of type string):
|
||||||||||||||||||||||||||||||||
| Type | M | I | S | Specifies the types of objects for which the menuitem will be displayed. Possible values are shown below. Separate multiple types with the pipe character ( |), in
which case the menuitem is displayed if any of the given types is matched.To exclude a given type, prefix its value with the tilde character ( ~).
Expressions are not supported with this property.
|
||||||||||||||||||||||||||||||||
| Visibility (vis) | M | I | S | Sets the visibility of a menuitem. Can have one of the following parameters:
|
||||||||||||||||||||||||||||||||
| Find | M | I | S |
Display menuitem when the specified path name or path extension matches the current
find property. Syntax find = 'exe' Find any word contains "exe" find = '"exe"' Match whole word only find = '*exe' Find a word that ends with find = 'exe*' Find a word that starts with find = '!exe' Find any word not contains "exe" find = '!"exe"' Search for any word not equal to "exe" find = '!*exe' Find a word that not ends with find = 'exe*!' Find a word that starts with find = '.exe' Find an equal extension for ".exe" find = '!.exe' Find an not equal extension for ".exe" find = '.exe|.dll' Find an equal extension for ".exe" or ".dll" |
||||||||||||||||||||||||||||||||
| Separator (sep) | M | I | Add a separator to the menuitem:
|
|||||||||||||||||||||||||||||||||
| Position (pos) | M | I | S | The position at which a menuitem should be inserted into the menu. Position can have one of the following parameters:
|
||||||||||||||||||||||||||||||||
| Image, Icon | M | I | The icon that appears in a menuitem. This property can be assigned as image files,
resource icons, glyph
or color. With one of the following parameters
|
|||||||||||||||||||||||||||||||||
| Parent, Menu | M | I | S | Move current menuitem to another menu. Default = null |
||||||||||||||||||||||||||||||||
| Command (cmd) | I | The command associated with the menuitem. Occurs when the menuitem is clicked or selected using a shortcut key or access key defined for the menuitem. Default = null |
||||||||||||||||||||||||||||||||||
| Arguments (arg, args) | I | The command line parameters to pass to the command property of a menuitem. Default = null |
||||||||||||||||||||||||||||||||||
| Invoke | I | Set execution type
|
||||||||||||||||||||||||||||||||||
| Window | I | Controls how the window of the executed command
is to be shown. Can be one of the following parameters:
|
||||||||||||||||||||||||||||||||||
| Directory (dir) | I | Specifies the working directory to execute the command in. Default = null |
||||||||||||||||||||||||||||||||||
| Admin | I | Execute the command with administrative permissions. Default = false |
||||||||||||||||||||||||||||||||||
| Verb | I | Specifies the default operation for the selected file. Value type string
and can have one of the following parameters:
|
||||||||||||||||||||||||||||||||||
| Wait | I |
Wait for the command to complete. Default = false |
||||||||||||||||||||||||||||||||||
| Checked | I | Type of select option:
|
||||||||||||||||||||||||||||||||||
| Default | M | I |
Specifies that the item is the default. A menu can contain only one default menuitem, which is displayed in bold. Default = false |
|||||||||||||||||||||||||||||||||
| Expanded | M |
Move all immediate menuitems to the parent menu. Default = false |
||||||||||||||||||||||||||||||||||
| Column(col) | M | I | Create a new column. Default = true | |||||||||||||||||||||||||||||||||
| Keys | M | I | Show keyboard shortcuts. Default = null |
|||||||||||||||||||||||||||||||||
| Tip | M | I |
Show a tooltip for the current menu or item. Default = nullSyntax
|
|||||||||||||||||||||||||||||||||