gtksourceviewmm: Gsv::StyleScheme Class Reference

gtksourceviewmm 3.91.1

Public Member Functions | Static Public Member Functions | Related Symbols | List of all members
Gsv::StyleScheme Class Reference

Object controlling appearance of View. More...

`#include <gtksourceviewmm/stylescheme.h>`

Inherits Glib::Object.

## Public Member Functions
| StyleScheme (StyleScheme&& src) noexcept
StyleScheme& | operator= (StyleScheme&& src) noexcept
| ~StyleScheme () noexcept override
GtkSourceStyleScheme* | gobj ()
| Provides access to the underlying C GObject.
const GtkSourceStyleScheme* | gobj () const
| Provides access to the underlying C GObject.
GtkSourceStyleScheme* | gobj_copy ()
| Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
Glib::ustring | get_id () const
| Gets scheme id.
Glib::ustring | get_name () const
| Gets scheme name.
Glib::ustring | get_description () const
| Gets scheme description.
std::vector< Glib::ustring > | get_authors () const
| Gets scheme authors.
std::string | get_filename () const
| Gets scheme filename.
Glib::RefPtr< Style > | get_style (const Glib::ustring& style_id)
| Gets style corresponding to style_id in scheme.
Glib::RefPtr< const Style > | get_style (const Glib::ustring& style_id) const
| Gets style corresponding to style_id in scheme.
Glib::PropertyProxy_ReadOnly< std::string > | property_id () const
| Style scheme id.
Glib::PropertyProxy_ReadOnly< Glib::ustring > | property_name () const
| Style scheme name.
Glib::PropertyProxy_ReadOnly< Glib::ustring > | property_description () const
| Style scheme description.
Glib::PropertyProxy_ReadOnly< std::string > | property_filename () const
| Style scheme filename.

## Static Public Member Functions
static GType | get_type ()
| Get the GType for this class, for use with the underlying GObject type system.

## Related Symbols
(Note that these are not member symbols.)
Glib::RefPtr< Gsv::StyleScheme > | wrap (GtkSourceStyleScheme* object, bool take_copy=false)
| A Glib::wrap() method for this object.

## Detailed Description

Object controlling appearance of View.

StyleScheme contains all the text styles to be used in View and Buffer. For instance, it contains text styles for syntax highlighting, it may contain foreground and background color for non-highlighted text, color for the line numbers, etc.

Style schemes are stored in XML files. The format of a scheme file is the documented in the C library gtksourceview documentation.

Since gtksourceviewmm 2.2

## Constructor & Destructor Documentation

## ◆ StyleScheme()

Gsv::StyleScheme::StyleScheme | ( | StyleScheme && | src | ) |
| noexcept

## ◆ ~StyleScheme()

Gsv::StyleScheme::~StyleScheme | ( |  | ) |
| overridenoexcept

## Member Function Documentation

## ◆ get_authors()

std::vector< Glib::ustring > Gsv::StyleScheme::get_authors | ( |  | ) | const

Gets scheme authors.

Returns
  Array with scheme authors.

Since gtksourceviewmm 2.2

## ◆ get_description()

Glib::ustring Gsv::StyleScheme::get_description | ( |  | ) | const

Gets scheme description.

Returns
  Scheme description.

Since gtksourceviewmm 2.2

## ◆ get_filename()

std::string Gsv::StyleScheme::get_filename | ( |  | ) | const

Gets scheme filename.

Returns
  Scheme file name if the scheme was created parsing a style scheme file or empty string in the other cases.

Since gtksourceviewmm 2.2

## ◆ get_id()

Glib::ustring Gsv::StyleScheme::get_id | ( |  | ) | const

Gets scheme id.

Returns
  Scheme id.

Since gtksourceviewmm 2.2

## ◆ get_name()

Glib::ustring Gsv::StyleScheme::get_name | ( |  | ) | const

Gets scheme name.

Returns
  Scheme name.

Since gtksourceviewmm 2.2

## ◆ get_style() [1/2]

Glib::RefPtr< Style > Gsv::StyleScheme::get_style | ( | const Glib::ustring & | style_id | ) |

Gets style corresponding to style_id in scheme.

Parameters

  style_id | Id of the style to retrieve.

Returns
  Style which corresponds to style_id in the scheme, or empty Glib::RefPtr when no style with this name found.

Since gtksourceviewmm 2.2

## ◆ get_style() [2/2]

Glib::RefPtr< const Style > Gsv::StyleScheme::get_style | ( | const Glib::ustring & | style_id | ) | const

Gets style corresponding to style_id in scheme.

Parameters

  style_id | Id of the style to retrieve.

Returns
  Style which corresponds to style_id in the scheme, or empty Glib::RefPtr when no style with this name found.

Since gtksourceviewmm 2.2

## ◆ get_type()

GType Gsv::StyleScheme::get_type | ( |  | ) |
| static

Get the GType for this class, for use with the underlying GObject type system.

## ◆ gobj() [1/2]

GtkSourceStyleScheme * Gsv::StyleScheme::gobj | ( |  | ) |
| inline

Provides access to the underlying C GObject.

## ◆ gobj() [2/2]

const GtkSourceStyleScheme * Gsv::StyleScheme::gobj | ( |  | ) | const
| inline

Provides access to the underlying C GObject.

## ◆ gobj_copy()

GtkSourceStyleScheme * Gsv::StyleScheme::gobj_copy | ( |  | ) |

Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.

## ◆ operator=()

StyleScheme& Gsv::StyleScheme::operator= | ( | StyleScheme&& | src | ) |
| noexcept

## ◆ property_description()

Glib::PropertyProxy_ReadOnly< Glib::ustring > Gsv::StyleScheme::property_description | ( |  | ) | const

Style scheme description.

Default value: ""

Returns
  A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

## ◆ property_filename()

Glib::PropertyProxy_ReadOnly< std::string > Gsv::StyleScheme::property_filename | ( |  | ) | const

Style scheme filename.

Default value: ""

Returns
  A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

## ◆ property_id()

Glib::PropertyProxy_ReadOnly< std::string > Gsv::StyleScheme::property_id | ( |  | ) | const

Style scheme id.

Default value: ""

Returns
  A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

## ◆ property_name()

Glib::PropertyProxy_ReadOnly< Glib::ustring > Gsv::StyleScheme::property_name | ( |  | ) | const

Style scheme name.

Default value: ""

Returns
  A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

## Friends And Related Symbol Documentation

## ◆ wrap()

Glib::RefPtr< Gsv::StyleScheme > wrap | ( | GtkSourceStyleScheme * | object,
|  | bool | take_copy = false )
| related

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

Parameters

  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.

Returns
  A C++ instance that wraps this C instance.