MarkAttributes

class MarkAttributes(**properties: Any)

Superclasses: Object

Constructors:

MarkAttributes(**properties)
new() -> GtkSource.MarkAttributes

Constructors

class MarkAttributes
classmethod new() MarkAttributes

Creates a new source mark attributes.

Methods

class MarkAttributes
get_background() tuple[bool, RGBA]

Stores background color in background.

get_gicon() Icon

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

Note that the icon can be None if it wasn’t set earlier.

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 None if it wasn’t set earlier.

get_pixbuf() Pixbuf

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

Note that the pixbuf can be None if it wasn’t set earlier.

get_tooltip_markup(mark: Mark) str

Queries for a tooltip by emitting a query_tooltip_markup signal.

The tooltip may contain a markup.

Parameters:

mark – a Mark.

get_tooltip_text(mark: Mark) str

Queries for a tooltip by emitting a query_tooltip_text signal.

The tooltip is a plain text.

Parameters:

mark – a Mark.

render_icon(widget: Widget, size: int) Paintable

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

size cannot be lower than 1.

Parameters:
  • widget – widget of which style settings may be used.

  • size – size of the rendered icon.

set_background(background: RGBA) None

Sets background color to the one given in background.

Parameters:

background – a RGBA.

set_gicon(gicon: Icon) None

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

Parameters:

gicon – a Icon to be used.

set_icon_name(icon_name: str) None

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.

set_pixbuf(pixbuf: Pixbuf) None

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

Parameters:

pixbuf – a Pixbuf to be used.

Properties

class MarkAttributes
props.background: RGBA

A color used for background of a line.

props.gicon: Icon

A Icon that may be a base of a rendered icon.

props.icon_name: str

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

props.pixbuf: Pixbuf

A Pixbuf that may be a base of a rendered icon.

Signals

class MarkAttributes.signals
query_tooltip_markup(mark: Mark) str

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

Parameters:

mark – The Mark.

query_tooltip_text(mark: Mark) str

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

Parameters:

mark – The Mark.