~ubuntu-branches/ubuntu/precise/gtk+2.0/precise-updates

« back to all changes in this revision

Viewing changes to docs/reference/gtk/tmpl/gtktreeselection.sgml

  • Committer: Package Import Robot
  • Author(s): Ken VanDine
  • Date: 2011-12-01 11:40:06 UTC
  • mfrom: (1.14.11)
  • Revision ID: package-import@ubuntu.com-20111201114006-nrmf6qu3pg512veo
Tags: 2.24.8-0ubuntu1
* New upstream release 
  - gtkfilechooser should be more robust to malformed URIs
    in .gtk-bookmarks (LP: #189494)
* debian/patches/010_make_bg_changes_queue_repaint.patch
  - dropped it introduces performance regressions in some gtk2 
    apps (LP: #889019)
* 101_filechooser.patch, 000git_file_chooser.patch: dropped, upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<!-- ##### SECTION Title ##### -->
2
 
GtkTreeSelection
3
 
 
4
 
<!-- ##### SECTION Short_Description ##### -->
5
 
The selection object for GtkTreeView
6
 
 
7
 
<!-- ##### SECTION Long_Description ##### -->
8
 
<para>
9
 
The #GtkTreeSelection object is a helper object to manage the selection
10
 
for a #GtkTreeView widget.  The #GtkTreeSelection object is
11
 
automatically created when a new #GtkTreeView widget is created, and
12
 
cannot exist independentally of this widget.  The primary reason the
13
 
#GtkTreeSelection objects exists is for cleanliness of code and API.
14
 
That is, there is no conceptual reason all these functions could not be
15
 
methods on the #GtkTreeView widget instead of a separate function.
16
 
</para>
17
 
 
18
 
<para>
19
 
The #GtkTreeSelection object is gotten from a #GtkTreeView by calling
20
 
gtk_tree_view_get_selection().  It can be manipulated to check the
21
 
selection status of the tree, as well as select and deselect individual
22
 
rows.  Selection is done completely view side.  As a result, multiple
23
 
views of the same model can have completely different selections.
24
 
Additionally, you cannot change the selection of a row on the model that
25
 
is not currently displayed by the view without expanding its parents
26
 
first.
27
 
</para>
28
 
 
29
 
<para>
30
 
One of the important things to remember when monitoring the selection of
31
 
a view is that the #GtkTreeSelection::changed signal is mostly a hint.  That is, it may
32
 
only emit one signal when a range of rows is selected.  Additionally, it
33
 
may on occasion emit a ::changed signal when nothing has happened
34
 
(mostly as a result of programmers calling select_row on an already
35
 
selected row).
36
 
</para>
37
 
 
38
 
<!-- ##### SECTION See_Also ##### -->
39
 
<para>
40
 
#GtkTreeView, #GtkTreeViewColumn, #GtkTreeDnd, #GtkTreeMode, #GtkTreeSortable, #GtkTreeModelSort, #GtkListStore, #GtkTreeStore, #GtkCellRenderer, #GtkCellEditable, #GtkCellRendererPixbuf, #GtkCellRendererText, #GtkCellRendererToggle
41
 
</para>
42
 
 
43
 
<!-- ##### SECTION Stability_Level ##### -->
44
 
 
45
 
 
46
 
<!-- ##### SECTION Image ##### -->
47
 
 
48
 
 
49
 
<!-- ##### STRUCT GtkTreeSelection ##### -->
50
 
<para>
51
 
 
52
 
</para>
53
 
 
54
 
 
55
 
<!-- ##### SIGNAL GtkTreeSelection::changed ##### -->
56
 
<para>
57
 
Emitted whenever the selection has (possibly) changed.  Please note that
58
 
this signal is mostly a hint.  It may only be emitted once when a range
59
 
of rows are selected, and it may occasionally be emitted when nothing
60
 
has happened.
61
 
</para>
62
 
 
63
 
@treeselection: the object which received the signal.
64
 
 
65
 
<!-- ##### USER_FUNCTION GtkTreeSelectionFunc ##### -->
66
 
<para>
67
 
A function used by gtk_tree_selection_set_select_function() to filter
68
 
whether or not a row may be selected.  It is called whenever a row's
69
 
state might change.  A return value of %TRUE indicates to @selection
70
 
that it is okay to change the selection.
71
 
</para>
72
 
 
73
 
@selection: A #GtkTreeSelection
74
 
@model: A #GtkTreeModel being viewed
75
 
@path: The #GtkTreePath of the row in question
76
 
@path_currently_selected: %TRUE, if the path is currently selected
77
 
@data: user data
78
 
@Returns: %TRUE, if the selection state of the row can be toggled
79
 
 
80
 
 
81
 
<!-- ##### USER_FUNCTION GtkTreeSelectionForeachFunc ##### -->
82
 
<para>
83
 
A function used by gtk_tree_selection_selected_foreach() to map all
84
 
selected rows.  It will be called on every selected row in the view.
85
 
</para>
86
 
 
87
 
@model: The #GtkTreeModel being viewed
88
 
@path: The #GtkTreePath of a selected row
89
 
@iter: A #GtkTreeIter pointing to a selected row
90
 
@data: user data
91
 
 
92
 
 
93
 
<!-- ##### FUNCTION gtk_tree_selection_set_mode ##### -->
94
 
<para>
95
 
 
96
 
</para>
97
 
 
98
 
@selection: 
99
 
@type: 
100
 
 
101
 
 
102
 
<!-- ##### FUNCTION gtk_tree_selection_get_mode ##### -->
103
 
<para>
104
 
 
105
 
</para>
106
 
 
107
 
@selection: 
108
 
@Returns: 
109
 
 
110
 
 
111
 
<!-- ##### FUNCTION gtk_tree_selection_set_select_function ##### -->
112
 
<para>
113
 
 
114
 
</para>
115
 
 
116
 
@selection: 
117
 
@func: 
118
 
@data: 
119
 
@destroy: 
120
 
 
121
 
 
122
 
<!-- ##### FUNCTION gtk_tree_selection_get_select_function ##### -->
123
 
<para>
124
 
 
125
 
</para>
126
 
 
127
 
@selection: 
128
 
@Returns: 
129
 
 
130
 
 
131
 
<!-- ##### FUNCTION gtk_tree_selection_get_user_data ##### -->
132
 
<para>
133
 
 
134
 
</para>
135
 
 
136
 
@selection: 
137
 
@Returns: 
138
 
 
139
 
 
140
 
<!-- ##### FUNCTION gtk_tree_selection_get_tree_view ##### -->
141
 
<para>
142
 
 
143
 
</para>
144
 
 
145
 
@selection: 
146
 
@Returns: 
147
 
 
148
 
 
149
 
<!-- ##### FUNCTION gtk_tree_selection_get_selected ##### -->
150
 
<para>
151
 
 
152
 
</para>
153
 
 
154
 
@selection: 
155
 
@model: 
156
 
@iter: 
157
 
@Returns: 
158
 
 
159
 
 
160
 
<!-- ##### FUNCTION gtk_tree_selection_selected_foreach ##### -->
161
 
<para>
162
 
 
163
 
</para>
164
 
 
165
 
@selection: 
166
 
@func: 
167
 
@data: 
168
 
 
169
 
 
170
 
<!-- ##### FUNCTION gtk_tree_selection_get_selected_rows ##### -->
171
 
<para>
172
 
 
173
 
</para>
174
 
 
175
 
@selection: 
176
 
@model: 
177
 
@Returns: 
178
 
 
179
 
 
180
 
<!-- ##### FUNCTION gtk_tree_selection_count_selected_rows ##### -->
181
 
<para>
182
 
 
183
 
</para>
184
 
 
185
 
@selection: 
186
 
@Returns: 
187
 
 
188
 
 
189
 
<!-- ##### FUNCTION gtk_tree_selection_select_path ##### -->
190
 
<para>
191
 
 
192
 
</para>
193
 
 
194
 
@selection: 
195
 
@path: 
196
 
 
197
 
 
198
 
<!-- ##### FUNCTION gtk_tree_selection_unselect_path ##### -->
199
 
<para>
200
 
 
201
 
</para>
202
 
 
203
 
@selection: 
204
 
@path: 
205
 
 
206
 
 
207
 
<!-- ##### FUNCTION gtk_tree_selection_path_is_selected ##### -->
208
 
<para>
209
 
 
210
 
</para>
211
 
 
212
 
@selection: 
213
 
@path: 
214
 
@Returns: 
215
 
 
216
 
 
217
 
<!-- ##### FUNCTION gtk_tree_selection_select_iter ##### -->
218
 
<para>
219
 
 
220
 
</para>
221
 
 
222
 
@selection: 
223
 
@iter: 
224
 
 
225
 
 
226
 
<!-- ##### FUNCTION gtk_tree_selection_unselect_iter ##### -->
227
 
<para>
228
 
 
229
 
</para>
230
 
 
231
 
@selection: 
232
 
@iter: 
233
 
 
234
 
 
235
 
<!-- ##### FUNCTION gtk_tree_selection_iter_is_selected ##### -->
236
 
<para>
237
 
 
238
 
</para>
239
 
 
240
 
@selection: 
241
 
@iter: 
242
 
@Returns: 
243
 
 
244
 
 
245
 
<!-- ##### FUNCTION gtk_tree_selection_select_all ##### -->
246
 
<para>
247
 
 
248
 
</para>
249
 
 
250
 
@selection: 
251
 
 
252
 
 
253
 
<!-- ##### FUNCTION gtk_tree_selection_unselect_all ##### -->
254
 
<para>
255
 
 
256
 
</para>
257
 
 
258
 
@selection: 
259
 
 
260
 
 
261
 
<!-- ##### FUNCTION gtk_tree_selection_select_range ##### -->
262
 
<para>
263
 
 
264
 
</para>
265
 
 
266
 
@selection: 
267
 
@start_path: 
268
 
@end_path: 
269
 
 
270
 
 
271
 
<!-- ##### FUNCTION gtk_tree_selection_unselect_range ##### -->
272
 
<para>
273
 
 
274
 
</para>
275
 
 
276
 
@selection: 
277
 
@start_path: 
278
 
@end_path: 
279
 
 
280