Gnome2::IconList(3)
๐ Gnome2::IconList โ bestie edition ๐
okay so this is Gnome2::IconList, aka the perl wrapper for GnomeIconList โจ it's the widget that lays out a whole lil grid of icons with text labels under them, and this page is literally everything you can do with it. no cap. ๐
๐ธ HIERARCHY ๐ธ
so like, here's the family tree, and yes she comes from a long line of iconic ancestors:
Glib::Object
+----Glib::InitiallyUnowned
+----Gtk2::Object
+----Gtk2::Widget
+----Gtk2::Container
+----Gtk2::Layout
+----Gnome2::Canvas
+----Gnome2::IconList
๐ฆ INTERFACES ๐ฆ
she also implements these two, for the record:
Glib::Object::_Unregistered::AtkImplementorIface
Gtk2::Buildable
โจ METHODS โจ
k so here's every single method, no skips, we're doing the whole list ๐
widget = Gnome2::IconList->new ($icon_width, $adj, $flags)โ the constructor, the birth of a legend ๐$icon_width(integer)$adj(Gtk2::Adjustment)$flags(Gnome2::IconListFlags)
integer = $gil->append ($icon_filename, $text)โ tack a new icon onto the end, get back its index ๐ฅ$icon_filename(string)$text(string)
integer = $gil->append_pixbuf ($im, $icon_filename, $text)โ same energy as append but you're handing over a pixbuf directly ๐ผ๏ธ$im(Gtk2::Gdk::Pixbuf)$icon_filename(string)$text(string)
$gil->clearโ wipe the whole thing. poof. gone. ๐$gil->set_col_spacing ($pixels)โ how much breathing room between columns$pixels(integer)
integer = $gil->find_icon_from_filename ($filename)โ hunts down the icon with that filename and gives you its index ๐$filename(string)
$gil->focus_icon ($idx)โ put the focus on the icon at that index$idx(integer)
$gil->freezeโ freeze updates so you can do a bunch of stuff without it flickering everywhere ๐ง$gil->set_hadjustment ($hadj)โ set the horizontal adjustment$hadj(Gtk2::Adjustment)
integer = $gil->get_icon_at ($x, $y)โ which icon is chillin' at those coordinates?$x(integer)$y(integer)
$gil->set_icon_border ($pixels)โ border around each icon, in pixels$pixels(integer)
string = $gil->get_icon_filename ($idx)โ gimme the filename of the icon at that index$idx(integer)
visibility = $gil->icon_is_visible ($pos)โ is the icon at that position actually visible rn?$pos(integer)
object = $gil->get_icon_pixbuf_item ($idx)โ grab the pixbuf item for that index$idx(integer)
icontextitem = $gil->get_icon_text_item ($idx)โ grab the text item for that index$idx(integer)
$gil->set_icon_width ($w)โ set how wide each icon is$w(integer)
$gil->insert ($pos, $icon_filename, $text)โ shove a new icon in at a specific spot, not just the end ๐$pos(integer)$icon_filename(string)$text(string)
$gil->insert_pixbuf ($pos, $im, $icon_filename, $text)โ insert with a pixbuf, at a position, you get it ๐ซ$pos(integer)$im(Gtk2::Gdk::Pixbuf)$icon_filename(string)$text(string)
integer = $gil->get_items_per_lineโ how many icons fit per line$gil->moveto ($pos, $yalign)โ scroll/jump to that position with that vertical alignment$pos(integer)$yalign(double)
integer = $gil->get_num_iconsโ the icon headcount ๐งฎ$gil->remove ($pos)โ yeet the icon at that position$pos(integer)
$gil->set_row_spacing ($pixels)โ vertical gap between rows$pixels(integer)
$gil->select_allโ selects every single icon, all of them, the whole squad ๐ซถ
Since: libgnomeui 2.8
$gil->select_icon ($pos)โ select just the one at that position$pos(integer)
list = $gil->get_selectionโ returns a list of integers. that's the selection, bestie.selectionmode = $gil->get_selection_modeโ what mode is the selection in rn$gil->set_selection_mode ($mode)โ set the selection mode$mode(Gtk2::SelectionMode)
$gil->set_separators ($sep)โ set the separator string$sep(string)
$gil->set_text_spacing ($pixels)โ spacing for the text, in pixels$pixels(integer)
$gil->thawโ unfreeze, let the updates flow again ๐integer = $gil->unselect_allโ deselect everything, returns an integer$gil->unselect_icon ($pos)โ unselect the one at that position$pos(integer)
$gil->set_vadjustment ($vadj)โ set the vertical adjustment$vadj(Gtk2::Adjustment)
๐ SIGNALS ๐
the vibes she emits, in order:
focus-icon (Gnome2::IconList, integer)
move-cursor (Gnome2::IconList, Gtk2::DirectionType, boolean)
select-icon (Gnome2::IconList, integer, Gtk2::Gdk::Event)
boolean = text-changed (Gnome2::IconList, integer, string)
toggle-cursor-selection (Gnome2::IconList)
unselect-icon (Gnome2::IconList, integer, Gtk2::Gdk::Event)
๐ ENUMS AND FLAGS ๐
enum Gtk2::DirectionType
'tab-forward'/GTK_DIR_TAB_FORWARD'tab-backward'/GTK_DIR_TAB_BACKWARD'up'/GTK_DIR_UP'down'/GTK_DIR_DOWN'left'/GTK_DIR_LEFT'right'/GTK_DIR_RIGHT
enum Gtk2::SelectionMode
'none'/GTK_SELECTION_NONE'single'/GTK_SELECTION_SINGLE'browse'/GTK_SELECTION_BROWSE'multiple'/GTK_SELECTION_MULTIPLE'extended'/GTK_SELECTION_EXTENDED
enum Gtk2::Visibility
'none'/GTK_VISIBILITY_NONE'partial'/GTK_VISIBILITY_PARTIAL'full'/GTK_VISIBILITY_FULL
๐ SEE ALSO ๐
go read these next, they're all part of the same friend group:
Gnome2, Glib::Object, Glib::InitiallyUnowned, Gtk2::Object, Gtk2::Widget, Gtk2::Container, Gtk2::Layout, Gnome2::Canvas
๐ COPYRIGHT ๐
Copyright (C) 2003-2004 by the gtk2-perl team.
This software is licensed under the LGPL. See Gnome2 for a full notice.
and that's the whole page bestie, you ate it ๐
this doc dropped with perl v5.42.0 on 2025-07-25, from the User Contributed Perl Documentation collection โ stan the gtk2-perl girlies, they did that ๐โจ๐ฆ
๐ฆ where this page comes from
- fedora 43: perl-Gnome2 1.048-18.fc43 ยท LGPL-2.1-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms