gtksourceviewmm: Gsv::StyleScheme Class Reference

Object controlling appearance of View. More...

#include <gtksourceviewmm/stylescheme.h>

Inheritance diagram for Gsv::StyleScheme:

Public Member Functions

 StyleScheme (StyleScheme&& src) noexcept
 
StyleSchemeoperator= (StyleScheme&& src) noexcept
 
virtual ~StyleScheme () noexcept
 
GtkSourceStyleScheme* gobj ()
 Provides access to the underlying C GObject. More...

 
const GtkSourceStyleScheme* gobj () const
 Provides access to the underlying C GObject. More...

 
GtkSourceStyleScheme* gobj_copy ()
 Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. More...

 
Glib::ustring get_id () const
 Gets scheme id. More...

 
Glib::ustring get_name () const
 Gets scheme name. More...

 
Glib::ustring get_description () const
 Gets scheme description. More...

 
std::vector< Glib::ustringget_authors () const
 Gets scheme authors. More...

 
std::string get_filename () const
 Gets scheme filename. More...

 
Glib::RefPtr< Styleget_style (const Glib::ustring& style_id)
 Gets style corresponding to style_id in scheme. More...

 
Glib::RefPtr< const Styleget_style (const Glib::ustring& style_id) const
 Gets style corresponding to style_id in scheme. More...

 
Glib::PropertyProxy_ReadOnly< std::stringproperty_id () const
 Style scheme id. More...

 
Glib::PropertyProxy_ReadOnly< Glib::ustringproperty_name () const
 Style scheme name. More...

 
Glib::PropertyProxy_ReadOnly< Glib::ustringproperty_description () const
 Style scheme description. More...

 
Glib::PropertyProxy_ReadOnly< std::stringproperty_filename () const
 Style scheme filename. More...

 
- Public Member Functions inherited from Glib::Object
 Object (const Object &)=delete
 
Objectoperator= (const Object &)=delete
 
 Object (Object &&src) noexcept
 
Objectoperator= (Object &&src) noexcept
 
void * get_data (const QueryQuark &key)
 
void set_data (const Quark &key, void *data)
 
void set_data (const Quark &key, void *data, DestroyNotify notify)
 
void remove_data (const QueryQuark &quark)
 
void * steal_data (const QueryQuark &quark)
 
Glib::RefPtr< Glib::Objectwrap (GObject *object, bool take_copy=false)
 
- Public Member Functions inherited from Glib::ObjectBase
 ObjectBase (const ObjectBase &)=delete
 
ObjectBaseoperator= (const ObjectBase &)=delete
 
void set_property_value (const Glib::ustring &property_name, const Glib::ValueBase &value)
 
void get_property_value (const Glib::ustring &property_name, Glib::ValueBase &value) const
 
void set_property (const Glib::ustring &property_name, const PropertyType &value)
 
void get_property (const Glib::ustring &property_name, PropertyType &value) const
 
void connect_property_changed (const Glib::ustring &property_name, const sigc::slot< void > &slot)
 
sigc::connection connect_property_changed_with_return (const Glib::ustring &property_name, const sigc::slot< void > &slot)
 
void freeze_notify ()
 
void thaw_notify ()
 
virtual void reference () const
 
virtual void unreference () const
 
GObject * gobj ()
 
const GObject * gobj () const
 
GObject * gobj_copy () const
 
- Public Member Functions inherited from sigc::trackable
 trackable ()
 
 trackable (const trackable &src)
 
 trackable (trackable &&src) noexcept
 
 ~trackable ()
 
void add_destroy_notify_callback (void *data, func_destroy_notify func) const
 
void notify_callbacks ()
 
trackableoperator= (const trackable &src)
 
trackableoperator= (trackable &&src) noexcept
 
void remove_destroy_notify_callback (void *data) const
 

Static Public Member Functions

static GType get_type ()
 Get the GType for this class, for use with the underlying GObject type system. More...

 

Related Functions

(Note that these are not member functions.)

Glib::RefPtr< Gsv::StyleSchemewrap (GtkSourceStyleScheme* object, bool take_copy=false)
 A Glib::wrap() method for this object. More...

 

Additional Inherited Members

- Public Types inherited from Glib::Object
typedef void(* DestroyNotify) (gpointer data)
 
- Public Types inherited from sigc::trackable
typedef internal::func_destroy_notify func_destroy_notify
 
- Protected Member Functions inherited from Glib::Object
 Object ()
 
 Object (const Glib::ConstructParams &construct_params)
 
 Object (GObject *castitem)
 
virtual ~Object () noexcept
 
- Protected Member Functions inherited from Glib::ObjectBase
 ObjectBase ()
 
 ObjectBase (const char *custom_type_name)
 
 ObjectBase (const std::type_info &custom_type_info)
 
 ObjectBase (ObjectBase &&src) noexcept
 
ObjectBaseoperator= (ObjectBase &&src) noexcept
 
virtual ~ObjectBase () noexcept=0
 
void initialize (GObject *castitem)
 
void initialize_move (GObject *castitem, Glib::ObjectBase *previous_wrapper)
 

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

Gsv::StyleScheme::StyleScheme ( StyleScheme&&  src)
noexcept
virtual Gsv::StyleScheme::~StyleScheme ( )
virtualnoexcept

Member Function Documentation

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

Gets scheme authors.

Returns
Array with scheme authors.
Since gtksourceviewmm 2.2:
Glib::ustring Gsv::StyleScheme::get_description ( ) const

Gets scheme description.

Returns
Scheme description.
Since gtksourceviewmm 2.2:
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:
Glib::ustring Gsv::StyleScheme::get_id ( ) const

Gets scheme id.

Returns
Scheme id.
Since gtksourceviewmm 2.2:
Glib::ustring Gsv::StyleScheme::get_name ( ) const

Gets scheme name.

Returns
Scheme name.
Since gtksourceviewmm 2.2:
Glib::RefPtr<Style> Gsv::StyleScheme::get_style ( const Glib::ustring style_id)

Gets style corresponding to style_id in scheme.

Parameters
style_idId 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:
Glib::RefPtr<const Style> Gsv::StyleScheme::get_style ( const Glib::ustring style_id) const

Gets style corresponding to style_id in scheme.

Parameters
style_idId 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:
static GType Gsv::StyleScheme::get_type ( )
static

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

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

Provides access to the underlying C GObject.

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

Provides access to the underlying C GObject.

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.

StyleScheme& Gsv::StyleScheme::operator= ( StyleScheme&&  src)
noexcept
Glib::PropertyProxy_ReadOnly< Glib::ustring > Gsv::StyleScheme::property_description ( ) const

Style scheme description.

Returns
A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.
Glib::PropertyProxy_ReadOnly< std::string > Gsv::StyleScheme::property_filename ( ) const

Style scheme filename.

Returns
A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.
Glib::PropertyProxy_ReadOnly< std::string > Gsv::StyleScheme::property_id ( ) const

Style scheme id.

Returns
A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.
Glib::PropertyProxy_ReadOnly< Glib::ustring > Gsv::StyleScheme::property_name ( ) const

Style scheme name.

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 Function Documentation

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

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

Parameters
objectThe C instance.
take_copyFalse 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.