GtkList

GtkList

Widget displaying a list of selectable items.

Object Hierarchy

GtkObject
`-- GtkWidget
       `-- GtkContainer
              `-- GtkList

Direct subclasses

None.

Description

A GtkList is a container widget that is designed to hold a simple list, the full range of which is displayed. The items held in the list are selectable, with the default selection mode set as GTK_SELECTION_SINGLE. Each item in the list must be a GtkListItem widget. Glade users will find that they need to code these manually in order to populate a list or combo box.

The signal part of the function/signal pair for most of the methods given here is private in GtkList, but is also implemented in GtkListItem. As this secondary implementation is also private, these signals are not covered in this manual. Although those signals that have GTK keybindings will cause the appropriate signal to be publicly fired when their key combinations are used, there is no other way to emit this range of signals. The keybindings are listed under GtkListItem; the signal prototypes share the relevant GtkList method's parameters, should you need to connect to them.

If you need a list with multiple columns and/or titles with sorting support, GtkCList is the right class for you.

See also: GtkCList, GtkCombo, GtkListItem.

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

Constructor

GtkList (void);
-- Creates a container for a simple list.

Methods

append_items()
  Appends an array of list items to a list.
clear_items()
  Clears designated list items from list.
select_item()
  Causes the "select-child" signal to be emitted.
unselect_item()
  Causes the "unselect-child" signal to be emitted.
select_child()
  Causes the "select-child" signal to be emitted.
unselect_child()
  Causes the "unselect-child" signal to be emitted.
child_position()
  Returns item specified by list position.
set_selection_mode()
  Sets the selection mode.
extend_selection()
  Extends selected area to position given.
start_selection()
  Selects range from anchor to currently selected item.
end_selection()
  Curtails selection set with start_selection() .
select_all()
  Selects all list items.
unselect_all()
  Deselects all list items.
scroll_horizontal()
  Sets associated horizontal scrollbar to a predetermined position.
scroll_vertical()
  Sets associated vertical scrollbar to a predetermined position.
toggle_add_mode()
  Toggles whether further selections may be added in extended mode.
toggle_focus_row()
  Toggles selection status of row with focus.
toggle_row()
  Toggles selection status of specified row.
undo_selection()
  In extended mode, returns selection to its previous state.
end_drag_selection()
  Ends drag selection.

Signals

"selection-changed"
  Emitted when the selection property is changed.
"select-child"
  Emitted when a list item is selected.
"unselect-child"
  Emitted when a list item is deselected.

Properties

selection:
  Array containing current selection information.

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