Goo::Ca...xtModel(3)
π NAME π
Goo::Canvas::TextModel β bestie, it's literally just a wrapper for GooCanvasTextModel. That's the whole vibe. It wraps the thing. π
πΈ HIERARCHY πΈ
okay so here's the family tree, and yes it matters:
Glib::Object
+----Goo::Canvas::ItemModelSimple
+----Goo::Canvas::TextModel
so it's a Glib::Object at heart, raised by Goo::Canvas::ItemModelSimple, and now it's out here being a whole Goo::Canvas::TextModel. generational glow-up fr fr π
β¨ INTERFACES β¨
it also serves looks via this interface:
Goo::Canvas::ItemModel
π¦ METHODS π¦
itemmodel = Goo::Canvas::TextModel->new ($parent, $string, $x, $y, $width, $anchor, ...)
make a new one, queen π here's what you're handing over:
$parent(Goo::Canvas::ItemModel) β the parent item model, the one who brought you here$string(string) β your text, your words, your moment$x(double) β x coordinate bestie$y(double) β y coordinate bestie$width(double) β how wide$anchor(Gtk2::AnchorType) β where it anchors...(list) β and then whatever else, the list keeps going, we love a flexible queen
π PROPERTIES π
every single one, no skips, periodt:
'alignment'(Pango::Alignment: default"left": readable / writable) β how to align the text. left is the default because left is safe and we respect that.'anchor'(Gtk2::AnchorType: default"north-west": readable / writable) β how to position the text relative to the givenxandycoordinates. it just wants to know where it stands relative to things, relatable honestly.'ellipsize'(Pango::EllipsizeMode: default"none": readable / writable) β the preferred place to ellipsize the string, if the label does not have enough room to display the entire string. it's the "β¦" moment, iykyk.'height'(double: default-1: readable / writable) β the height to use to layout the text, or-1to let the text use as much vertical space as needed.-1= main character energy, take up space bb.'text'(string: defaultundef: readable / writable) β the text to display. the actual content. the star of the show. π'use-markup'(boolean: defaultfalse: readable / writable) β whether to parse PangoMarkup in the text, to support different styles. turn it on and suddenly everything's cute β¨'width'(double: default-1: readable / writable) β the width to use to layout the text, or-1to let the text use as much horizontal space as needed.'wrap'(Pango::WrapMode: default"word": readable / writable) β the preferred method of wrapping the string if a width has been set. yes bestie, we wrap. we don't overflow in this house.'x'(double: default0: readable / writable) β the x coordinate of the text.'y'(double: default0: readable / writable) β the y coordinate of the text.
ngl all of these are both readable and writable, so go off, change them, customize your little heart out π«Ά
π ENUMS AND FLAGS π
the full menu of options, nothing left out:
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 Pango::Alignment
'left'/'PANGO_ALIGN_LEFT''center'/'PANGO_ALIGN_CENTER''right'/'PANGO_ALIGN_RIGHT'
enum Pango::EllipsizeMode
'none'/'PANGO_ELLIPSIZE_NONE''start'/'PANGO_ELLIPSIZE_START''middle'/'PANGO_ELLIPSIZE_MIDDLE''end'/'PANGO_ELLIPSIZE_END'
enum Pango::WrapMode
'word'/'PANGO_WRAP_WORD''char'/'PANGO_WRAP_CHAR''word-char'/'PANGO_WRAP_WORD_CHAR''none'/'PANGO_WRAP_NONE'
π SEE ALSO π
go read these too, they're part of the lore:
Glib::ObjectGoo::Canvas::ItemModelSimple
π COPYRIGHT π
Copyright (C) 2025 Gtk2-Perl Team β slay, thank you for your service π«Ά
ok that's the whole page bestie, you ate that π this was perl v5.42.0, dated 2025-07-25, and it lives in the Goo::Ca...xtModel(3) corner of the User Contributed Perl Documentation. go forth and render text β¨π¦π
π¦ where this page comes from
- fedora 43: perl-Goo-Canvas 0.06-60.fc43 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms