Display Settings
The display settings are attached to instances of objects where properties are attached to object definitions. The display settings only affect how an object is rendered, changing a display setting doesn't change whether a pattern match succeeds or fails.
The display settings are not directly editable, but can be accessed through extra objects that are added to represent the display settings when expressions are passed into function by commands. Which display settings are included in an expression when it's passed to a command function is controlled by the CommandParameters property attached to the command.
These objects are converted back into display settings when the function returns an expression containing these objects.
The following objects are used to represent the display settings:
Display setting object | Example expression | Description |
---|---|---|
Highlight | x + Highlight(y) | The Highlight object is used to indicate which term in an expression is highlighted. It can be used in the expression returned by a function to control where the highlight will be placed in the result. |
TextHighlight | TextHighlight(Some text, 3, 3) | The TextHighlight object is used when the caret is showing in text. This happens when the edit mode is Name or Text. The first parameter indicates where the highlight starts and the second parameter indicates the last character that is highlighted. |
Settings | x/y (set) Rendering name = Horizontal | The Settings object is a two parameter object. The first parameter is the expression that contains the display setting. The second parameter can be either a single setting (as in the example expression) or a List of settings. |
The Highlight and TextHighlight could also have been put inside a Settings object, but it seemed like it would be easier to treat these a separate objects. Other that the Highlight and TextHighlight, right now only the RenderingName is used by the Settings object.