gtkmm 3.24.7
|
Defines a part of a CSS document. More...
#include <gtkmm/csssection.h>
Public Member Functions | |
void | reference () const |
Increment the reference count for this object. More... | |
void | unreference () const |
Decrement the reference count for this object. More... | |
GtkCssSection * | gobj () |
Provides access to the underlying C instance. More... | |
const GtkCssSection * | gobj () const |
Provides access to the underlying C instance. More... | |
GtkCssSection * | gobj_copy () const |
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. More... | |
CssSection ()=delete | |
CssSection (const CssSection &)=delete | |
CssSection & | operator= (const CssSection &)=delete |
CssSectionType | get_section_type () const |
Gets the type of information that section describes. More... | |
Glib::RefPtr< CssSection > | get_parent () |
Gets the parent section for the given section. More... | |
Glib::RefPtr< const CssSection > | get_parent () const |
Gets the parent section for the given section. More... | |
Glib::RefPtr< Gio::File > | get_file () |
Gets the file that section was parsed from. More... | |
Glib::RefPtr< const Gio::File > | get_file () const |
Gets the file that section was parsed from. More... | |
unsigned int | get_start_line () const |
Returns the line in the CSS document where this section starts. More... | |
unsigned int | get_start_position () const |
Returns the offset in bytes from the start of the current line returned via get_start_line(). More... | |
unsigned int | get_end_line () const |
Returns the line in the CSS document where this section end. More... | |
unsigned int | get_end_position () const |
Returns the offset in bytes from the start of the current line returned via get_end_line(). More... | |
Protected Member Functions | |
void | operator delete (void *, std::size_t) |
Related Functions | |
(Note that these are not member functions.) | |
Glib::RefPtr< Gtk::CssSection > | wrap (GtkCssSection * object, bool take_copy=false) |
A Glib::wrap() method for this object. More... | |
Defines a part of a CSS document.
Because sections are nested into one another, you can use get_parent() to get the containing region.
There is no public method that creates a CssSection, but it is input data to a Gtk::CssProvider::signal_parsing_error() handler.
|
delete |
|
delete |
unsigned int Gtk::CssSection::get_end_line | ( | ) | const |
Returns the line in the CSS document where this section end.
The line number is 0-indexed, so the first line of the document will return 0. This value may change in future invocations of this function if section is not yet parsed completely. This will for example happen in the GtkCssProvider::parsing-error signal. The end position and line may be identical to the start position and line for sections which failed to parse anything successfully.
unsigned int Gtk::CssSection::get_end_position | ( | ) | const |
Returns the offset in bytes from the start of the current line returned via get_end_line().
This value may change in future invocations of this function if section is not yet parsed completely. This will for example happen in the GtkCssProvider::parsing-error signal. The end position and line may be identical to the start position and line for sections which failed to parse anything successfully.
Glib::RefPtr< Gio::File > Gtk::CssSection::get_file | ( | ) |
Gets the file that section was parsed from.
If no such file exists, for example because the CSS was loaded via Gtk::CssProvider::load_from_data(), then nullptr
is returned.
nullptr
if section was parsed from other data. Glib::RefPtr< const Gio::File > Gtk::CssSection::get_file | ( | ) | const |
Gets the file that section was parsed from.
If no such file exists, for example because the CSS was loaded via Gtk::CssProvider::load_from_data(), then nullptr
is returned.
nullptr
if section was parsed from other data. Glib::RefPtr< CssSection > Gtk::CssSection::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 nullptr
if they are the original CSS document that was loaded by Gtk::CssProvider::load_from_file() or a section of type Gtk::CSS_SECTION_IMPORT if it was loaded with an import rule from a different file.
nullptr
if none. Glib::RefPtr< const CssSection > Gtk::CssSection::get_parent | ( | ) | const |
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 nullptr
if they are the original CSS document that was loaded by Gtk::CssProvider::load_from_file() or a section of type Gtk::CSS_SECTION_IMPORT if it was loaded with an import rule from a different file.
nullptr
if none. CssSectionType Gtk::CssSection::get_section_type | ( | ) | const |
unsigned int Gtk::CssSection::get_start_line | ( | ) | const |
Returns the line in the CSS document where this section starts.
The line number is 0-indexed, so the first line of the document will return 0.
unsigned int Gtk::CssSection::get_start_position | ( | ) | const |
Returns the offset in bytes from the start of the current line returned via get_start_line().
GtkCssSection * Gtk::CssSection::gobj | ( | ) |
Provides access to the underlying C instance.
const GtkCssSection * Gtk::CssSection::gobj | ( | ) | const |
Provides access to the underlying C instance.
GtkCssSection * Gtk::CssSection::gobj_copy | ( | ) | const |
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
|
protected |
|
delete |
void Gtk::CssSection::reference | ( | ) | const |
Increment the reference count for this object.
You should never need to do this manually - use the object via a RefPtr instead.
void Gtk::CssSection::unreference | ( | ) | const |
Decrement the reference count for this object.
You should never need to do this manually - use the object via a RefPtr instead.
|
related |
A Glib::wrap() method for this object.
object | The C instance. |
take_copy | False if the result should take ownership of the C instance. True if it should take a new copy or ref. |