Style Scheme Definition ReferenceStyle Scheme Definition Reference — Reference to the GtkSourceView style scheme definition file format |
Overview
This is an overview of the Style Scheme Definition XML format, describing the
meaning and usage of every element and attribute. The formal definition is
stored in the RelaxNG schema file style.rng
which
should be installed on your system in the directory
${PREFIX}/share/gtksourceview-3.0/
(where
${PREFIX}
can be /usr/
or
/usr/local/
if you have installed from source).
The toplevel tag in a style scheme file is <style-scheme>
.
It has the following attributes:
|
Identifier for the style scheme. This is must be unique among style schemes. |
|
Name of the style scheme. This is the name of the scheme to display to user, e.g. in a preferences dialog. |
|
This is the same as |
|
Style schemes may have parent schemes: all styles but those specified in the scheme will be taken from the parent scheme. In this way a scheme may be customized without copying all its content. |
|
Style scheme format identifier. At the moment it must be "1.0". |
style-scheme
tag may contain the following tags:
|
Name of the style scheme author. |
|
Description of the style scheme. |
|
Same as |
|
These define color names to be used in |
|
See below for their format description. |
Each style
tag describes a single element of style scheme (it corresponds
to #GtkSourceStyle object). It has the following attributes:
|
Name of the style. It can be anything, syntax highlighting uses lang-id:style-id, and there are few special styles which are used to control general appearance of the text. Style scheme may contain other names to be used in an application. For instance, it may define color to highlight compilation errors in a build log or a color for bookmarks. |
|
Foreground color. It may be name defined in one of |
|
Background color. |
|
"true" or "false" |
|
"true" or "false" |
|
"true" or "false" |
|
"true" or "false" |
|
Scale the matched text block. Possible values are a float number as factor
(e.g. |
The following are names of styles which control #GtkSourceView appearance:
|
Default style of text. |
|
Style of selected text. |
|
Style of selected text when the widget doesn't have input focus. |
|
Text cursor style. Only |
|
Secondary cursor style (used in bidi text). Only |
|
Current line style. Only |
|
Text and background colors for the left margin, on which line numbers are drawn |
|
Style to use for matching brackets. |
|
Style to use for mismatching brackets. |
|
Style to use for the right margin. The |
|
Style to use for drawing spaces (special symbols for a space, a tabulation, etc).
Only the |