Gtk.CssSection¶
Fields¶
None
Methods¶
class |
|
|
|
|
|
|
|
|
|
|
|
|
Details¶
- class Gtk.CssSection¶
Defines a part of a CSS document.
Because sections are nested into one another, you can use [method`CssSection`.get_parent] to get the containing region.
- classmethod new(file, start, end)[source]¶
- Parameters:
start (
Gtk.CssLocation
) – The start locationend (
Gtk.CssLocation
) – The end location
- Returns:
a new
GtkCssSection
- Return type:
Creates a new
GtkCssSection
referring to the section in the givenfile
from thestart
location to theend
location.
- get_end_location()[source]¶
- Returns:
The end location of this section
- Return type:
Returns the location in the CSS document where this section ends.
- get_file()[source]¶
-
Gets the file that self was parsed from.
If no such file exists, for example because the CSS was loaded via [method`Gtk`.CssProvider.load_from_data], then
NULL
is returned.
- get_parent()[source]¶
- Returns:
the parent section
- Return type:
Gets the parent section for the given
section
.The parent section is the section that contains this
section
. A special case are sections of typeGTK_CSS_SECTION_DOCUMEN``T. Their parent will either be ``NULL
if they are the original CSS document that was loaded by [method`Gtk`.CssProvider.load_from_file] or a section of typeGTK_CSS_SECTION_IMPORT
if it was loaded with an@import
rule from a different file.
- get_start_location()[source]¶
- Returns:
The start location of this section
- Return type:
Returns the location in the CSS document where this section starts.
- print_(string)[source]¶
- Parameters:
string (
GLib.String
) – aGString
to print to
Prints the
section
intostring
in a human-readable form.This is a form like
gtk.css:32:1-23
to denote line 32, characters 1 to 23 in the filegtk.css
.
- ref()[source]¶
- Returns:
the CSS section itself.
- Return type:
Increments the reference count on
section
.