Gnome2:...ichText(3)
π¦ Gnome2::Canvas::RichText π¦
okay so bestie, welcome to the Gnome2:...ichText(3) page π it lives in the User Contributed Perl Documentation corner of the perl-verse, and it's serving pure canvas-text energy. This is the wrapper for GnomeCanvasRichText β like, a text item that lives on a Gnome2::Canvas and is fully editable. it's giving main character typography. periodt. β¨
β¨ NAME β¨
Gnome2::Canvas::RichText β wrapper for GnomeCanvasRichText π
π HIERARCHY π
here's the family tree, bestie, and yes we're the youngest sibling at the bottom, thriving:
Glib::Object
+----Glib::InitiallyUnowned
+----Gtk2::Object
+----Gnome2::Canvas::Item
+----Gnome2::Canvas::RichText
so it's Glib::Object β Glib::InitiallyUnowned β Gtk2::Object β Gnome2::Canvas::Item β us π we inherited everything, no cap.
π METHODS π
okay the methods, let's go, one by one, no skipping, that's the rule π«Ά
textbuffer = $text->get_bufferβ hand over the text buffer please π₯$text->set_buffer ($buffer)β set the buffer, and here's the tea:$buffer(Gtk2::TextBuffer)
$text->copy_clipboardβ copy the selection to the clipboard, iconic behavior βοΈβ¨$text->cut_clipboardβ cut it. gone. into the clipboard it goes πtextiter = $text->get_iter_at_location ($x, $y)β get the text iter at a spot, so you know exactly what's where π$x(integer)$y(integer)
rectangle = $text->get_iter_location ($iter)β get the rectangle where that iter lives π$iter(Gtk2::TextIter)
$text->paste_clipboardβ paste what you copied, the cycle continues π
π PROPERTIES π
twenty of them. TWENTY. we're not skipping a single one, bestie, every default is staying exactly where it is π
'anchor'(Gtk2::AnchorType: default"north-west": readable / writable) β anchor point for text, like where the text anchors itself, vibe-wise β'cursor-blink'(boolean : defaulttrue: readable / writable) β does the cursor blink in this rich text item? blink blink blink ποΈ'cursor-visible'(boolean : defaulttrue: readable / writable) β is the cursor visible in this rich text item? don't hide it, it's shy'direction'(Gtk2::DirectionType: default"tab-backward": readable / writable) β text direction, which way we're heading π§'editable'(boolean : defaulttrue: readable / writable) β is this rich text item editable? by default yes, go off βοΈ'grow-height'(boolean : defaultfalse: readable / writable) β should the text box height grow if the text does not fit? π'height'(double : default0: readable / writable) β height for text box'indent'(integer : default0: readable / writable) β number of pixels for indentation'justification'(Gtk2::Justification: default"left": readable / writable) β justification mode, aka which side the text is aligned to'left-margin'(integer : default0: readable / writable) β number of pixels in the left margin'pixels-above-lines'(integer : default0: readable / writable) β number of pixels to put above lines'pixels-below-lines'(integer : default0: readable / writable) β number of pixels to put below lines'pixels-inside-wrap'(integer : default0: readable / writable) β number of pixels to put inside the wrap'right-margin'(integer : default0: readable / writable) β number of pixels in the right margin'text'(string : defaultundef: readable / writable) β text to display, y'know, the whole point π«Ά'visible'(boolean : defaulttrue: readable / writable) β is this rich text item visible? (yes bestie, you're seen π)'width'(double : default0: readable / writable) β width for text box'wrap-mode'(Gtk2::WrapMode: default"word": readable / writable) β wrap mode for multiline text'x'(double : default0: readable / writable) β X position'y'(double : default0: readable / writable) β Y position
π SIGNALS π
one signal, and it's a whole moment:
tag-changed(Gnome2::Canvas::RichText,Glib::Object)
πΈ ENUMS AND FLAGS πΈ
the alphabet of options, bestie, all of them, in order, no shortcuts π
enum Gtk2::AnchorType
'center'/'GTK_ANCHOR_CENTER''north'/'GTK_ANCHOR_NORTH''north-west'/'GTK_ANCHOR_NORTH_WEST''north-east'/'GTK_ANCHOR_NORTH_EAST''south'/'GTK_ANCHOR_SOUTH''south-west'/'GTK_ANCHOR_SOUTH_WEST''south-east'/'GTK_ANCHOR_SOUTH_EAST''west'/'GTK_ANCHOR_WEST''east'/'GTK_ANCHOR_EAST''n'/'GTK_ANCHOR_N''nw'/'GTK_ANCHOR_NW''ne'/'GTK_ANCHOR_NE''s'/'GTK_ANCHOR_S''sw'/'GTK_ANCHOR_SW''se'/'GTK_ANCHOR_SE''w'/'GTK_ANCHOR_W''e'/'GTK_ANCHOR_E'
enum Gtk2::DirectionType
'tab-forward'/'GTK_DIR_TAB_FORWARD''tab-backward'/'GTK_DIR_TAB_BACKWARD''up'/'GTK_DIR_UP''down'/'GTK_DIR_DOWN''left'/'GTK_DIR_LEFT''right'/'GTK_DIR_RIGHT'
enum Gtk2::Justification
'left'/'GTK_JUSTIFY_LEFT''right'/'GTK_JUSTIFY_RIGHT''center'/'GTK_JUSTIFY_CENTER''fill'/'GTK_JUSTIFY_FILL'
enum Gtk2::WrapMode
'none'/'GTK_WRAP_NONE''char'/'GTK_WRAP_CHAR''word'/'GTK_WRAP_WORD''word-char'/'GTK_WRAP_WORD_CHAR'
π«Ά SEE ALSO π«Ά
go read these next, bestie, they're the friend group:
Gnome2::CanvasGlib::ObjectGlib::InitiallyUnownedGtk2::ObjectGnome2::Canvas::Item
π COPYRIGHT π
Copyright (C) 2003-2004 by the Gtk2-Perl Team.
This software is licensed under the LGPL; see Gnome2::Canvas for a full notice. π«Ά
and that's the whole page, bestie!! β¨ this wasperl v5.42.0, dated2025-07-25, straight from the User Contributed Perl Documentation. go build something cute with it. mwah π ππ¦
π¦ where this page comes from
- fedora 43: perl-Gnome2-Canvas 1.006-18.fc43 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms