gtkmm 4.14.0
Public Member Functions | Protected Attributes | Related Functions | List of all members
Gtk::CssLocation Class Reference

Presents a location in a file - or other source of data parsed by the CSS engine. More...

#include <gtkmm/csslocation.h>

Public Member Functions

 CssLocation ()
 
 CssLocation (const GtkCssLocation * location)
 
 CssLocation (std::size_t bytes, std::size_t chars, std::size_t lines, std::size_t line_bytes, std::size_t line_chars)
 
std::size_t get_bytes () const
 
void set_bytes (const std::size_t & value)
 
std::size_t get_chars () const
 
void set_chars (const std::size_t & value)
 
std::size_t get_lines () const
 
void set_lines (const std::size_t & value)
 
std::size_t get_line_bytes () const
 
void set_line_bytes (const std::size_t & value)
 
std::size_t get_line_chars () const
 
void set_line_chars (const std::size_t & value)
 
GtkCssLocation * gobj ()
 
const GtkCssLocation * gobj () const
 

Protected Attributes

GtkCssLocation gobject_
 

Related Functions

(Note that these are not member functions.)

Gtk::CssLocation wrap (const GtkCssLocation * object)
 A Glib::wrap() method for this object. More...
 

Detailed Description

Presents a location in a file - or other source of data parsed by the CSS engine.

The bytes and line_bytes offsets are meant to be used to programmatically match data. The lines and line_chars offsets can be used for printing the location in a file.

Note that the lines parameter starts from 0 and is increased whenever a CSS line break is encountered. (CSS defines the C character sequences "\r\n", "\r", "\n" and "\f" as newlines.) If your document uses different rules for line breaking, you might run into problems here.

Since gtkmm 3.96:

Constructor & Destructor Documentation

◆ CssLocation() [1/3]

Gtk::CssLocation::CssLocation ( )

◆ CssLocation() [2/3]

Gtk::CssLocation::CssLocation ( const GtkCssLocation *  location)

◆ CssLocation() [3/3]

Gtk::CssLocation::CssLocation ( std::size_t  bytes,
std::size_t  chars,
std::size_t  lines,
std::size_t  line_bytes,
std::size_t  line_chars 
)

Member Function Documentation

◆ get_bytes()

std::size_t Gtk::CssLocation::get_bytes ( ) const
Returns
Number of bytes parsed since the beginning.

◆ get_chars()

std::size_t Gtk::CssLocation::get_chars ( ) const
Returns
Number of characters parsed since the beginning.

◆ get_line_bytes()

std::size_t Gtk::CssLocation::get_line_bytes ( ) const
Returns
Number of bytes parsed since the last line break.

◆ get_line_chars()

std::size_t Gtk::CssLocation::get_line_chars ( ) const
Returns
Number of characters parsed since the last line break.

◆ get_lines()

std::size_t Gtk::CssLocation::get_lines ( ) const
Returns
Number of full lines that have been parsed. If you want to display this as a line number, you need to add 1 to this.

◆ gobj() [1/2]

GtkCssLocation * Gtk::CssLocation::gobj ( )
inline

◆ gobj() [2/2]

const GtkCssLocation * Gtk::CssLocation::gobj ( ) const
inline

◆ set_bytes()

void Gtk::CssLocation::set_bytes ( const std::size_t &  value)

◆ set_chars()

void Gtk::CssLocation::set_chars ( const std::size_t &  value)

◆ set_line_bytes()

void Gtk::CssLocation::set_line_bytes ( const std::size_t &  value)

◆ set_line_chars()

void Gtk::CssLocation::set_line_chars ( const std::size_t &  value)

◆ set_lines()

void Gtk::CssLocation::set_lines ( const std::size_t &  value)

Friends And Related Function Documentation

◆ wrap()

Gtk::CssLocation wrap ( const GtkCssLocation *  object)
related

A Glib::wrap() method for this object.

Parameters
objectThe C instance.
Returns
A C++ instance that wraps a copy of this C instance.

Member Data Documentation

◆ gobject_

GtkCssLocation Gtk::CssLocation::gobject_
protected