About all my projects
Gnome::Gtk4::TextChildAnchor

Gnome::Gtk4::TextChildAnchor

Description

A Gnome::Gtk4::TextChildAnchor is a spot in a Gnome::Gtk4::TextBuffer where child widgets can be “anchored”.

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

Class initialization

new

:native-object

Create an object using a native object from elsewhere. See also Gnome::N::TopLevelSupportClass.

multi method new ( N-Object :$native-object! )

new-textchildanchor

Creates a new Gnome::Gtk4::TextChildAnchor.

Usually you would then insert it into a Gnome::Gtk4::TextBuffer with .insert-child-anchor() in class Gnome::Gtk4::TextBuffer. To perform the creation and insertion in one step, use the convenience function .create-child-anchor() in class Gnome::Gtk4::TextBuffer.

method new-textchildanchor ( --> Gnome::Gtk4::TextChildAnchor \)

new-with-replacement

Creates a new Gnome::Gtk4::TextChildAnchor with the given replacement character.

Usually you would then insert it into a Gnome::Gtk4::TextBuffer with .insert-child-anchor() in class Gnome::Gtk4::TextBuffer.

method new-with-replacement ( Str $character --> Gnome::Gtk4::TextChildAnchor \)
  • $character; .

Methods

get-deleted

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 g_object_ref()) if you plan to use this function — otherwise all deleted child anchors will also be finalized.

method get-deleted (--> Bool )

Return value; True if the child anchor has been deleted from its buffer.

get-widgets

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

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

method get-widgets ( Array[Int] $out-len --> N-Object )
  • $out-len; (transfer ownership: full) return location for the length of the array.

Return value; an array of widgets anchored at $anchor.