StyleScheme

class StyleScheme(**properties: Any)

Superclasses: Object

Controls the appearance of View.

StyleScheme contains all the text styles to be used in View and Buffer. For instance, it contains text styles for syntax highlighting, it may contain foreground and background color for non-highlighted text, color for the line numbers, current line highlighting, bracket matching, etc.

Style schemes are stored in XML files. The format of a scheme file is documented in the style scheme reference.

The two style schemes with IDs “classic” and “tango” follow more closely the GTK theme (for example for the background color).

Methods

class StyleScheme
get_authors() list[str] | None
get_description() str | None
get_filename() str | None
get_id() str
get_metadata(name: str) str | None

Gets a metadata property from the style scheme.

Added in version 5.4.

Parameters:

name – metadata property name.

get_name() str
get_style(style_id: str) Style | None
Parameters:

style_id – id of the style to retrieve.

Properties

class StyleScheme
props.description: str

Style scheme description, a translatable string to present to the user.

props.filename: str

Style scheme filename or None.

props.id: str

Style scheme id, a unique string used to identify the style scheme in StyleSchemeManager.

props.name: str

Style scheme name, a translatable string to present to the user.