:right-sidebar: True MarkAttributes =================================================================== .. currentmodule:: gi.repository.GtkSource .. class:: MarkAttributes(**properties: ~typing.Any) :no-contents-entry: Superclasses: :class:`~gi.repository.GObject.Object` :Constructors: :: MarkAttributes(**properties) new() -> GtkSource.MarkAttributes Constructors ------------ .. rst-class:: interim-class .. class:: MarkAttributes :no-index: .. classmethod:: new() -> ~gi.repository.GtkSource.MarkAttributes Creates a new source mark attributes. Methods ------- .. rst-class:: interim-class .. class:: MarkAttributes :no-index: .. method:: get_background() -> tuple[bool, ~gi.repository.Gdk.RGBA] Stores background color in ``background``. .. method:: get_gicon() -> ~gi.repository.Gio.Icon Gets a :obj:`~gi.repository.Gio.Icon` to be used as a base for rendered icon. Note that the icon can be :const:`None` if it wasn't set earlier. .. method:: get_icon_name() -> str Gets a name of an icon to be used as a base for rendered icon. Note that the icon name can be :const:`None` if it wasn't set earlier. .. method:: get_pixbuf() -> ~gi.repository.GdkPixbuf.Pixbuf Gets a :obj:`~gi.repository.GdkPixbuf.Pixbuf` to be used as a base for rendered icon. Note that the pixbuf can be :const:`None` if it wasn't set earlier. .. method:: get_tooltip_markup(mark: ~gi.repository.GtkSource.Mark) -> str Queries for a tooltip by emitting a :obj:`~gi.repository.GtkSource.MarkAttributes.signals.query_tooltip_markup` signal. The tooltip may contain a markup. :param mark: a :obj:`~gi.repository.GtkSource.Mark`. .. method:: get_tooltip_text(mark: ~gi.repository.GtkSource.Mark) -> str Queries for a tooltip by emitting a :obj:`~gi.repository.GtkSource.MarkAttributes.signals.query_tooltip_text` signal. The tooltip is a plain text. :param mark: a :obj:`~gi.repository.GtkSource.Mark`. .. method:: render_icon(widget: ~gi.repository.Gtk.Widget, size: int) -> ~gi.repository.Gdk.Paintable Renders an icon of given size. The base of the icon is set by the last call to one of: - :obj:`~gi.repository.MarkAttributes.set_pixbuf` - :obj:`~gi.repository.MarkAttributes.set_gicon` - :obj:`~gi.repository.MarkAttributes.set_icon_name` ``size`` cannot be lower than 1. :param widget: widget of which style settings may be used. :param size: size of the rendered icon. .. method:: set_background(background: ~gi.repository.Gdk.RGBA) -> None Sets background color to the one given in ``background``. :param background: a :obj:`~gi.repository.Gdk.RGBA`. .. method:: set_gicon(gicon: ~gi.repository.Gio.Icon) -> None Sets an icon to be used as a base for rendered icon. :param gicon: a :obj:`~gi.repository.Gio.Icon` to be used. .. method:: set_icon_name(icon_name: str) -> None Sets a name of an icon to be used as a base for rendered icon. :param icon_name: name of an icon to be used. .. method:: set_pixbuf(pixbuf: ~gi.repository.GdkPixbuf.Pixbuf) -> None Sets a pixbuf to be used as a base for rendered icon. :param pixbuf: a :obj:`~gi.repository.GdkPixbuf.Pixbuf` to be used. Properties ---------- .. rst-class:: interim-class .. class:: MarkAttributes :no-index: .. attribute:: props.background :type: ~gi.repository.Gdk.RGBA A color used for background of a line. .. attribute:: props.gicon :type: ~gi.repository.Gio.Icon A :obj:`~gi.repository.Gio.Icon` that may be a base of a rendered icon. .. attribute:: props.icon_name :type: str An icon name that may be a base of a rendered icon. .. attribute:: props.pixbuf :type: ~gi.repository.GdkPixbuf.Pixbuf A :obj:`~gi.repository.GdkPixbuf.Pixbuf` that may be a base of a rendered icon. Signals ------- .. rst-class:: interim-class .. class:: MarkAttributes.signals :no-index: .. method:: query_tooltip_markup(mark: ~gi.repository.GtkSource.Mark) -> str The code should connect to this signal to provide a tooltip for given ``mark``. The tooltip can contain a markup. :param mark: The :obj:`~gi.repository.GtkSource.Mark`. .. method:: query_tooltip_text(mark: ~gi.repository.GtkSource.Mark) -> str The code should connect to this signal to provide a tooltip for given ``mark``. The tooltip should be just a plain text. :param mark: The :obj:`~gi.repository.GtkSource.Mark`.