Description
The GtkList widget is a container whose children are displayed
vertically in order, and can be selected.
The list has many selection modes, which are programmer selective and
depend on how many elements are able to be selected at the same time.
Details
gtk_list_new ()
Creates a new GtkList.
gtk_list_insert_items ()
Inserts items into the list at the position position. The GList items
must not be freed after.
gtk_list_append_items ()
Adds items to the end of the list.
gtk_list_prepend_items ()
Inserts items at the beginning of the list.
gtk_list_remove_items ()
Removes the items from the list.
gtk_list_remove_items_no_unref ()
void gtk_list_remove_items_no_unref (GtkList *list,
GList *items); |
Removes the items from the list, without unreferencing them. It
may be useful if you want to move the items from one list to another.
gtk_list_clear_items ()
Removes the items between index start (included) and end (excluded)
from the list. If end is negative, or greater than the number of
children of list, it's assumed to be exactly the number of
elements. If start is greater than or equal to end, nothing is
done.
gtk_list_select_item ()
Selects the child number item of the list. Nothing happens if item
is out of bounds. The signal GtkList::select-child will be emitted.
gtk_list_unselect_item ()
void gtk_list_unselect_item (GtkList *list,
gint item); |
Unselects the child number item of the list. Nothing happens if
item is out of bounds. The signal GtkList::unselect-child will be
emitted.
gtk_list_select_child ()
Selects the given child. The signal GtkList::select-child will be
emitted.
gtk_list_unselect_child ()
Unselects the given child. The signal GtkList::unselect-child will be
emitted.
gtk_list_child_position ()
Searches the children of list for the index of child.
gtk_list_set_selection_mode ()
Set the list selection mode. The selection mode can be any value in
GtkSelectionMode:
- GTK_SELECTION_SINGLE
Zero or one element may be selected.
- GTK_SELECTION_BROWSE
Exactly one element is always selected (this can be false after you have
changed the selection mode).
- GTK_SELECTION_MULTIPLE
Any number of elements may be selected. Clicks toggle the state of an
item.
- GTK_SELECTION_EXTENDED
Any number of elements may be selected. Click-drag selects a range of
elements; the Ctrl key may be used to enlarge the selection, and
Shift key to select between the focus and the child pointed to.
gtk_list_extend_selection ()
Extends the selection by moving the anchor according to scroll_type. Only
in GTK_SELECTION_EXTENDED.
gtk_list_start_selection ()
void gtk_list_start_selection (GtkList *list); |
Starts a selection (or part of selection) at the focused child. Only in
GTK_SELECTION_EXTENDED mode.
gtk_list_select_all ()
void gtk_list_select_all (GtkList *list); |
Selects all children of list. A signal will be emitted for each
newly selected child.
gtk_list_unselect_all ()
void gtk_list_unselect_all (GtkList *list); |
Unselects all children of list. A signal will be emitted for each
newly unselected child.
gtk_list_scroll_horizontal ()
Scrolls list horizontaly. This supposes that the list is packed into a
scrolled window or something similar, and adjustments are well
set. Step and page increment are those from the horizontal adjustment
of list. Backward means to the left, and forward to the
right. Out of bounds values are truncated.
scroll_type may be any valid GtkScrollType. If scroll_type is
GTK_SCROLL_NONE, nothing is done. If it's GTK_SCROLL_JUMP, the list
scrolls to the ratio position: 0 is full left, 1 is full right.
gtk_list_scroll_vertical ()
Scrolls list vertically. This supposes that the list is packed into a
scrolled window or something similar, and adjustments are well
set. Step and page increment are those from the vertical adjustment
of list. Backward means up, and forward down. Out of bounds values are
truncated.
scroll_type may be any valid GtkScrollType. If scroll_type is
GTK_SCROLL_NONE, nothing is done. If it's GTK_SCROLL_JUMP, the list
scrolls to the ratio position: 0 is top, 1 is bottom.
gtk_list_toggle_add_mode ()
void gtk_list_toggle_add_mode (GtkList *list); |
Toggles between adding to the selection and beginning a new selection. Only
in GTK_SELECTION_EXTENDED. Useful with gtk_list_extend_selection.
gtk_list_toggle_focus_row ()
void gtk_list_toggle_focus_row (GtkList *list); |
Toggles the focus row. If the focus row is selected, it's
unselected. If the focus row is unselected, it's selected. If the
selection mode of list is GTK_SELECTION_BROWSE, this has no effect,
as the selection is always at the focus row.
gtk_list_toggle_row ()
Toggles the child item of list. If the selection mode of list is
GTK_SELECTION_BROWSE, the item is selected, and the others are
unselected.
gtk_list_undo_selection ()
void gtk_list_undo_selection (GtkList *list); |
Restores the selection in the last state, only if selection mode is
GTK_SELECTION_EXTENDED. If this function is called twice, the selection is
cleared. This function sometimes gives stranges "last states".
gtk_list_end_drag_selection ()
void gtk_list_end_drag_selection (GtkList *list); |
Stops the drag selection mode and ungrabs the pointer. This has no
effect if a drag selection is not active.