Gtk2::E...ry::List(3)
π Gtk2::Ex::FormFactory::List π
okay so bestie, welcome to Gtk2::Ex::FormFactory::List β it's a whole List in the Gtk2::Ex::FormFactory framework, and it's part of the User Contributed Perl Documentation. yes the manual name is long, we're gonna say it a lot, hydrate first π
β¨ SYNOPSIS β¨
Gtk2::Ex::FormFactory::List->new (
attr_select => Attribute name for selection tracking,
attr_select_column => Use this column's value to store in attr_select
columns => Titles of the list columns,
types => Types of the list columns,
editable => Which columns are editable?,
visible => Which columns are visible?
selection_mode => Selection mode of this list,
no_header => Omit header?
update_selection_only => Boolean, whether updates should only
change the selection, not the list
of values,
...
Gtk2::Ex::FormFactory::Widget attributes
);
like, that's the whole vibe. pass your stuff in at construction time, k? π
πΈ DESCRIPTION πΈ
This class implements a List inside a Gtk2::Ex::FormFactory framework β and it's based on Gtk2::Ex::Simple::List, for the record. π
Here's the tea though: the value of the associated application object attribute needs to be a reference to a two dimensional array with the content of the list. two dimensional. rows and columns. don't come at it with a flat array, it will not slay. π
π¦ OBJECT HIERARCHY π¦
the family tree, and yes we're all seated for it:
Gtk2::Ex::FormFactory::Intro
Gtk2::Ex::FormFactory::Widget
+--- Gtk2::Ex::FormFactory::List
Gtk2::Ex::FormFactory::Layout
Gtk2::Ex::FormFactory::Rules
Gtk2::Ex::FormFactory::Context
Gtk2::Ex::FormFactory::Proxy
see that +---? that's Gtk2::Ex::FormFactory::List descending from Gtk2::Ex::FormFactory::Widget. main character energy fr π«
π ATTRIBUTES π
so attributes are handled through the common get_ATTR(), set_ATTR() style accessors β very standard, very demure. but here's the important part bestie: they're mostly passed once to the object constructor and must not be altered after the associated FormFactory was built. once it's built, it's built. periodt. π«
attr_select= SCALAR [optional] β wanna track the selection state of the List? drop the name of the attribute of the associated application object right here. then an array reference with the indicies of the selected rows (or specific column values, ifattr_select_columnis set) gets managed automatically and stored in that attribute. automatic. we love that for us. β¨attr_select_columnβ normally indicies of the selected rows go into the attribute you passed withattr_select. but specify a column number here and the corresponding values get stored instead β like, say, an internal database ID hiding out in an invisible column. π and if you do use this, you may also use theselect_row_by_attr()method, which is described below. (yes, we get there, patience bb)columns= ARRAYREF [mandatory] β a reference to an array containing the column titles of this list. mandatory, so don't skip it, it's not optional no matter how cute you are. πtypes= ARRAYREF [optional] β you may define types for the columns. the type of a column defaults to'text'. other possible types are:
text normal text strings
markup pango markup strings
int integer values
double double-precision floating point values
bool boolean values, displayed as toggle-able checkboxes
scalar a perl scalar, displayed as a text string by default
pixbuf a Gtk2::Gdk::Pixbuf
a pixbuf?? in my list column? iconic. πΌοΈ
editable= ARRAYREF [optional] β an array reference of boolean values, one value for each column. changes to columns marked editable are synchronized automatically with the associated application object attribute. so you flip a checkbox, the object knows. no cap. πvisible= ARRAYREF [optional] β an array reference of boolean values, one value for each column, controlling the visibility of the corresponding columns. default is to display all columns. all of them. the whole fit. πselection_mode='none'|'single'|'browse'|'multiple'[optional] β you may specify a selection mode for the list. please refer to the Gtk+ documentation ofGtkSelectionModefor details about the possible selection modes. (go read it, i'm not gonna paraphrase gtk at you π«Ά)update_selection_only= BOOL [optional] β if you know the values of your list don't change at runtime, and only the actual selection matters, set this to a true value. why? because updating will be significantly faster, since only the actual selection is affected. free speed, bestie. take it. β‘
for more attributes refer to Gtk2::Ex::FormFactory::Widget. that's where the rest of the lore lives. π
π METHODS π
$rows = $widget->get_selected_rows ()β returns a list reference of selected row indicies. that's it, that's the method. simple, clean, ate. π½οΈ$data_lref = $widget->get_data ()β returns the data array of the underlyingGtk2::SimpleList. it's a two dimensional array of rows and columns.
β οΈ real talk though: all manipulations affect the GUI immediately but bypass all Gtk2::Ex::FormFactory automatic object value update magic. so be careful with this. the sync will not save you here. π
$widget->select_row_by_attr ($value)β selects a row by a givenselect_attrattribute value. works only ifselect_attris set for this list. noselect_attr, no selection. that's the deal. π€
π AUTHORS π
JΓΆrn Reder <joern at zyn dot de>
(one author, one 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. (yes the all-caps is doing the most, but it's legally doing the most π« )
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.
π POD ERRORS π
hey! the above document had some coding errors, which are explained below:
Around line 402:
Non-ASCII character seen before =encoding in 'JΓΆrn'. Assuming UTF-8
the ΓΆ in JΓΆrn said "i contain multitudes and also bytes" and perl was like "ok assuming UTF-8 then" π not a bug in the list, a bug in the document. anyway.
and that's the whole page bestie!! you read all of it, i'm so proud, you're literally the main character of this manual now π
this was Gtk2::E...ry::List(3) from the User Contributed Perl Documentation, generated with perl v5.42.0 and dated 2025-07-25 β mwah, go build something cute with it πβ¨ππ¦πΈ
π¦ 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