Gtk2::Tooltip(3)
π Gtk2::Tooltip β bestie edition π
okay so this is the perl wrapper for GtkTooltip, from the Gtk2 docs (User Contributed Perl Documentation, no cap). if you've ever hovered over a button and a lil text bubble popped up to explain things? yeah, that's this. the tooltip is the main character here and we're just hyping it up π
πΈ HIERARCHY πΈ
it's giving family tree, and this one is a direct line:
Glib::Object
+----Gtk2::Tooltip
so Gtk2::Tooltip is a Glib::Object and nothing else. simple. elegant. iconic. π
β¨ METHODS β¨
every one of these is called on a $tooltip object, bestie. here's the whole roster π«Ά
$tooltip->set_custom ($custom_widget)β swap in your own custom widget as the tooltip body. it takes:$custom_widget(aGtk2::Widget, orundefif you want to be mysterious and give it nothing π)
$tooltip->set_icon_from_icon_name ($icon_name, $size)β sets the tooltip's icon by icon name, which is very "i know a guy" of you. args:$icon_name(string)$size(aGtk2::IconSize)
β Since: gtk+ 2.14 β so like, vintage. older gtk+ won't know her.
$tooltip->set_icon_from_stock ($stock_id, $size)β the stock-id version of the above. args:$stock_id(string orundef)$size(aGtk2::IconSize)
$tooltip->set_icon ($pixbuf)β straight-up hands the tooltip a pixbuf as its icon. args:$pixbuf(aGtk2::Gdk::Pixbuforundef)
$tooltip->set_markup ($markup)β sets the tooltip text as Pango markup, so you can get fancy with it β¨ args:$markup(string orundef)
$tooltip->set_text ($text)β the plain-text one. just words. no markup. lowkey the chillest option. args:$text(string orundef)
$tooltip->set_tip_area ($rect)β tells the tooltip which region it's actually pointing at. args:$rect(aGtk2::Gdk::Rectangleorundef)
Gtk2::Tooltip::trigger_tooltip_query ($display)β note that this one is a class method, not an instance one, so you call it asGtk2::Tooltip::trigger_tooltip_query, not on a$tooltip. it pokes the display to re-ask about tooltips. args:$display(aGtk2::Gdk::Display)
π¦ ENUMS AND FLAGS π¦
enum Gtk2::IconSize
these are your size options, and each one has a short name and a long name β same vibe, different fonts π
'invalid'/GTK_ICON_SIZE_INVALID'menu'/GTK_ICON_SIZE_MENU'small-toolbar'/GTK_ICON_SIZE_SMALL_TOOLBAR'large-toolbar'/GTK_ICON_SIZE_LARGE_TOOLBAR'button'/GTK_ICON_SIZE_BUTTON'dnd'/GTK_ICON_SIZE_DND'dialog'/GTK_ICON_SIZE_DIALOG
π SEE ALSO π
go read these too, bestie, they're the whole ecosystem:
Gtk2Glib::Object
π COPYRIGHT π
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, no crumbs left π this doc came from perl v5.42.0 and was dated 2025-07-25 β mwah, stan the gtk2-perl team, they ate and left zero notes π«Άβ¨
π¦ where this page comes from
- fedora 43: perl-Gtk2 1.24993-23.fc43 Β· LicenseRef-Callaway-LGPLv2+
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms