Command Parameter Objects

When a command is executed, the command parameters property determines what expressions are passed into the parameters of the function.

If no CommandParameters property is present on a command, the default command parameter settings of Command parameters: HighlightExpression are used.

Commands can be defined to act on the highlighted term or on the whole expression. The Left and Right commands, which move the highlighted term in the parent object are examples of commands that act on parts of the expression above the currently highlighted term.

The parameters of the CommandParameters property can be one or more of the following:

Command parameter Description

HighlightExpression

This is the default if a command object definition doesn't have a command parameters property. This parameter is just the highlighted expression. No Highlight or Settings objects are inserted.

Expression

Includes the whole expression and inserts a Highlight(term) or TextHighlight (term, start, end) object in place of the term that is highlighted.

DisplaySettings

Includes only the highlighted term. If this term has settings (like the rendering name) attached to it, it's replaced by Setting[term, settings]. Only adds the Settings object for the top level term, settings on child terms are ignored.

Examples of the use of the DisplaySettings command parameter include the Rendering Options command and the Increment and Decrement commands. These commands act on the display settings of the highlighted expression.

ModuleSettings The module settings include the notation, the edit mode and the type of module (object module, unit test module, blackboard module or document module). This command parameter is added to commands like Backspace and Copy where one or more of the module settings is used to determine how expressions are processed.

You can see examples of how these objects are used by looking at the Execution Details for commands like Left, Right and Move. To do this, turn on the Execution Details, highlight an appropriate expression and invoke one of these commands.