Gtk2::ListItem(3)

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

πŸ’– Gtk2::ListItem πŸ’–

okay bestie, so this is the Gtk2::ListItem page β€” a wrapper for GtkListItem, living its life in the Gtk2 Perl docs. sit down, grab a boba, we're gonna get through this together πŸ§‹βœ¨


✨ NAME ✨

Gtk2::ListItem β€” literally just a wrapper for GtkListItem, no cap πŸ’…


🌸 DESCRIPTION 🌸

so Gtk2::ListItem is the widget that gets used for each individual item in a Gtk2::List. that's the whole job. one item, one vibe. πŸŽ€

🚨 bestie, listen 🚨 Gtk2::List and Gtk2::ListItem are deprecated. like, they're giving "my grandma's flip phone" energy. use Gtk2::TreeView and a Gtk2::ListStore instead, periodt.

and the only reason Gtk2::ListItem is even in Gtk2-Perl at all?? because Gtk2::Combo contains a Gtk2::List, and Gtk2::Combo's replacement, Gtk2::ComboBox, didn't appear in gtk+ until 2.4.0. so it's here for legacy reasons. it's a nepo baby, but we love it anyway 🫢


πŸ‘‘ HIERARCHY πŸ‘‘

the family tree, and yes it's a whole dynasty:

Glib::Object
+----Glib::InitiallyUnowned
     +----Gtk2::Object
          +----Gtk2::Widget
               +----Gtk2::Container
                    +----Gtk2::Bin
                         +----Gtk2::Item
                              +----Gtk2::ListItem

five generations deep, main character energy at the bottom of the tree 🌈


πŸ¦‹ INTERFACES πŸ¦‹

the interfaces it's got going on:

Glib::Object::_Unregistered::AtkImplementorIface
Gtk2::Buildable

πŸ’œ METHODS πŸ’œ

widget = Gtk2::ListItem->new ($label=undef)

  • $label (string) β€” the label, obvi. it's optional, defaults to undef ✨

widget = Gtk2::ListItem->new_with_label ($label=undef)

  • $label (string) β€” same deal, also defaults to undef 🌸

$list_item->deselect

deselects it. bye bestie πŸ‘‹

$list_item->select

selects it. hi bestie πŸ‘‹


πŸ”₯ SIGNALS πŸ”₯

the whole signal list, no skipping:

  • end-selection (Gtk2::ListItem)
  • extend-selection (Gtk2::ListItem, Gtk2::ScrollType, float, boolean)
  • scroll-horizontal (Gtk2::ListItem, Gtk2::ScrollType, float)
  • scroll-vertical (Gtk2::ListItem, Gtk2::ScrollType, float)
  • select-all (Gtk2::ListItem)
  • start-selection (Gtk2::ListItem)
  • toggle-add-mode (Gtk2::ListItem)
  • toggle-focus-row (Gtk2::ListItem)
  • undo-selection (Gtk2::ListItem)
  • unselect-all (Gtk2::ListItem)

⭐ ENUMS AND FLAGS ⭐

enum Gtk2::ScrollType

every single value, all sixteen, we're not leaving a single one behind:

  • 'none' / GTK_SCROLL_NONE
  • 'jump' / GTK_SCROLL_JUMP
  • 'step-backward' / GTK_SCROLL_STEP_BACKWARD
  • 'step-forward' / GTK_SCROLL_STEP_FORWARD
  • 'page-backward' / GTK_SCROLL_PAGE_BACKWARD
  • 'page-forward' / GTK_SCROLL_PAGE_FORWARD
  • 'step-up' / GTK_SCROLL_STEP_UP
  • 'step-down' / GTK_SCROLL_STEP_DOWN
  • 'page-up' / GTK_SCROLL_PAGE_UP
  • 'page-down' / GTK_SCROLL_PAGE_DOWN
  • 'step-left' / GTK_SCROLL_STEP_LEFT
  • 'step-right' / GTK_SCROLL_STEP_RIGHT
  • 'page-left' / GTK_SCROLL_PAGE_LEFT
  • 'page-right' / GTK_SCROLL_PAGE_RIGHT
  • 'start' / GTK_SCROLL_START
  • 'end' / GTK_SCROLL_END

sixteen options and every one of them ate πŸ’…


🌈 SEE ALSO 🌈

go read these too, they're the friend group:

Gtk2, Glib::Object, Glib::InitiallyUnowned, Gtk2::Object, Gtk2::Widget, Gtk2::Container, Gtk2::Bin, Gtk2::Item


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 whole page, bestie!! you absolutely understood all of it, i'm so proud πŸ˜­πŸ’– this was perl v5.42.0, dated 2025-07-25, and it's the Gtk2::ListItem(3) page β€” ily, go take a nap, you've earned it πŸ¦‹βœ¨

πŸ“¦ where this page comes from