gtksourceviewmm: Gsv::MarkAttributes Class Reference

gtksourceviewmm 3.18.0

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Static Public Member Functions | Protected Member Functions | Related Functions | List of all members
Gsv::MarkAttributes Class Reference

`#include <gtksourceviewmm/markattributes.h>`

Inheritance diagram for Gsv::MarkAttributes:
[legend]

## Public Member Functions
| MarkAttributes (MarkAttributes&& src) noexcept
MarkAttributes& | operator= (MarkAttributes&& src) noexcept
virtual | ~MarkAttributes () noexcept
GtkSourceMarkAttributes* | gobj ()
| Provides access to the underlying C GObject. More...
const GtkSourceMarkAttributes* | gobj () const
| Provides access to the underlying C GObject. More...
GtkSourceMarkAttributes* | gobj_copy ()
| Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. More...
bool | get_background (Gdk::RGBA& rgba) const
| Stores background color in rgba. More...
bool | is_background_set () const
void | set_background (const Gdk::RGBA& rgba)
| Sets background color to the one given in rgba. More...
std::string | get_stock_id () const
| Gets a stock id of an icon used by this attributes. More...
void | set_stock_id (const std::string& stock_id)
| Sets stock id to be used as a base for rendered icon. More...
void | set_icon_name (const std::string& icon_name)
| Sets a name of an icon to be used as a base for rendered icon. More...
std::string | get_icon_name () const
| Gets a name of an icon to be used as a base for rendered icon. More...
Glib::RefPtr< Gio::Icon > | get_icon ()
| Gets a Icon to be used as a base for rendered icon. More...
Glib::RefPtr< const Gio::Icon > | get_icon () const
| Gets a Icon to be used as a base for rendered icon. More...
void | set_icon (const Glib::RefPtr< Gio::Icon >& icon)
| Sets an icon to be used as a base for rendered icon. More...
Glib::RefPtr< const Gdk::Pixbuf > | get_pixbuf () const
| Gets a Gdk::Pixbuf to be used as a base for rendered icon. More...
void | set_pixbuf (const Glib::RefPtr< const Gdk::Pixbuf >& pixbuf)
| Sets a pixbuf to be used as a base for rendered icon. More...
Glib::RefPtr< const Gdk::Pixbuf > | render_icon (Gtk::Widget* widget, int size) const
| Renders an icon of given size. More...
Glib::ustring | get_tooltip_text (const Glib::RefPtr< Mark >& mark) const
| Queries for a tooltip by emitting a GtkSourceMarkAttributes::query-tooltip-text signal. More...
Glib::ustring | get_tooltip_markup (const Glib::RefPtr< Mark >& mark) const
| Queries for a tooltip by emitting a GtkSourceMarkAttributes::query-tooltip-markup signal. More...
Glib::PropertyProxy< Gdk::RGBA > | property_background ()
| The background. More...
Glib::PropertyProxy_ReadOnly< Gdk::RGBA > | property_background () const
| The background. More...
Glib::PropertyProxy< std::string > | property_stock_id ()
| The stock id. More...
Glib::PropertyProxy_ReadOnly< std::string > | property_stock_id () const
| The stock id. More...
Glib::PropertyProxy< Glib::RefPtr< Gdk::Pixbuf > > | property_pixbuf ()
| The pixbuf. More...
Glib::PropertyProxy_ReadOnly< Glib::RefPtr< Gdk::Pixbuf > > | property_pixbuf () const
| The pixbuf. More...
Glib::PropertyProxy< std::string > | property_icon_name ()
| The icon name. More...
Glib::PropertyProxy_ReadOnly< std::string > | property_icon_name () const
| The icon name. More...
Glib::PropertyProxy< Glib::RefPtr< Gio::Icon > > | property_gicon ()
| The GIcon. More...
Glib::PropertyProxy_ReadOnly< Glib::RefPtr< Gio::Icon > > | property_gicon () const
| The GIcon. More...
Glib::SignalProxy1< Glib::ustring, const Glib::RefPtr< Mark >& > | signal_query_tooltip_text ()
Glib::SignalProxy1< Glib::ustring, const Glib::RefPtr< Mark >& > | signal_query_tooltip_markup ()
Public Member Functions inherited from Glib::Object
| Object (const Object &)=delete
Object & | operator= (const Object &)=delete
| Object (Object &&src) noexcept
Object & | operator= (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::Object > | wrap (GObject *object, bool take_copy=false)
Public Member Functions inherited from Glib::ObjectBase
| ObjectBase (const ObjectBase &)=delete
ObjectBase & | operator= (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 ()
trackable & | operator= (const trackable &src)
trackable & | operator= (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...
static Glib::RefPtr< MarkAttributes > | create ()

## Protected Member Functions
| MarkAttributes ()
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
ObjectBase & | operator= (ObjectBase &&src) noexcept
virtual | ~ObjectBase () noexcept=0
void | initialize (GObject *castitem)
void | initialize_move (GObject *castitem, Glib::ObjectBase *previous_wrapper)

## Related Functions
(Note that these are not member functions.)
Glib::RefPtr< Gsv::MarkAttributes > | wrap (GtkSourceMarkAttributes* 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

## Constructor & Destructor Documentation

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

virtual Gsv::MarkAttributes::~MarkAttributes | ( |  | ) |
| virtualnoexcept

Gsv::MarkAttributes::MarkAttributes | ( |  | ) |
| protected

## Member Function Documentation

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

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

Stores background color in rgba.

Parameters

  rgba | A Gdk::RGBA.

Returns
  Whether background color for attributes was set.

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 `0` if it wasn't set earlier.

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

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 `0` if it wasn't set earlier.

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

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 `0` if it wasn't set earlier.

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

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 `0` if it wasn't set earlier.

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

std::string Gsv::MarkAttributes::get_stock_id | ( |  | ) | const

Gets a stock id of an icon used by this attributes.

Note that the stock id can be `0` if it wasn't set earlier.

Deprecated:
  This should not be used in newly-written code.

Returns
  Stock id. Returned string is owned by attributes and shouldn't be freed.

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

Queries for a tooltip by emitting a GtkSourceMarkAttributes::query-tooltip-markup signal.

The tooltip may contain a markup.

Parameters

  mark | A Gtk::SourceMark.

Returns
  A tooltip. The returned string should be freed by using Glib::free() when done with it.

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

Queries for a tooltip by emitting a GtkSourceMarkAttributes::query-tooltip-text signal.

The tooltip is a plain text.

Parameters

  mark | A Gtk::SourceMark.

Returns
  A tooltip. The returned string should be freed by using Glib::free() when done with it.

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

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

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

Provides access to the underlying C GObject.

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

Provides access to the underlying C GObject.

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.

bool Gsv::MarkAttributes::is_background_set | ( |  | ) | const

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

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.

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.

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.

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.

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

The icon name.

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.

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

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

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.

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.

Glib::PropertyProxy< std::string > Gsv::MarkAttributes::property_stock_id | ( |  | ) |

The stock id.

Deprecated:
  This should not be used in newly-written code.

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.

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

The stock id.

Deprecated:
  This should not be used in newly-written code.

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::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(), set_icon_name() or set_stock_id(). size cannot be lower than 1.

Parameters

  widget | Widget of which style settings may be used.
  size | Size of the rendered icon.

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

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

Sets background color to the one given in rgba.

Parameters

  rgba | A Gdk::RGBA.

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

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

Parameters

  icon | A Icon to be used.

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_name | Name of an icon to be used.

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

  pixbuf | A Gdk::Pixbuf to be used.

void Gsv::MarkAttributes::set_stock_id | ( | const std::string & | stock_id | ) |

Sets stock id to be used as a base for rendered icon.

Deprecated:
  This should not be used in newly-written code.

Parameters

  stock_id | A stock id.

Glib::SignalProxy1< 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)`

Glib::SignalProxy1< 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)`

## Friends And Related Function Documentation

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