Gtk.TextChildAnchor

g GObject.Object GObject.Object Gtk.TextChildAnchor Gtk.TextChildAnchor GObject.Object->Gtk.TextChildAnchor

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new ()

class

new_with_replacement (character)

get_deleted ()

get_widgets ()

Virtual Methods

Inherited:

GObject.Object (7)

Properties

None

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent_instance

GObject.Object

r

segment

object

r

Class Details

class Gtk.TextChildAnchor(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

Gtk.TextChildAnchorClass

A GtkTextChildAnchor is a spot in a GtkTextBuffer where child widgets can be “anchored”.

The anchor can have multiple widgets anchored, to allow for multiple views.

classmethod new()[source]
Returns:

a new GtkTextChildAnchor

Return type:

Gtk.TextChildAnchor

Creates a new GtkTextChildAnchor.

Usually you would then insert it into a GtkTextBuffer with [method`Gtk`.TextBuffer.insert_child_anchor]. To perform the creation and insertion in one step, use the convenience function [method`Gtk`.TextBuffer.create_child_anchor].

classmethod new_with_replacement(character)[source]
Parameters:

character (str) –

Returns:

a new GtkTextChildAnchor

Return type:

Gtk.TextChildAnchor

Creates a new GtkTextChildAnchor with the given replacement character.

Usually you would then insert it into a GtkTextBuffer with [method`Gtk`.TextBuffer.insert_child_anchor].

New in version 4.6.

get_deleted()[source]
Returns:

True if the child anchor has been deleted from its buffer

Return type:

bool

Determines whether a child anchor has been deleted from the buffer.

Keep in mind that the child anchor will be unreferenced when removed from the buffer, so you need to hold your own reference (with GObject.Object.ref()) if you plan to use this function — otherwise all deleted child anchors will also be finalized.

get_widgets()[source]
Returns:

an array of widgets anchored at self

Return type:

[Gtk.Widget]

Gets a list of all widgets anchored at this child anchor.

The order in which the widgets are returned is not defined.