Gtk2::IconSource(3)
π Gtk2::IconSource π
okay bestie, so this is Gtk2::IconSource β the little wrapper around GtkIconSource, no cap. It's giving "I hold all the info about where an icon comes from and what it looks like." β¨
πΈ HIERARCHY πΈ
it's a boxed type, so here's the family tree:
Glib::Boxed
+----Gtk2::IconSource
so like, it inherits from Glib::Boxed and that's the whole bloodline. periodt. π
π METHODS π
iconsource = Gtk2::IconSource->newβ makes you a shiny brand-new icon source. fresh out the box, main character energy. π¦textdirection = $source->get_directionβ grab the text direction this source is set to.$source->set_direction ($direction)β set that direction, bestie.$direction(Gtk2::TextDirection)
boolean = $source->get_direction_wildcardedβ is the direction being wildcarded? yes/no.$source->set_direction_wildcarded ($setting)β toggle the direction wildcarding on or off.$setting(boolean)
localized file name = $source->get_filenameβ get the filename, localized and everything. π«$source->set_filename ($filename)β point it at a file.$filename(localized file name)
string = $source->get_icon_nameβ get the icon's name. π·οΈ- Since: gtk+ 2.4
$source->set_icon_name ($icon_name)β name your icon, icon.$icon_name(string)- Since: gtk+ 2.4
pixbuf or undef = $source->get_pixbufβ grab the pixbuf. heads up, it can literally beundefπ$source->set_pixbuf ($pixbuf)β hand it an actual pixbuf.$pixbuf(Gtk2::Gdk::Pixbuf)
iconsize = $source->get_sizeβ what size is this icon? iconic question.$source->set_size ($size)β set the size.$size(Gtk2::IconSize)
boolean = $source->get_size_wildcardedβ is the size wildcarded or nah?$source->set_size_wildcarded ($setting)β flip the size wildcarding.$setting(boolean)
statetype = $source->get_stateβ get the widget state this source is chillin' in.$source->set_state ($state)β set that state.$state(Gtk2::StateType)
boolean = $source->get_state_wildcardedβ state wildcarded? enquiring minds wanna know.$source->set_state_wildcarded ($setting)β toggle the state wildcarding, boom.$setting(boolean)
π ENUMS AND FLAGS π
π enum Gtk2::IconSize
'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
'normal'/GTK_STATE_NORMAL'active'/GTK_STATE_ACTIVE'prelight'/GTK_STATE_PRELIGHT'selected'/GTK_STATE_SELECTED'insensitive'/GTK_STATE_INSENSITIVE
π¦ enum Gtk2::TextDirection
'none'/GTK_TEXT_DIR_NONE'ltr'/GTK_TEXT_DIR_LTR'rtl'/GTK_TEXT_DIR_RTL
π SEE ALSO π
Gtk2, Glib::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 was pulled from the User Contributed Perl Documentation, running under perl v5.42.0, dated 2025-07-25. slay, go forth and source your icons π β¨πΈ
π¦ 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