GtkListItem

GtkListItem

A single element in a GtkList.

Object Hierarchy

GtkObject
`-- GtkWidget
       `-- GtkContainer
              `-- GtkBin
                     `-- GtkItem
                            `-- GtkListItem

Direct subclasses

None.

Description

A GtkListItem is one of the elements that makes up a GtkList. It can consist of many things - see the constructor page - being basically a container with a specialised set of methods and signals.

GtkListItems are not equipped to carry data, unless you make it so. Using the GtkObject methods get_data() , remove_data() and set_data() is the usual way to achieve this. See GtkCombo for a working example.

The GtkListItem class supplies a multitude of signals to the list widget recursively, where they are treated as private signals and used internally. Several of these signals have keybindings, implemented here rather than in GtkList of necessity, which are described below.

Table 6. Key bindings used in GtkList

Key combinationEffectEquivalent GtkList method
Up arrowScrolls up one stepscroll_vertical(GTK_SCROLL_STEP_BACKWARD, 0.0)
Down arrowScrolls down one stepscroll_vertical(GTK_SCROLL_STEP_FORWARD, 0.0)
Page UpScrolls up one pagescroll_vertical(GTK_SCROLL_PAGE_BACKWARD, 0.0)
Page DownScrolls down one pagescroll_vertical(GTK_SCROLL_PAGE_FORWARD, 0.0)
Control + HomeScrolls to the top of the listscroll_vertical(GTK_SCROLL_JUMP, 0.0)
Control + EndScrolls to the end of the listscroll_vertical(GTK_SCROLL_JUMP, 1.0)
Shift + Up arrowSelects up one stepextend_selection(GTK_SCROLL_STEP_BACKWARD, 0.0, true)
Shift + Down arrowSelects down one stepextend_selection(GTK_SCROLL_STEP_FORWARD, 0.0, true)
Shift + Page UpSelects up one pageextend_selection(GTK_SCROLL_PAGE_BACKWARD, 0.0, true)
Shift + Page DownSelects down one pageextend_selection(GTK_SCROLL_PAGE_FORWARD, 0.0, true)
Shift | Control + HomeSelects to the top of the listextend_selection(GTK_SCROLL_JUMP, 0.0, true)
Shift | Control + EndSelects to the end of the listextend_selection(GTK_SCROLL_JUMP, 1.0)
Left arrowScrolls one step to the leftscroll_horizontal(GTK_SCROLL_STEP_BACKWARD, 0.0)
Right arrowScrolls one step to the rightscroll_horizontal(GTK_SCROLL_STEP_FORWARD, 0.0)
HomeScrolls to the left of the listscroll_horizontal(GTK_SCROLL_JUMP, 0.0)
EndScrolls to the right of the listscroll_horizontal(GTK_SCROLL_JUMP, 1.0)
EscapeReturns to previous selectionundo_selection()
SpaceToggles state of row with current focustoggle_focus_row()
Control + SpaceToggles whether further items can be selectedtoggle_add_mode()
Control + /Selects all itemsselect_all()
Control + \\Deselects all itemsunselect_all()
Shift_L + Release | ShiftCompletes selectionend_selection()
Shift_R + Release | ShiftCompletes selectionend_selection()
Shift_R + Release | Shift | ControlCompletes selectionend_selection()

GtkListItem has been deprecated since GTK+ 2.0 and should not be used in newly written code.

Constructor

GtkListItem ([string label ]);
-- Creates a list element.

Methods

select()
  Causes the "select" signal to be emitted.
deselect()
  Causes the "deselect" signal to be emitted.

© Copyright 2003-2023 www.php-editors.com. The ultimate PHP Editor and PHP IDE site.