GtkSource.GutterRendererText

g GObject.GInterface GObject.GInterface Gtk.Accessible Gtk.Accessible GObject.GInterface->Gtk.Accessible Gtk.Buildable Gtk.Buildable GObject.GInterface->Gtk.Buildable Gtk.ConstraintTarget Gtk.ConstraintTarget GObject.GInterface->Gtk.ConstraintTarget GObject.InitiallyUnowned GObject.InitiallyUnowned Gtk.Widget Gtk.Widget GObject.InitiallyUnowned->Gtk.Widget GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned Gtk.Accessible->Gtk.Widget Gtk.Buildable->Gtk.Widget Gtk.ConstraintTarget->Gtk.Widget GtkSource.GutterRenderer GtkSource.GutterRenderer Gtk.Widget->GtkSource.GutterRenderer GtkSource.GutterRendererText GtkSource.GutterRendererText GtkSource.GutterRenderer->GtkSource.GutterRendererText

Subclasses:

None

Methods

Inherited:

GtkSource.GutterRenderer (15), Gtk.Widget (181), GObject.Object (37), Gtk.Accessible (15), Gtk.Buildable (1)

Structs:

Gtk.WidgetClass (18), GObject.ObjectClass (5)

class

new ()

measure (text)

measure_markup (markup)

set_markup (markup, length)

set_text (text, length)

Virtual Methods

Inherited:

GtkSource.GutterRenderer (8), Gtk.Widget (25), GObject.Object (7), Gtk.Accessible (6), Gtk.Buildable (9)

Properties

Inherited:

GtkSource.GutterRenderer (7), Gtk.Widget (34), Gtk.Accessible (1)

Name

Type

Flags

Short Description

markup

str

r/w/c

The markup

text

str

r/w/c

The text

Signals

Inherited:

GtkSource.GutterRenderer (3), Gtk.Widget (13), GObject.Object (1)

Fields

Inherited:

GtkSource.GutterRenderer (3), Gtk.Widget (13), GObject.Object (1)

Name

Type

Access

Description

parent_instance

GtkSource.GutterRenderer

r

Class Details

class GtkSource.GutterRendererText(**kwargs)
Bases:

GtkSource.GutterRenderer

Abstract:

No

Structure:

GtkSource.GutterRendererTextClass

Renders text in the gutter.

A GtkSourceGutterRendererText can be used to render text in a cell of [class`Gutter`].

classmethod new()
Returns:

A GtkSource.GutterRenderer

Return type:

GtkSource.GutterRenderer

Create a new GtkSource.GutterRendererText.

measure(text)
Parameters:

text (str) – the text to measure.

Returns:

width:

location to store the width of the text in pixels, or None.

height:

location to store the height of the text in pixels, or None.

Return type:

(width: int, height: int)

Measures the text provided using the pango layout used by the GtkSource.GutterRendererText.

measure_markup(markup)
Parameters:

markup (str) – the pango markup to measure.

Returns:

width:

location to store the width of the text in pixels, or None.

height:

location to store the height of the text in pixels, or None.

Return type:

(width: int, height: int)

Measures the pango markup provided using the pango layout used by the GtkSource.GutterRendererText.

set_markup(markup, length)
Parameters:
  • markup (str) –

  • length (int) –

set_text(text, length)
Parameters:
  • text (str) –

  • length (int) –

Property Details

GtkSource.GutterRendererText.props.markup
Name:

markup

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT

The markup

GtkSource.GutterRendererText.props.text
Name:

text

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT

The text