Gtk2::E...::Popup(3)
π Gtk2::E...::Popup β bestie edition π
okay so this is Gtk2::Ex::FormFactory::Popup, from the User Contributed Perl Documentation manual, and it's literally the popup widget of the FormFactory universe. sit down, grab a boba, we're doing this π§β¨
β¨ NAME β¨
Gtk2::Ex::FormFactory::Popup β a Popup inside a FormFactory framework π«Ά
πΈ SYNOPSIS πΈ
Gtk2::Ex::FormFactory::Popup->new (
...
Gtk2::Ex::FormFactory::Widget attributes
);
π DESCRIPTION π
This class implements a Popup in a Gtk2::Ex::FormFactory framework. And here's the vibe: whichever entry is selected in your Popup is controlled by the value of the associated application object attribute. That attribute is either:
- an index into an array of possible Popup entries, or
- a key of a hash of possible Popup entries.
So like, the app object is the main character and the Popup is just following its lead, periodt. π
Head over to the chapter REQUIREMENTS FOR ASSOCIATED APPLICATION OBJECTS for the details, bestie β don't skip it, it's important fr fr.
π¦ OBJECT HIERARCHY π¦
Gtk2::Ex::FormFactory::Intro
Gtk2::Ex::FormFactory::Widget
+--- Gtk2::Ex::FormFactory::Popup
Gtk2::Ex::FormFactory::Layout
Gtk2::Ex::FormFactory::Rules
Gtk2::Ex::FormFactory::Context
Gtk2::Ex::FormFactory::Proxy
look at her, sitting right under Gtk2::Ex::FormFactory::Widget like the icon she is π
π ATTRIBUTES π
So attributes are handled through the common get_ATTR(), set_ATTR() style accessors β very standard, very demure. But here's the thing: they're mostly passed once to the object constructor and must not be altered after the associated FormFactory was built. So set it and forget it, no take-backs π
items= ARRAYREF|HASHREF [optional] β this attribute takes a static list of popup items, for when the popup shouldn't be controlled dynamically by an associated application object. Refer to the next chapter for details of the data structure applied here. β¨
π REQUIREMENTS FOR ASSOCIATED APPLICATION OBJECTS π
Application objects represented by a Gtk2::Ex::FormFactory::Popup must define additional methods β unless their content is static by setting items. So either you bring the methods or you bring the items, pick a struggle π
The naming of the methods listed beyond uses the standard get_ prefix for the attribute read accessor. ATTR needs to be replaced by the actual name of the attribute associated with the widget. So swap in your real attribute name, don't leave it as ATTR, iykyk.
get_ATTR_listβ this returns the entries of the Popup. Three data models are supported here:- Simple ARRAY β if the method returns a reference to a simple array, the popup will be filled with the array values in the original array order.
The index of the actually selected popup entry is stored in the attribute of the associated application object. π
- Two dimensional ARRAY β the method may return a reference to a two dimensional array. Each row needs to have the attribute value in the first column and the label for the corresponding item in the second. π
- HASH β if the method returns a reference to a hash, the popup will be filled with the alphanumerically sorted hash values.
In turn the hash key of the actually selected popup entry is stored in the attribute of the associated application object. π₯
π AUTHORS π
JΓΆrn Reder <joern at zyn dot de> β shoutout to the legend, we stan π«Ά
β COPYRIGHT AND LICENSE β
Copyright 2004-2006 by JΓΆrn Reder.
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details.
You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA.
ngl the all-caps "WITHOUT ANY WARRANTY" is giving scary but it's just the standard license energy, no cap π
π POD ERRORS π
Hey! The above document had some coding errors, which are explained below:
Around line 245:
Non-ASCII character seen before =encoding in 'JΓΆrn'. Assuming UTF-8
like... the umlaut in JΓΆrn said "I'm not waiting for an =encoding line, I'm assuming UTF-8 and I'm leaving" and honestly? valid. π
and that's the whole page, bestie!! this doc ships with perl v5.42.0, dated 2025-07-25 β go forth, build your popups, and slay π
β¨π
π¦ where this page comes from
- fedora 43: perl-Gtk2-Ex-FormFactory 0.67-39.fc43 Β· LicenseRef-Callaway-LGPLv2+
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms