gtksource.mark_attributes

Module for [MarkAttributes] class

Types 3

The source mark attributes object.

gtksource.mark_attributes.MarkAttributes is an object specifying attributes used by a gtksource.view.View to visually show lines marked with gtksource.mark.Marks 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 gtksource.mark_attributes.MarkAttributes.setBackground. To check if any custom background color was defined and what color it is, use gtksource.mark_attributes.MarkAttributes.getBackground.

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 gtksource.mark_attributes.MarkAttributes.renderIcon must be called. There are several ways to specify a base for an icon:

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 gtksource.mark_attributes.MarkAttributes.queryTooltipText or gtksource.mark_attributes.MarkAttributes.queryTooltipMarkup where the latter takes precedence.

Methods
GType _getGType() static nothrow
GType _gType() @property nothrow
MarkAttributes self() nothrowReturns `this`, for use in `with` statements.
MarkAttributesGidBuilder builder() static nothrowGet builder for [gtksource.mark_attributes.MarkAttributes] Returns: New builder object
gdk.rgba.RGBA background() @property nothrowGet `background` property. Returns: A color used for background of a line.
void background(gdk.rgba.RGBA propval) @property nothrowSet `background` property. Params: propval = A color used for background of a line.
gio.icon.Icon gicon() @property nothrowGet `gicon` property. Returns: A #GIcon that may be a base of a rendered icon.
void gicon(gio.icon.Icon propval) @property nothrowSet `gicon` property. Params: propval = A #GIcon that may be a base of a rendered icon.
string iconName() @property nothrowGet `iconName` property. Returns: An icon name that may be a base of a rendered icon.
void iconName(string propval) @property nothrowSet `iconName` property. Params: propval = An icon name that may be a base of a rendered icon.
gdkpixbuf.pixbuf.Pixbuf pixbuf() @property nothrowGet `pixbuf` property. Returns: A #GdkPixbuf that may be a base of a rendered icon.
void pixbuf(gdkpixbuf.pixbuf.Pixbuf propval) @property nothrowSet `pixbuf` property. Params: propval = A #GdkPixbuf that may be a base of a rendered icon.
bool getBackground(out gdk.rgba.RGBA background) nothrowStores background color in background.
gio.icon.Icon getGicon() nothrowGets a [gio.icon.Icon] to be used as a base for rendered icon.
string getIconName() nothrowGets a name of an icon to be used as a base for rendered icon.
gdkpixbuf.pixbuf.Pixbuf getPixbuf() nothrowGets a [gdkpixbuf.pixbuf.Pixbuf] to be used as a base for rendered icon.
string getTooltipMarkup(gtksource.mark.Mark mark) nothrowQueries for a tooltip by emitting a [gtksource.mark_attributes.MarkAttributes.queryTooltipMarkup] signal.
string getTooltipText(gtksource.mark.Mark mark) nothrowQueries for a tooltip by emitting a [gtksource.mark_attributes.MarkAttributes.queryTooltipText] signal.
gdk.paintable.Paintable renderIcon(gtk.widget.Widget widget, int size) nothrowRenders an icon of given size.
void setBackground(gdk.rgba.RGBA background) nothrowSets background color to the one given in background.
void setGicon(gio.icon.Icon gicon) nothrowSets an icon to be used as a base for rendered icon.
void setIconName(string iconName) nothrowSets a name of an icon to be used as a base for rendered icon.
void setPixbuf(gdkpixbuf.pixbuf.Pixbuf pixbuf) nothrowSets a pixbuf to be used as a base for rendered icon.
gulong connectQueryTooltipMarkup(T)(T callback, Flag!"After" after = No.After) if (isCallable!T && is(ReturnType!T == string) && (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gtksource.mark.Mark))) && (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] : gtksource.mark_attributes.MarkAttributes))) && Parameters!T.length < 3) nothrowConnect to `QueryTooltipMarkup` signal.
gulong connectQueryTooltipText(T)(T callback, Flag!"After" after = No.After) if (isCallable!T && is(ReturnType!T == string) && (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gtksource.mark.Mark))) && (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] : gtksource.mark_attributes.MarkAttributes))) && Parameters!T.length < 3) nothrowConnect to `QueryTooltipText` signal.
Constructors
this(void * ptr, Flag!"Take" take)
this()Creates a new source mark attributes. Returns: a new source mark attributes.

Fluent builder implementation template for gtksource.mark_attributes.MarkAttributes

Methods
T background(gdk.rgba.RGBA propval) nothrowSet `background` property. Params: propval = A color used for background of a line. Returns: Builder instance for fluent chaining
T gicon(gio.icon.Icon propval) nothrowSet `gicon` property. Params: propval = A #GIcon that may be a base of a rendered icon. Returns: Builder instance for fluent chaining
T iconName(string propval) nothrowSet `iconName` property. Params: propval = An icon name that may be a base of a rendered icon. Returns: Builder instance for fluent chaining
T pixbuf(gdkpixbuf.pixbuf.Pixbuf propval) nothrowSet `pixbuf` property. Params: propval = A #GdkPixbuf that may be a base of a rendered icon. Returns: Builder instance for fluent chaining
Methods
MarkAttributes build() nothrowCreate object from builder. Returns: New object