gtksourceviewmm 3.91.1
Gsv::MarkAttributes Class Reference

#include <gtksourceviewmm/markattributes.h>

Inherits Glib::Object.

Public Member Functions

 MarkAttributes (MarkAttributes&& src) noexcept
 
MarkAttributesoperator= (MarkAttributes&& src) noexcept
 
 ~MarkAttributes () noexcept override
 
GtkSourceMarkAttributes* gobj ()
 Provides access to the underlying C GObject.
 
const GtkSourceMarkAttributes* gobj () const
 Provides access to the underlying C GObject.
 
GtkSourceMarkAttributes* gobj_copy ()
 Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
 
bool get_background (Gdk::RGBA& rgba) const
 Stores background color in rgba.
 
bool is_background_set () const
 
void set_background (const Gdk::RGBA& rgba)
 Sets background color to the one given in rgba.
 
void set_icon_name (const std::string& icon_name)
 Sets a name of an icon to be used as a base for rendered icon.
 
std::string get_icon_name () const
 Gets a name of an icon to be used as a base for rendered icon.
 
Glib::RefPtr< Gio::Icon > get_icon ()
 Gets a Icon to be used as a base for rendered icon.
 
Glib::RefPtr< const Gio::Icon > get_icon () const
 Gets a Icon to be used as a base for rendered icon.
 
void set_icon (const Glib::RefPtr< Gio::Icon >& icon)
 Sets an icon to be used as a base for rendered icon.
 
Glib::RefPtr< const Gdk::Pixbufget_pixbuf () const
 Gets a Gdk::Pixbuf to be used as a base for rendered icon.
 
void set_pixbuf (const Glib::RefPtr< const Gdk::Pixbuf >& pixbuf)
 Sets a pixbuf to be used as a base for rendered icon.
 
Glib::RefPtr< const Gdk::Pixbufrender_icon (Gtk::Widget* widget, int size) const
 Renders an icon of given size.
 
Glib::ustring get_tooltip_text (const Glib::RefPtr< Mark >& mark) const
 Queries for a tooltip by emitting a Gtk::SourceMarkAttributes::signal_query_tooltip_text() signal.
 
Glib::ustring get_tooltip_markup (const Glib::RefPtr< Mark >& mark) const
 Queries for a tooltip by emitting a Gtk::SourceMarkAttributes::signal_query_tooltip_markup() signal.
 
Glib::PropertyProxy< Gdk::RGBAproperty_background ()
 The background.
 
Glib::PropertyProxy_ReadOnly< Gdk::RGBAproperty_background () const
 The background.
 
Glib::PropertyProxy< Glib::RefPtr< Gdk::Pixbuf > > property_pixbuf ()
 The pixbuf.
 
Glib::PropertyProxy_ReadOnly< Glib::RefPtr< Gdk::Pixbuf > > property_pixbuf () const
 The pixbuf.
 
Glib::PropertyProxy< std::string > property_icon_name ()
 The icon name.
 
Glib::PropertyProxy_ReadOnly< std::string > property_icon_name () const
 The icon name.
 
Glib::PropertyProxy< Glib::RefPtr< Gio::Icon > > property_gicon ()
 The GIcon.
 
Glib::PropertyProxy_ReadOnly< Glib::RefPtr< Gio::Icon > > property_gicon () const
 The GIcon.
 
Glib::SignalProxy< Glib::ustring, const Glib::RefPtr< Mark >& > signal_query_tooltip_text ()
 
Glib::SignalProxy< Glib::ustring, const Glib::RefPtr< Mark >& > signal_query_tooltip_markup ()
 

Static Public Member Functions

static GType get_type ()
 Get the GType for this class, for use with the underlying GObject type system.
 
static Glib::RefPtr< MarkAttributescreate ()
 

Protected Member Functions

 MarkAttributes ()
 

Related Symbols

(Note that these are not member symbols.)

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

Constructor & Destructor Documentation

◆ MarkAttributes() [1/2]

Gsv::MarkAttributes::MarkAttributes ( MarkAttributes&& src)
noexcept

◆ ~MarkAttributes()

Gsv::MarkAttributes::~MarkAttributes ( )
overridenoexcept

◆ MarkAttributes() [2/2]

Gsv::MarkAttributes::MarkAttributes ( )
protected

Member Function Documentation

◆ create()

static Glib::RefPtr< MarkAttributes > Gsv::MarkAttributes::create ( )
static

◆ get_background()

bool Gsv::MarkAttributes::get_background ( Gdk::RGBA & rgba) const

Stores background color in rgba.

Parameters
rgbaA Gdk::RGBA.
Returns
Whether background color for attributes was set.

◆ get_icon() [1/2]

Glib::RefPtr< Gio::Icon > Gsv::MarkAttributes::get_icon ( )

Gets a Icon to be used as a base for rendered icon.

Note that the icon can be nullptr if it wasn't set earlier.

Returns
An icon. The icon belongs to attributes and should not be unreffed.

◆ get_icon() [2/2]

Glib::RefPtr< const Gio::Icon > Gsv::MarkAttributes::get_icon ( ) const

Gets a Icon to be used as a base for rendered icon.

Note that the icon can be nullptr if it wasn't set earlier.

Returns
An icon. The icon belongs to attributes and should not be unreffed.

◆ get_icon_name()

std::string Gsv::MarkAttributes::get_icon_name ( ) const

Gets a name of an icon to be used as a base for rendered icon.

Note that the icon name can be nullptr if it wasn't set earlier.

Returns
An icon name. The string belongs to attributes and should not be freed.

◆ get_pixbuf()

Glib::RefPtr< const Gdk::Pixbuf > Gsv::MarkAttributes::get_pixbuf ( ) const

Gets a Gdk::Pixbuf to be used as a base for rendered icon.

Note that the pixbuf can be nullptr if it wasn't set earlier.

Returns
A pixbuf. The pixbuf belongs to attributes and should not be unreffed.

◆ get_tooltip_markup()

Glib::ustring Gsv::MarkAttributes::get_tooltip_markup ( const Glib::RefPtr< Mark >& mark) const

Queries for a tooltip by emitting a Gtk::SourceMarkAttributes::signal_query_tooltip_markup() signal.

The tooltip may contain a markup.

Parameters
markA Gtk::SourceMark.
Returns
A tooltip.

◆ get_tooltip_text()

Glib::ustring Gsv::MarkAttributes::get_tooltip_text ( const Glib::RefPtr< Mark >& mark) const

Queries for a tooltip by emitting a Gtk::SourceMarkAttributes::signal_query_tooltip_text() signal.

The tooltip is a plain text.

Parameters
markA Gtk::SourceMark.
Returns
A tooltip.

◆ get_type()

static GType Gsv::MarkAttributes::get_type ( )
static

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

◆ gobj() [1/2]

GtkSourceMarkAttributes * Gsv::MarkAttributes::gobj ( )
inline

Provides access to the underlying C GObject.

◆ gobj() [2/2]

const GtkSourceMarkAttributes * Gsv::MarkAttributes::gobj ( ) const
inline

Provides access to the underlying C GObject.

◆ gobj_copy()

GtkSourceMarkAttributes * Gsv::MarkAttributes::gobj_copy ( )

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

◆ is_background_set()

bool Gsv::MarkAttributes::is_background_set ( ) const

◆ operator=()

MarkAttributes& Gsv::MarkAttributes::operator= ( MarkAttributes&& src)
noexcept

◆ property_background() [1/2]

Glib::PropertyProxy< Gdk::RGBA > Gsv::MarkAttributes::property_background ( )

The background.

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

◆ property_background() [2/2]

Glib::PropertyProxy_ReadOnly< Gdk::RGBA > Gsv::MarkAttributes::property_background ( ) const

The background.

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_gicon() [1/2]

Glib::PropertyProxy< Glib::RefPtr< Gio::Icon > > Gsv::MarkAttributes::property_gicon ( )

The GIcon.

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

◆ property_gicon() [2/2]

Glib::PropertyProxy_ReadOnly< Glib::RefPtr< Gio::Icon > > Gsv::MarkAttributes::property_gicon ( ) const

The GIcon.

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_icon_name() [1/2]

Glib::PropertyProxy< std::string > Gsv::MarkAttributes::property_icon_name ( )

The icon name.

Default value: ""

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

◆ property_icon_name() [2/2]

Glib::PropertyProxy_ReadOnly< std::string > Gsv::MarkAttributes::property_icon_name ( ) const

The icon 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.

◆ property_pixbuf() [1/2]

Glib::PropertyProxy< Glib::RefPtr< Gdk::Pixbuf > > Gsv::MarkAttributes::property_pixbuf ( )

The pixbuf.

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

◆ property_pixbuf() [2/2]

Glib::PropertyProxy_ReadOnly< Glib::RefPtr< Gdk::Pixbuf > > Gsv::MarkAttributes::property_pixbuf ( ) const

The pixbuf.

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

◆ render_icon()

Glib::RefPtr< const Gdk::Pixbuf > Gsv::MarkAttributes::render_icon ( Gtk::Widget * widget,
int size ) const

Renders an icon of given size.

The base of the icon is set by the last call to one of: set_pixbuf(), set_gicon() or set_icon_name(). size cannot be lower than 1.

Parameters
widgetWidget of which style settings may be used.
sizeSize of the rendered icon.
Returns
A rendered pixbuf. The pixbuf belongs to attributes and should not be unreffed.

◆ set_background()

void Gsv::MarkAttributes::set_background ( const Gdk::RGBA & rgba)

Sets background color to the one given in rgba.

Parameters
rgbaA Gdk::RGBA.

◆ set_icon()

void Gsv::MarkAttributes::set_icon ( const Glib::RefPtr< Gio::Icon > & icon)

Sets an icon to be used as a base for rendered icon.

Parameters
iconA Icon to be used.

◆ set_icon_name()

void Gsv::MarkAttributes::set_icon_name ( const std::string & icon_name)

Sets a name of an icon to be used as a base for rendered icon.

Parameters
icon_nameName of an icon to be used.

◆ set_pixbuf()

void Gsv::MarkAttributes::set_pixbuf ( const Glib::RefPtr< const Gdk::Pixbuf > & pixbuf)

Sets a pixbuf to be used as a base for rendered icon.

Parameters
pixbufA Gdk::Pixbuf to be used.

◆ signal_query_tooltip_markup()

Glib::SignalProxy< Glib::ustring, const Glib::RefPtr< Mark >& > Gsv::MarkAttributes::signal_query_tooltip_markup ( )
Slot Prototype:
Glib::ustring on_my_query_tooltip_markup(const Glib::RefPtr<Mark>& mark)

Flags: Run Last

The code should connect to this signal to provide a tooltip for given mark. The tooltip can contain a markup.

Parameters
markThe Gtk::SourceMark.
Returns
A tooltip.

◆ signal_query_tooltip_text()

Glib::SignalProxy< Glib::ustring, const Glib::RefPtr< Mark >& > Gsv::MarkAttributes::signal_query_tooltip_text ( )
Slot Prototype:
Glib::ustring on_my_query_tooltip_text(const Glib::RefPtr<Mark>& mark)

Flags: Run Last

The code should connect to this signal to provide a tooltip for given mark. The tooltip should be just a plain text.

Parameters
markThe Gtk::SourceMark.
Returns
A tooltip.

Friends And Related Symbol Documentation

◆ wrap()

Glib::RefPtr< Gsv::MarkAttributes > wrap ( GtkSourceMarkAttributes * 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.