2000-10-30 23:21:38 +00:00
|
|
|
<!-- ##### SECTION Title ##### -->
|
|
|
|
GtkTreeSelection
|
|
|
|
|
|
|
|
<!-- ##### SECTION Short_Description ##### -->
|
2007-06-11 03:41:27 +00:00
|
|
|
The selection object for GtkTreeView
|
2000-10-30 23:21:38 +00:00
|
|
|
|
|
|
|
<!-- ##### SECTION Long_Description ##### -->
|
|
|
|
<para>
|
2002-03-06 19:22:36 +00:00
|
|
|
The #GtkTreeSelection object is a helper object to manage the selection
|
|
|
|
for a #GtkTreeView widget. The #GtkTreeSelection object is
|
|
|
|
automatically created when a new #GtkTreeView widget is created, and
|
|
|
|
cannot exist independentally of this widget. The primary reason the
|
|
|
|
#GtkTreeSelection objects exists is for cleanliness of code and API.
|
|
|
|
That is, there is no conceptual reason all these functions could not be
|
|
|
|
methods on the #GtkTreeView widget instead of a separate function.
|
|
|
|
</para>
|
2000-10-30 23:21:38 +00:00
|
|
|
|
2002-03-06 19:22:36 +00:00
|
|
|
<para>
|
|
|
|
The #GtkTreeSelection object is gotten from a #GtkTreeView by calling
|
|
|
|
gtk_tree_view_get_selection(). It can be manipulated to check the
|
|
|
|
selection status of the tree, as well as select and deselect individual
|
|
|
|
rows. Selection is done completely view side. As a result, multiple
|
|
|
|
views of the same model can have completely different selections.
|
|
|
|
Additionally, you cannot change the selection of a row on the model that
|
|
|
|
is not currently displayed by the view without expanding its parents
|
|
|
|
first.
|
2000-10-30 23:21:38 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
2002-03-06 19:22:36 +00:00
|
|
|
One of the important things to remember when monitoring the selection of
|
2007-05-27 03:02:29 +00:00
|
|
|
a view is that the #GtkTreeSelection::changed signal is mostly a hint. That is, it may
|
2002-03-06 19:22:36 +00:00
|
|
|
only emit one signal when a range of rows is selected. Additionally, it
|
2007-05-27 03:02:29 +00:00
|
|
|
may on occasion emit a ::changed signal when nothing has happened
|
2002-03-06 19:22:36 +00:00
|
|
|
(mostly as a result of programmers calling select_row on an already
|
|
|
|
selected row).
|
|
|
|
</para>
|
2000-10-30 23:21:38 +00:00
|
|
|
|
2002-03-06 19:22:36 +00:00
|
|
|
<!-- ##### SECTION See_Also ##### -->
|
|
|
|
<para>
|
|
|
|
#GtkTreeView, #GtkTreeViewColumn, #GtkTreeDnd, #GtkTreeMode, #GtkTreeSortable, #GtkTreeModelSort, #GtkListStore, #GtkTreeStore, #GtkCellRenderer, #GtkCellEditable, #GtkCellRendererPixbuf, #GtkCellRendererText, #GtkCellRendererToggle
|
2000-10-30 23:21:38 +00:00
|
|
|
</para>
|
|
|
|
|
2005-06-20 22:06:27 +00:00
|
|
|
<!-- ##### SECTION Stability_Level ##### -->
|
|
|
|
|
|
|
|
|
2010-05-08 05:18:53 +00:00
|
|
|
<!-- ##### SECTION Image ##### -->
|
|
|
|
|
|
|
|
|
2001-11-15 22:20:18 +00:00
|
|
|
<!-- ##### STRUCT GtkTreeSelection ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
|
2004-07-20 02:26:06 +00:00
|
|
|
<!-- ##### SIGNAL GtkTreeSelection::changed ##### -->
|
|
|
|
<para>
|
|
|
|
Emitted whenever the selection has (possibly) changed. Please note that
|
|
|
|
this signal is mostly a hint. It may only be emitted once when a range
|
|
|
|
of rows are selected, and it may occasionally be emitted when nothing
|
|
|
|
has happened.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@treeselection: the object which received the signal.
|
|
|
|
|
2000-10-30 23:21:38 +00:00
|
|
|
<!-- ##### USER_FUNCTION GtkTreeSelectionFunc ##### -->
|
|
|
|
<para>
|
2002-03-06 19:22:36 +00:00
|
|
|
A function used by gtk_tree_selection_set_select_function() to filter
|
|
|
|
whether or not a row may be selected. It is called whenever a row's
|
|
|
|
state might change. A return value of %TRUE indicates to @selection
|
|
|
|
that it is okay to change the selection.
|
2000-10-30 23:21:38 +00:00
|
|
|
</para>
|
|
|
|
|
2002-03-06 19:22:36 +00:00
|
|
|
@selection: A #GtkTreeSelection
|
|
|
|
@model: A #GtkTreeModel being viewed
|
|
|
|
@path: The #GtkTreePath of the row in question
|
|
|
|
@path_currently_selected: %TRUE, if the path is currently selected
|
|
|
|
@data: user data
|
|
|
|
@Returns: %TRUE, if the selection state of the row can be toggled
|
2000-10-30 23:21:38 +00:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### USER_FUNCTION GtkTreeSelectionForeachFunc ##### -->
|
|
|
|
<para>
|
2002-03-06 19:22:36 +00:00
|
|
|
A function used by gtk_tree_selection_selected_foreach() to map all
|
|
|
|
selected rows. It will be called on every selected row in the view.
|
2000-10-30 23:21:38 +00:00
|
|
|
</para>
|
|
|
|
|
2002-03-06 19:22:36 +00:00
|
|
|
@model: The #GtkTreeModel being viewed
|
|
|
|
@path: The #GtkTreePath of a selected row
|
|
|
|
@iter: A #GtkTreeIter pointing to a selected row
|
|
|
|
@data: user data
|
2000-10-30 23:21:38 +00:00
|
|
|
|
|
|
|
|
2001-01-09 16:41:17 +00:00
|
|
|
<!-- ##### FUNCTION gtk_tree_selection_set_mode ##### -->
|
2000-10-30 23:21:38 +00:00
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
2001-01-09 16:41:17 +00:00
|
|
|
@selection:
|
|
|
|
@type:
|
2000-10-30 23:21:38 +00:00
|
|
|
|
|
|
|
|
2001-10-03 04:44:13 +00:00
|
|
|
<!-- ##### FUNCTION gtk_tree_selection_get_mode ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@selection:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
2001-01-09 16:41:17 +00:00
|
|
|
<!-- ##### FUNCTION gtk_tree_selection_set_select_function ##### -->
|
2000-10-30 23:21:38 +00:00
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@selection:
|
2001-01-09 16:41:17 +00:00
|
|
|
@func:
|
|
|
|
@data:
|
2001-03-03 23:29:50 +00:00
|
|
|
@destroy:
|
2000-10-30 23:21:38 +00:00
|
|
|
|
|
|
|
|
2008-07-22 00:39:10 +00:00
|
|
|
<!-- ##### FUNCTION gtk_tree_selection_get_select_function ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@selection:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
2001-01-09 16:41:17 +00:00
|
|
|
<!-- ##### FUNCTION gtk_tree_selection_get_user_data ##### -->
|
2000-10-30 23:21:38 +00:00
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@selection:
|
2001-01-09 16:41:17 +00:00
|
|
|
@Returns:
|
2000-10-30 23:21:38 +00:00
|
|
|
|
|
|
|
|
2001-01-09 16:41:17 +00:00
|
|
|
<!-- ##### FUNCTION gtk_tree_selection_get_tree_view ##### -->
|
2000-10-30 23:21:38 +00:00
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@selection:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_tree_selection_get_selected ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@selection:
|
2000-11-14 16:36:20 +00:00
|
|
|
@model:
|
2000-10-30 23:21:38 +00:00
|
|
|
@iter:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_tree_selection_selected_foreach ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@selection:
|
|
|
|
@func:
|
|
|
|
@data:
|
|
|
|
|
|
|
|
|
Documentation fixes.
Sun Oct 13 18:50:14 2002 Soeren Sandmann <sandmann@daimi.au.dk>
* gtkmenu.c, gtkmenu.sgml, gtkitemfactory.c, gdkwindow.c,
gtkwindow.c, gtkpaned.sgml, gtkdialog.c, gtkbox.h, gtkbutton.sgml,
gtktreemodel.sgml,gtktable.sgml, gtktable.c:
Documentation fixes.
#85719, #90759, #95169, Owen Taylor;
#89221, Yao Zhang, Matthias Clasen;
#95592, Joost Faassen;
#92637, Vitaly Tishkov;
#94616, Ben Martin;
#94772, sbaillie@bigpond.net.au;
2002-10-13 17:17:14 +00:00
|
|
|
<!-- ##### FUNCTION gtk_tree_selection_get_selected_rows ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@selection:
|
|
|
|
@model:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_tree_selection_count_selected_rows ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@selection:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
2000-10-30 23:21:38 +00:00
|
|
|
<!-- ##### FUNCTION gtk_tree_selection_select_path ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@selection:
|
|
|
|
@path:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_tree_selection_unselect_path ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@selection:
|
|
|
|
@path:
|
|
|
|
|
|
|
|
|
2001-10-13 05:52:14 +00:00
|
|
|
<!-- ##### FUNCTION gtk_tree_selection_path_is_selected ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@selection:
|
|
|
|
@path:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
2000-10-30 23:21:38 +00:00
|
|
|
<!-- ##### FUNCTION gtk_tree_selection_select_iter ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@selection:
|
|
|
|
@iter:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_tree_selection_unselect_iter ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@selection:
|
|
|
|
@iter:
|
|
|
|
|
|
|
|
|
2001-10-13 05:52:14 +00:00
|
|
|
<!-- ##### FUNCTION gtk_tree_selection_iter_is_selected ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@selection:
|
|
|
|
@iter:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
2000-10-30 23:21:38 +00:00
|
|
|
<!-- ##### FUNCTION gtk_tree_selection_select_all ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@selection:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_tree_selection_unselect_all ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@selection:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_tree_selection_select_range ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@selection:
|
|
|
|
@start_path:
|
|
|
|
@end_path:
|
|
|
|
|
|
|
|
|
Documentation fixes.
Sun Oct 13 18:50:14 2002 Soeren Sandmann <sandmann@daimi.au.dk>
* gtkmenu.c, gtkmenu.sgml, gtkitemfactory.c, gdkwindow.c,
gtkwindow.c, gtkpaned.sgml, gtkdialog.c, gtkbox.h, gtkbutton.sgml,
gtktreemodel.sgml,gtktable.sgml, gtktable.c:
Documentation fixes.
#85719, #90759, #95169, Owen Taylor;
#89221, Yao Zhang, Matthias Clasen;
#95592, Joost Faassen;
#92637, Vitaly Tishkov;
#94616, Ben Martin;
#94772, sbaillie@bigpond.net.au;
2002-10-13 17:17:14 +00:00
|
|
|
<!-- ##### FUNCTION gtk_tree_selection_unselect_range ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@selection:
|
|
|
|
@start_path:
|
|
|
|
@end_path:
|
|
|
|
|
|
|
|
|