Gnome::Gtk4::N-CssSection
#------------------------------------------------------------------------------- #--[Class Description]---------------------------------------------------------- #-------------------------------------------------------------------------------
=begin rakudoc
Description
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.
=end rakudoc
#------------------------------------------------------------------------------- #--[Class Initialization]------------------------------------------------------- #-------------------------------------------------------------------------------
=begin rakudoc
Class initialization
new
:native-object
Create an object using a native object from an object of the same type found elsewhere. See also Gnome::N::TopLevelSupportClass.
multi method new ( N-Object() :$native-object! )
=end rakudoc
#------------------------------------------------------------------------------- =begin rakudoc
new-csssection
Creates a new Gnome::Gtk4::N-CssSection referring to the section in the given file from the start location to the end location.
method new-csssection ( N-Object() $file, N-Object $start, N-Object $end --> Gnome::Gtk4::CssSection )
$file; The file this section refers to.
$start; The start location
$end; The end location
=end rakudoc
#------------------------------------------------------------------------------- =begin rakudoc
new-with-bytes
Creates a new Gnome::Gtk4::N-CssSection referring to the section in the given file or the given bytes from the start location to the end location.
method new-with-bytes ( N-Object() $file, N-Object $bytes, N-Object $start, N-Object $end --> Gnome::Gtk4::CssSection )
$file; The file this section refers to.
$bytes; The bytes this sections refers to
$start; The start location
$end; The end location
=end rakudoc
#------------------------------------------------------------------------------- #--[Methods]-------------------------------------------------------------------- #-------------------------------------------------------------------------------
=begin rakudoc
Methods =end rakudoc
#------------------------------------------------------------------------------- =begin rakudoc
get-bytes
Gets the bytes that $section was parsed from.
method get-bytes (--> N-Object )
Return value; the Gnome::Glib::N-Bytes from which the section was parsed.
=end rakudoc
#------------------------------------------------------------------------------- =begin rakudoc
get-end-location
Returns the location in the CSS document where this section ends.
method get-end-location (--> N-Object )
Return value; The end location of this section.
=end rakudoc
#------------------------------------------------------------------------------- =begin rakudoc
get-file
Gets the file that $section was parsed from.
If no such file exists, for example because the CSS was loaded via .load-from-data() in class Gnome, then undefined is returned.
method get-file (--> N-Object )
Return value; the Gnome::Gio::File from which the section was parsed.
=end rakudoc
#------------------------------------------------------------------------------- =begin rakudoc
get-parent
Gets the parent section for the given section.
The parent section is the section that contains this section. A special
case are sections of type GTK_CSS_SECTION_DOCUMENT. Their parent will
either be undefined if they are the original CSS document that was loaded by
.load-from-file() in class Gnome or a section of type
GTK_CSS_SECTION_IMPORT if it was loaded with an ` $import` rule from
a different file.
method get-parent (--> N-Object )
Return value; the parent section.
=end rakudoc
#------------------------------------------------------------------------------- =begin rakudoc
get-start-location
Returns the location in the CSS document where this section starts.
method get-start-location (--> N-Object )
Return value; The start location of this section.
=end rakudoc
#------------------------------------------------------------------------------- =begin rakudoc
Prints the section into string 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 file gtk.css`.
method print ( N-Object $string )
$string; a Gnome::Glib::N-String to print to
=end rakudoc
#------------------------------------------------------------------------------- =begin rakudoc
ref
Increments the reference count on section.
method ref (--> N-Object )
Return value; the CSS section itself..
=end rakudoc
#------------------------------------------------------------------------------- =begin rakudoc
to-string
Prints the section into a human-readable text form using .print().
method to-string (--> Str )
Return value; A new string..
=end rakudoc
#------------------------------------------------------------------------------- =begin rakudoc
unref
Decrements the reference count on section, freeing the structure if the reference count reaches 0.
method unref ( )
=end rakudoc