GtkSource.MarkAttributes
Description: Reference for GtkSource.MarkAttributes

### Class

# GtkSourceMarkAttributes

#### Description [src]

    final class GtkSource.MarkAttributes : GObject.Object
    {
      /* No available fields */
    }

The source mark attributes object.

`GtkSourceMarkAttributes` is an object specifying attributes used by a `GtkSourceView` to visually show lines marked with `GtkSourceMark`s of a specific category. It allows you to define a background color of a line, an icon shown in gutter and tooltips.

The background color is used as a background of a line where a mark is placed and it can be set with `gtk_source_mark_attributes_set_background()`. To check if any custom background color was defined and what color it is, use `gtk_source_mark_attributes_get_background()`.

An icon is a graphic element which is shown in the gutter of a view. An example use is showing a red filled circle in a debugger to show that a breakpoint was set in certain line. To get an icon that will be placed in a gutter, first a base for it must be specified and then `gtk_source_mark_attributes_render_icon()` must be called. There are several ways to specify a base for an icon:

- `gtk_source_mark_attributes_set_icon_name()`
- `gtk_source_mark_attributes_set_gicon()`
- `gtk_source_mark_attributes_set_pixbuf()`

Using any of the above functions overrides the one used earlier. But note that a getter counterpart of earlier used function can still return some value, but it is just not used when rendering the proper icon.

To provide meaningful tooltips for a given mark of a category, you should connect to `GtkSourceMarkAttributes::query-tooltip-text` or `GtkSourceMarkAttributes::query-tooltip-markup` where the latter takes precedence.

#### Hierarchy

#### Ancestors

- GObject

#### Constructors

###### gtk_source_mark_attributes_new

Creates a new source mark attributes.

#### Instance methods

###### gtk_source_mark_attributes_get_background

Stores background color in `background`.

###### gtk_source_mark_attributes_get_gicon

Gets a `GIcon` to be used as a base for rendered icon.

###### gtk_source_mark_attributes_get_icon_name

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

###### gtk_source_mark_attributes_get_pixbuf

Gets a `GdkPixbuf` to be used as a base for rendered icon.

###### gtk_source_mark_attributes_get_tooltip_markup

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

###### gtk_source_mark_attributes_get_tooltip_text

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

###### gtk_source_mark_attributes_render_icon

Renders an icon of given size.

###### gtk_source_mark_attributes_set_background

Sets background color to the one given in `background`.

###### gtk_source_mark_attributes_set_gicon

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

###### gtk_source_mark_attributes_set_icon_name

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

###### gtk_source_mark_attributes_set_pixbuf

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

##### Methods inherited from GObject (43)

Please see GObject for a full list of methods.

#### Properties

###### GtkSource.MarkAttributes:background

A color used for background of a line.

###### GtkSource.MarkAttributes:gicon

A `GIcon` that may be a base of a rendered icon.

###### GtkSource.MarkAttributes:icon-name

An icon name that may be a base of a rendered icon.

###### GtkSource.MarkAttributes:pixbuf

A `GdkPixbuf` that may be a base of a rendered icon.

#### Signals

###### GtkSource.MarkAttributes::query-tooltip-markup

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

###### GtkSource.MarkAttributes::query-tooltip-text

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

##### Signals inherited from GObject (1)

###### GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

#### Class structure

    struct GtkSourceMarkAttributesClass {
      GObjectClass parent_class;

    }

No description available.

###### Class members

`parent_class: GObjectClass`

  No description available.