Gnome2::IconList(3)

๐Ÿ“ฆ
version 1.048 ยท 2 versions
, in fedora 43

๐Ÿ’– 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 (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