Table of Contents

Enum VisualRole

Namespace
Terminal.Gui.Drawing
Assembly
Terminal.Gui.dll

Represents the semantic visual role of a visual element rendered by a View. Each VisualRole maps to a property of Scheme (e.g., Normal).

public enum VisualRole
Extension Methods

Fields

Active = 4

The visual role for elements that are active or selected (e.g., selected item in a ListView). Also used for headers in, HexView, CharMap.

Code = 10

The visual role for preformatted or source code content (e.g., MarkdownCodeBlock, inline code). If not explicitly set, derived from Editable with a dimmed background and bold style.

CodeAttribute = 22

The visual role for source-code attributes.

CodeComment = 11

The visual role for source-code comments.

CodeConstant = 19

The visual role for source-code constants.

CodeFunctionName = 21

The visual role for source-code function names.

CodeIdentifier = 18

The visual role for source-code identifiers.

CodeKeyword = 12

The visual role for source-code keywords.

CodeNumber = 14

The visual role for source-code numeric literals.

CodeOperator = 15

The visual role for source-code operators.

CodePreprocessor = 17

The visual role for source-code preprocessor directives.

CodePunctuation = 20

The visual role for source-code punctuation.

CodeString = 13

The visual role for source-code string literals.

CodeType = 16

The visual role for source-code type names.

Disabled = 7

The visual role for elements that are disabled and not interactable.

Editable = 8

The visual role for elements that are editable (e.g., TextField).

Focus = 2

The visual role when the element is focused.

Highlight = 6

The visual role for elements that are highlighted (e.g., when the mouse is inside over a Button).

HotActive = 5

The visual role for Active elements with a HotKey indicator.

HotFocus = 3

The visual role for Focus elements with a HotKey indicator.

HotNormal = 1

The visual role for Normal elements with a HotKey indicator.

Normal = 0

The default visual role for unfocused, unselected, enabled elements.

ReadOnly = 9

The visual role for elements that are normally editable but currently read-only.

Remarks

A single View may render as one or multiple elements. Each element can be associated with a different VisualRole.