XUICETokenStyle
Description
Every token in the code editor generated by a formatter has an associated style, specified by the code editor's theme. A style specifies the colour of the text, whether it is bold, etc. Token styles are represented by this class.
Properties
Name | Type | Read-Only |
---|---|---|
BackgroundColour | ColorGroup |
|
Bold | Boolean |
|
Colour | ColorGroup |
|
HasBackgroundColour | Boolean |
|
Italic | Boolean |
|
Underline | Boolean |
Methods
Name | Parameters | Returns |
---|---|---|
Clone | XUICETokenStyle |
|
Constructor | ||
Constructor | d As Dictionary |
|
ToTOML | String |
Constants
Name | Type |
---|---|
KEY_BACKGROUND_COLOUR | String |
KEY_BOLD | String |
KEY_COLOUR | String |
KEY_HAS_BACKGROUND_COLOUR | String |
KEY_ITALIC | String |
KEY_UNDERLINE | String |
KEY_BACKGROUND_COLOUR As String The JSON key for this style's background colour.
KEY_BOLD As String The JSON key for this style's bold status.
KEY_COLOUR As String The JSON key for this style's colour.
KEY_HAS_BACKGROUND_COLOUR As String The JSON key for this style's HasBackgroundColour status.
KEY_ITALIC As String The JSON key for this style's italic status.
KEY_UNDERLINE As String The JSON key for this style's underline status.
Property Descriptions
BackgroundColour As ColorGroup
The colour of this token's background (if enabled).
Bold As Boolean
True if this token should be bold.
Colour As ColorGroup
The colour of this token's text.
HasBackgroundColour As Boolean
True if this style has a background colour.
Italic As Boolean
True if this token should be italicised.
Underline As Boolean
True if this token should be underlined.
Method Descriptions
Clone() As XUICETokenStyle
Returns a clone of this object.
Constructor()
Default constructor.
Constructor(d As Dictionary)
Instantiates a new token style from a Dictionary
.
Assumes that ColorGroup
values are strings in the following format:
"&hAARRGGBB"
or "&hAARRGGBB,&hAARRGGBB"
Where AA
, RR
, GG
and BB
are the colour's alpha, red, green and blue values.
If only one colour is provided it is used in both light and dark mode. If two colours are provided (separated by a comma) then the first is used in light mode and the second in dark mode. If two colours are provided and the OS doesn't support dark mode then the first colour is used.
ToTOML() As String
Returns a TOML representation of this style.