Gtk2::IconSet(3)
π Gtk2::IconSet β bestie edition π
okay so. this is Gtk2::IconSet, a lil wrapper for GtkIconSet, hanging out in the User Contributed Perl Documentation corner of your man pages. she's a boxed type, she's cute, she holds a whole little family of icon renderings for you. no cap.
πΈ HIERARCHY πΈ
the family tree, and yes she's a nepo baby:
Glib::Boxed
+----Gtk2::IconSet
so like, she inherits from Glib::Boxed and that's the whole lineage. short tree. iconic.
β¨ METHODS β¨
π making one
iconset = Gtk2::IconSet->newβ boom, brand new empty icon set, fresh out the box, no args, nothing, just vibes. π¦iconset = Gtk2::IconSet->new_from_pixbuf ($pixbuf)β same energy but you hand her a pixbuf and she builds the set around it. takes:$pixbuf(aGtk2::Gdk::Pixbuf) πΌοΈ
π using one
$icon_set->add_source ($source)β drop another source into the set. the more the merrier fr fr. takes:$source(aGtk2::IconSource) β¨
pixbuf = $icon_set->render_icon ($style, $direction, $state, $size, $widget, $detail=undef)β the main character method, honestly. she renders you an icon and hands back a pixbuf. here's the whole cast:$style(aGtk2::Style, orundef) π$direction(aGtk2::TextDirection)$state(aGtk2::StateType)$size(aGtk2::IconSize)$widget(aGtk2::Widget, orundef)$detail(a string) β and heads up bestie, this one defaults toundefπ«Ά
list = $icon_set->get_sizesβ gives you back a list ofGtk2::IconSize's, so you can see all the sizes she's serving. slay. π₯
π ENUMS AND FLAGS π
enum Gtk2::IconSize
the size menu, pick your fighter:
'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
enum Gtk2::StateType
her moods. we all have them:
'normal'/GTK_STATE_NORMALπ§'active'/GTK_STATE_ACTIVEπ₯'prelight'/GTK_STATE_PRELIGHTβ¨'selected'/GTK_STATE_SELECTEDπ'insensitive'/GTK_STATE_INSENSITIVEπ
enum Gtk2::TextDirection
which way are we reading, bestie:
'none'/GTK_TEXT_DIR_NONE'ltr'/GTK_TEXT_DIR_LTR'rtl'/GTK_TEXT_DIR_RTL
π SEE ALSO π
go read these next, they're the friends in the group chat:
Gtk2Glib::Boxed
π 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, bestie!! π this manual came to you courtesy of perl v5.42.0, dated 2025-07-25, and it's filed under Gtk2::IconSet(3) β go forth and render icons, you absolute icon πβ¨π¦
π¦ 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