Gtk2::Stock(3)
π NAME π
Gtk2::Stock β the whole vibe-check on GTK+'s pre-baked stock items. You know, the icons + labels + keyboard shortcuts that GTK already has on deck so you don't have to hand-craft every single one yourself. β¨
(yes bestie, this is that page from the User Contributed Perl Documentation. come in, sit down, hydrate π)
π§ Gtk2::StockItem π§
okay so real talk: when a Gtk2::StockItem comes back out of a function, or when something wants one as a parameter, what's actually getting passed around is a hash reference with exactly these key/value pairs:
{
stock_id => (string),
label => (string),
modifier => (Gtk2::Gdk::ModifierType),
keyval => (integer),
translation_domain => (string),
}
that's it. that's the whole shape. π«Ά
π Stock Items π
the original lays these out as three columns β Stock-Id, Label, Mod-Key β and we're giving each one its own little bullet because everyone deserves main character energy. π
heads up: the underscores in the labels are mnemonics (the underlined letter in the UI), not typos. do not come for them, they are doing their job. π
gtk-aboutβ label_Aboutgtk-addβ label_Addgtk-applyβ label_Applygtk-boldβ label_Boldgtk-cancelβ label_Cancelgtk-cdromβ label_CD-Romgtk-clearβ label_Cleargtk-closeβ label_Close, mod-key<control>-Wgtk-connectβ labelC_onnectgtk-convertβ label_Convertgtk-copyβ label_Copy, mod-key<control>-Cgtk-cutβ labelCu_t, mod-key<control>-Xgtk-deleteβ label_Deletegtk-dialog-errorβ labelErrorgtk-dialog-infoβ labelInformationgtk-dialog-questionβ labelQuestiongtk-dialog-warningβ labelWarninggtk-discardβ label_Discardgtk-disconnectβ label_Disconnectgtk-editβ label_Editgtk-executeβ label_Executegtk-findβ label_Find, mod-key<control>-Fgtk-find-and-replaceβ labelFind and _Replace, mod-key<control>-Rgtk-floppyβ label_Floppygtk-fullscreenβ label_Fullscreengtk-go-backβ label_Backgtk-go-downβ label_Downgtk-go-forwardβ label_Forwardgtk-go-upβ label_Upgtk-goto-bottomβ label_Bottomgtk-goto-firstβ label_Firstgtk-goto-lastβ label_Lastgtk-goto-topβ label_Topgtk-harddiskβ label_Harddiskgtk-helpβ label_Help, mod-key<control>-Hgtk-homeβ label_Homegtk-indentβ labelIncrease Indentgtk-indexβ label_Indexgtk-infoβ label_Informationgtk-italicβ label_Italicgtk-jump-toβ label_Jump togtk-justify-centerβ label_Centergtk-justify-fillβ label_Fillgtk-justify-leftβ label_Leftgtk-justify-rightβ label_Rightgtk-leave-fullscreenβ label_Leave Fullscreengtk-media-forwardβ label_Forwardgtk-media-nextβ label_Nextgtk-media-pauseβ labelP_ausegtk-media-playβ label_Playgtk-media-previousβ labelPre_viousgtk-media-recordβ label_Recordgtk-media-rewindβ labelR_ewindgtk-media-stopβ label_Stopgtk-networkβ label_Networkgtk-newβ label_New, mod-key<control>-Ngtk-noβ label_Nogtk-okβ label_OKgtk-openβ label_Open, mod-key<control>-Ogtk-orientation-landscapeβ labelLandscapegtk-orientation-portraitβ labelPortraitgtk-orientation-reverse-landscapeβ labelReverse landscapegtk-orientation-reverse-portraitβ labelReverse portraitgtk-page-setupβ labelPage Set_upgtk-pasteβ label_Paste, mod-key<control>-Vgtk-preferencesβ label_Preferencesgtk-printβ label_Printgtk-print-previewβ labelPrint Pre_viewgtk-propertiesβ label_Propertiesgtk-quitβ label_Quit, mod-key<control>-Qgtk-redoβ label_Redogtk-refreshβ label_Refreshgtk-removeβ label_Removegtk-revert-to-savedβ label_Revertgtk-saveβ label_Save, mod-key<control>-Sgtk-save-asβ labelSave _Asgtk-select-allβ labelSelect _Allgtk-select-colorβ label_Colorgtk-select-fontβ label_Fontgtk-sort-ascendingβ label_Ascendinggtk-sort-descendingβ label_Descendinggtk-spell-checkβ label_Spell Checkgtk-stopβ label_Stopgtk-strikethroughβ label_Strikethroughgtk-undeleteβ label_Undeletegtk-underlineβ label_Underlinegtk-undoβ label_Undogtk-unindentβ labelDecrease Indentgtk-yesβ label_Yesgtk-zoom-100β label_Normal Sizegtk-zoom-fitβ labelBest _Fitgtk-zoom-inβ labelZoom _Ingtk-zoom-outβ labelZoom _Out
π METHODS π
Gtk2::Stock->add (...)
...β a list ofGtk2::StockItems that you want added
list = Gtk2::Stock->list_ids
returns a list of strings β the stock-ids. that's it, that's the whole function. slay π
scalar = Gtk2::Stock->lookup ($stock_id)
$stock_id(string)
hands you back a hash reference, aka a Gtk2::StockItem. π₯
Gtk2::Stock->set_translate_func ($domain, $func, $data=undef)
$domain(string)$func(scalar)$data(scalar)
Since: gtk+ 2.8 β so if you're on something ancient, no i18n magic for you, bestie. π
π SEE ALSO π
Gtk2
like, obviously. go read it. iykyk.
π 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 a wrap, bestie π this little love letter was rendered by perl v5.42.0 on 2025-07-25, and you can find it filed under Gtk2::Stock(3). go build something iconic with it. πβ¨π¦
π¦ 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