Gtk2::TextTagTable(3)

πŸ“¦
version 1.24993 Β· 2 versions
, in fedora 43

πŸ’– Gtk2::TextTagTable β€” bestie edition πŸ’–

okay so you found Gtk2::TextTagTable, the Perl wrapper for GtkTextTagTable, in the User Contributed Perl Documentation section. it's giving "the little backstage closet where all your text tags live" ✨ and honestly? iconic.


🌈 HIERARCHY

  Glib::Object
  +----Gtk2::TextTagTable

so it's a Glib::Object at heart, and Gtk2::TextTagTable is the glow-up that inherits from it. family tree, slay. πŸ‘‘


πŸŽ€ INTERFACES

  Gtk2::Buildable

yep, it's also Gtk2::Buildable, which means it can be built up from builder files. main character energy fr fr. πŸ’…


✨ METHODS

πŸ’– texttagtable = Gtk2::TextTagTable->new

makes you a brand new Gtk2::TextTagTable. fresh table, no tags, no drama, blank canvas, we love to see it. πŸ¦‹

🌸 $table->add ($tag)

drops a tag into the table. the deets:

  • $tag is a Gtk2::TextTag 🏷️

🫢 $table->foreach ($callback, $callback_data=undef)

runs your $callback over the tags. and yes, you can pass extra stuff along for the ride:

  • $callback β€” a scalar (yes, your callback comes in as a scalar, that's just how it is bestie)
  • $callback_data β€” a scalar, and it defaults to undef if you don't hand it anything 🎁

πŸ” texttag = $table->lookup ($name)

finds you a tag by name. you give it a string, it gives you back the texttag:

  • $name is a string

πŸ’… $table->remove ($tag)

yeets a tag out of the table. bye boo πŸ‘‹

  • $tag is a Gtk2::TextTag

⭐ integer = $table->get_size

gives you an integer β€” the number of tags chillin' in the table. no cap. πŸ“


πŸ”₯ SIGNALS

these are the little notifications the table sends out into the world:

  • tag-added (Gtk2::TextTagTable, Gtk2::TextTag) β€” a tag just showed up πŸŽ‰
  • tag-changed (Gtk2::TextTagTable, Gtk2::TextTag, boolean) β€” a tag changed, and there's a boolean riding along with the news πŸ“£
  • tag-removed (Gtk2::TextTagTable, Gtk2::TextTag) β€” a tag left the chat πŸ’€

πŸ‘€ SEE ALSO

  • Gtk2
  • Glib::Object

go read those, iykyk 🧚


Copyright (C) 2003-2011 by the gtk2-perl team.

This software is licensed under the LGPL. See Gtk2 for a full notice.


and that's the whole page, bestie! πŸ’œ this was Gtk2::TextTagTable(3) from the User Contributed Perl Documentation, generated by perl v5.42.0 on 2025-07-25 β€” mwah, take care of her πŸ«Άβœ¨πŸŽ€

πŸ“¦ where this page comes from