Documents

Dynamic Items


The optional dynamic section adds new menu items to the context menu.

Sub-items

The section can have the following entry types, all of which are optional:

  • One var block to define "local" variables.
  • Menuitems, i.e. one or more of the following:
    • One or more item entries. These appear as top-level items in a context menu.
    • One or more menu entries. These appear as top-level sub-menus in a context menu.
    • One or more separator entries. These create a horizontal line between the given entries.
  • One or more 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.

Example

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

items create a single menu entry.

Properties

Either a title or a image property is mandatory (set to a non-null value). For further details, please refer to the properties page.

Syntax
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 page.

menus can have the following entry types, all of which are optional:

  • One var block to define "local" variables.
  • Menuitems, i.e. one or more of the following:
  • One or more 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

separators create a horizontal line.

Properties

separators do not have any mandatory properties. Please refer to the properties page for further details.

Syntax
separator
separator( property = value [property = value [...] ])

This page is open source. Noticed a typo? Or something unclear?
Improve this page on GitHub