synopsis#include <gtk/gtk.h> gtklist; gtkwidget* gtk_list_new (void); void gtk_list_insert_items (gtklist *list, glist *items, gint position); void gtk_list_append_items (gtklist *list, glist *items); void gtk_list_prepend_items (gtklist *list, glist *items); void gtk_list_remove_items (gtklist *list, glist *items); void gtk_list_remove_items_no_unref (gtklist *list, glist *items); void gtk_list_clear_items (gtklist *list, gint start, gint end); void gtk_list_select_item (gtklist *list, gint item); void gtk_list_unselect_item (gtklist *list, gint item); void gtk_list_select_child (gtklist *list, gtkwidget *child); void gtk_list_unselect_child (gtklist *list, gtkwidget *child); gint gtk_list_child_position (gtklist *list, gtkwidget *child); void gtk_list_set_selection_mode (gtklist *list, gtkselectionmode mode); void gtk_list_extend_selection (gtklist *list, gtkscrolltype scroll_type, gfloat position, gboolean auto_start_selection); void gtk_list_start_selection (gtklist *list); void gtk_list_end_selection (gtklist *list); void gtk_list_select_all (gtklist *list); void gtk_list_unselect_all (gtklist *list); void gtk_list_scroll_horizontal (gtklist *list, gtkscrolltype scroll_type, gfloat position); void gtk_list_scroll_vertical (gtklist *list, gtkscrolltype scroll_type, gfloat position); void gtk_list_toggle_add_mode (gtklist *list); void gtk_list_toggle_focus_row (gtklist *list); void gtk_list_toggle_row (gtklist *list, gtkwidget *item); void gtk_list_undo_selection (gtklist *list); void gtk_list_end_drag_selection (gtklist *list); object hierarchygobject +----ginitiallyunowned +----gtkobject +----gtkwidget +----gtkcontainer +----gtklist signals"select-child" void user_function (gtklist *list, gtkwidget *widget, gpointer user_data) : run first "selection-changed" void user_function (gtklist *list, gpointer user_data) : run first "unselect-child" void user_function (gtklist *list, gtkwidget *widget, gpointer user_data) : run first descriptionthe 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. gtklist has been deprecated since gtk+ 2.0 and should not be used in newly written code. use gtktreeview instead. detailsgtklisttypedef struct _gtklist gtklist; warninggtklist is deprecated and should not be used in newly-written code.
gtk_list_new ()gtkwidget* gtk_list_new (void); warninggtk_list_new is deprecated and should not be used in newly-written code. creates a new gtklist.
gtk_list_insert_items ()void gtk_list_insert_items (gtklist *list, glist *items, gint position); warninggtk_list_insert_items is deprecated and should not be used in newly-written code. inserts items into the list at the position position. the glist items must not be freed after.
gtk_list_append_items ()void gtk_list_append_items (gtklist *list, glist *items); warninggtk_list_append_items is deprecated and should not be used in newly-written code. adds items to the end of the list.
gtk_list_prepend_items ()void gtk_list_prepend_items (gtklist *list, glist *items); warninggtk_list_prepend_items is deprecated and should not be used in newly-written code. inserts items at the beginning of the list.
gtk_list_remove_items ()void gtk_list_remove_items (gtklist *list, glist *items); warninggtk_list_remove_items is deprecated and should not be used in newly-written code. removes the items from the list.
gtk_list_remove_items_no_unref ()void gtk_list_remove_items_no_unref (gtklist *list, glist *items); warninggtk_list_remove_items_no_unref is deprecated and should not be used in newly-written code. 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 ()void gtk_list_clear_items (gtklist *list, gint start, gint end); warninggtk_list_clear_items is deprecated and should not be used in newly-written code. 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 ()void gtk_list_select_item (gtklist *list, gint item); warninggtk_list_select_item is deprecated and should not be used in newly-written code. 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); warninggtk_list_unselect_item is deprecated and should not be used in newly-written code. 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 ()void gtk_list_select_child (gtklist *list, gtkwidget *child); warninggtk_list_select_child is deprecated and should not be used in newly-written code. selects the given child. the signal gtklist::select-child will be emitted.
gtk_list_unselect_child ()void gtk_list_unselect_child (gtklist *list, gtkwidget *child); warninggtk_list_unselect_child is deprecated and should not be used in newly-written code. unselects the given child. the signal gtklist::unselect-child will be emitted.
gtk_list_child_position ()gint gtk_list_child_position (gtklist *list, gtkwidget *child); warninggtk_list_child_position is deprecated and should not be used in newly-written code. searches the children of list for the index of child.
gtk_list_set_selection_mode ()void gtk_list_set_selection_mode (gtklist *list, gtkselectionmode mode); warninggtk_list_set_selection_mode is deprecated and should not be used in newly-written code. set the list selection mode. the selection mode can be any value in gtkselectionmode:
gtk_list_extend_selection ()void gtk_list_extend_selection (gtklist *list, gtkscrolltype scroll_type, gfloat position, gboolean auto_start_selection); warninggtk_list_extend_selection is deprecated and should not be used in newly-written code. 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); warninggtk_list_start_selection is deprecated and should not be used in newly-written code. starts a selection (or part of selection) at the focused child. only in gtk_selection_extended mode.
gtk_list_end_selection ()void gtk_list_end_selection (gtklist *list); warninggtk_list_end_selection is deprecated and should not be used in newly-written code. ends the selection. used with gtk_list_extend_selection() and gtk_list_start_selection(). only in gtk_selection_extended mode.
gtk_list_select_all ()void gtk_list_select_all (gtklist *list); warninggtk_list_select_all is deprecated and should not be used in newly-written code. 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); warninggtk_list_unselect_all is deprecated and should not be used in newly-written code. unselects all children of list. a signal will be emitted for each newly unselected child.
gtk_list_scroll_horizontal ()void gtk_list_scroll_horizontal (gtklist *list, gtkscrolltype scroll_type, gfloat position); warninggtk_list_scroll_horizontal is deprecated and should not be used in newly-written code. 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 ()void gtk_list_scroll_vertical (gtklist *list, gtkscrolltype scroll_type, gfloat position); warninggtk_list_scroll_vertical is deprecated and should not be used in newly-written code. 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); warninggtk_list_toggle_add_mode is deprecated and should not be used in newly-written code. 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); warninggtk_list_toggle_focus_row is deprecated and should not be used in newly-written code. 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 ()void gtk_list_toggle_row (gtklist *list, gtkwidget *item); warninggtk_list_toggle_row is deprecated and should not be used in newly-written code. 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); warninggtk_list_undo_selection is deprecated and should not be used in newly-written code. 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); warninggtk_list_end_drag_selection is deprecated and should not be used in newly-written code. stops the drag selection mode and ungrabs the pointer. this has no effect if a drag selection is not active.
property detailsthe "selection-mode" property"selection-mode" gtkselectionmode : read / write default value: gtk_selection_none signal detailsthe "select-child" signalvoid user_function (gtklist *list, gtkwidget *widget, gpointer user_data) : run first the child widget has just been selected.
the "selection-changed" signalvoid user_function (gtklist *list, gpointer user_data) : run first the selection of the widget has just changed.
the "unselect-child" signalvoid user_function (gtklist *list, gtkwidget *widget, gpointer user_data) : run first the child widget has just been unselected.
see also
|