Gtk2::IconFactory(3)

πŸ“¦
version 1.24993 Β· 2 versions
, in fedora 43

πŸ’– Gtk2::IconFactory β€” bestie edition πŸ’–

okay so. this is the manual page for Gtk2::IconFactory, aka the wrapper for GtkIconFactory, straight out of the User Contributed Perl Documentation. it's giving "little object that holds all ur icons so ur app can find them by name" energy and honestly? iconic. ✨


🌸 NAME 🌸

Gtk2::IconFactory β€” it's literally just a wrapper for GtkIconFactory. that's the whole name. no notes. πŸ’…


πŸ¦‹ HIERARCHY πŸ¦‹

here's the family tree, and yes it's a cute one:

Glib::Object
+----Gtk2::IconFactory

so it's a Glib::Object at heart, and Gtk2::IconFactory is its glow-up. 🌈


πŸŽ€ INTERFACES πŸŽ€

Gtk2::Buildable

yep, it also does the Gtk2::Buildable thing. main character with range fr fr. πŸ‘‘


✨ METHODS ✨

iconfactory = Gtk2::IconFactory->new

makes u a brand new, fresh-out-the-box icon factory. no arguments, no drama, just vibes. 🫢

$factory->add ($stock_id, $icon_set)

adds an icon set to the factory so it knows what's what. takes these:

  • $stock_id (string) β€” the name/id string u want to register it under
  • $icon_set (Gtk2::IconSet) β€” the actual icon set object going in

$factory->add_default

slaps this factory on as a default one. no arguments bestie, it just does the thing. ✨

iconset = $factory->lookup ($stock_id)

goes looking for an icon set by its stock id and hands it back to u.

  • $stock_id (string) β€” the id string ur searching for

iconset = Gtk2::IconFactory->lookup_default ($stock_id)

same energy as lookup, except it's a class method digging through the default factories instead.

  • $stock_id (string) β€” the id string ur searching for

$factory->remove_default

takes this factory back off the default list. un-defaulting it, if u will. bye bestie πŸ‘‹


🌈 SEE ALSO 🌈

go check out these too, they're the whole friend group:

  • Gtk2
  • Glib::Object

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 page!! this doc was brought to u by perl v5.42.0, dated 2025-07-25, under the name Gtk2::IconFactory(3) β€” mwah, slay, periodt. πŸ’…πŸ’–πŸŽ€

πŸ“¦ where this page comes from