StyleSchemeManager#

class StyleSchemeManager(**properties: Any)#

Superclasses: Object

Provides access to StyleSchemes.

Constructors#

class StyleSchemeManager
classmethod new() StyleSchemeManager#

Creates a new style manager.

If you do not need more than one style manager then use get_default instead.

Methods#

class StyleSchemeManager
append_search_path(path: str) None#

Appends path to the list of directories where the manager looks for style scheme files.

See set_search_path for details.

Parameters:

path – a directory or a filename.

force_rescan() None#

Mark any currently cached information about the available style schems as invalid.

All the available style schemes will be reloaded next time the manager is accessed.

classmethod get_default() StyleSchemeManager#

Returns the default StyleSchemeManager instance.

get_scheme(scheme_id: str) StyleScheme | None#

Looks up style scheme by id.

Parameters:

scheme_id – style scheme id to find.

get_scheme_ids() list[str] | None#

Returns the ids of the available style schemes.

get_search_path() list[str]#

Returns the current search path for the manager.

See set_search_path for details.

prepend_search_path(path: str) None#

Prepends path to the list of directories where the manager looks for style scheme files.

See set_search_path for details.

Parameters:

path – a directory or a filename.

set_search_path(path: list[str] | None = None) None#

Sets the list of directories where the manager looks for style scheme files.

If path is None, the search path is reset to default.

Since GtkSourceView 5.16 this function will allow you to provide paths in the form of “resource:///” URIs to embedded GResources. They must contain the path of a directory within the GResource.

Parameters:

path – a None-terminated array of strings or None.

Properties#

class StyleSchemeManager
props.scheme_ids: list[str]#
props.search_path: list[str]#