~canonical-dx-team/ubuntu/maverick/gtk+2.0/menuproxy

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2007-05-04 12:24:25 UTC
  • mfrom: (1.1.21 upstream)
  • Revision ID: james.westby@ubuntu.com-20070504122425-0m8midgzrp40y8w2
Tags: 2.10.12-1ubuntu1
* Sync with Debian
* New upstream version:
  Fixed bugs:
  - 379414 file chooser warnings when changing path in the entry
  - 418585 GtkFileChooserDefault sizing code is not DPI independent
  - 419568 Crash in search if start with special letter
  - 435062 build dies with icon cache validation
  - 379399 Segfault to call gtk_print_operation_run twice.
  - 387889 cups backend has problems when there are too many printers
  - 418531 invalid read to gtkicontheme.c gtk_icon_theme_lookup_icon...
  - 423916 crash in color scheme code
  - 424042 Segmentation fault while quickly pressing Alt+arrows
  - 415260 Protect against negative indices when setting values in G...
  - 419171 XGetVisualInfo() may not set nxvisuals
  - 128852 Gdk cursors don't look good on win32
  - 344657 Ctrl-H doesn't toggle "Show Hidden Files" setting
  - 345345 PrintOperation::paginate is not emitted for class handler
  - 347567 GtkPrintOperation::end-print is not emitted if it's cance...
  - 369112 gtk_ui_manager_add_ui should accept unnamed separator
  - 392015 Selected menu item invisible on Windows Vista
  - 399253 MS-Windows Theme Bottom Tab placement rendering glitches
  - 399425 gtk_input_dialog_fill_axes() adds child to gtkscrolledwin...
  - 403251 [patch] little memory leak in GtkPrintJob
  - 403267 [patch] memory leak in GtkPageSetupUnixDialog
  - 403470 MS-Windows Theme tab placement other than on top leaks a ...
  - 404506 Windows system fonts that have multi-byte font names cann...
  - 405089 Incorrect window placement for GtkEventBox private window
  - 405515 Minor leak in gtkfilesystemmodel.c
  - 405539 gdk_pixbuf_save() for PNG saver can return FALSE without ...
  - 415681 gdk_window_clear_area includes an extra line and column o...
  - 418219 GtkRecentChooser should apply filter before sorting and c...
  - 418403 Scroll to printer after selecting it from settings
  - 421985 _gtk_print_operation_platform_backend_launch_preview
  - 421990 gtk_print_job_get_surface
  - 421993 gtk_print_operation_init
  - 423064 Conditional jump or move depends on uninitialised value(s...
  - 423722 Fix printing header in gtk-demo
  - 424168 gtk_print_operation_run on async preview
  - 425655 Don't install gtk+-unix-print-2.0.pc on non-UNIX platforms
  - 425786 GDK segfaults if XineramaQueryScreens fails
  - 428665 Lpr Backend gets stuck in infinite loop during gtk_enumer...
  - 429902 GtkPrintOperation leaks cairo contextes
  - 431997 First delay of GdkPixbufAnimationIter is wrong
  - 433242 Inconsistent scroll arrow position calculations
  - 433972 Placing gtk.Expander inside a gtk.TextView() changes gtk....
  - 434261 _gtk_toolbar_elide_underscores incorrectly handles some s...
  - 383354 ctrl-L should make 'Location' entry disappear
  - 418673 gtk_recent_manager_add_item
  - 429732 gtk_accel_group_finalize accesses invalid memory
  - 435028 WM_CLIENT_LEADER is wrong on the leader_window
  - 431067 Background of the header window is not updated
  - 338843 add recent files support inside the ui manager
  - 148535 add drop shadow to menus, tooltips, etc. under Windows XP
* debian/control.in:
  - Conflicts on ubuntulooks (<= 0.9.11-1)
* debian/patches/15_default-fallback-icon-theme.patch:
  - patch from Debian, fallback on gnome icon theme

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!-- ##### SECTION Title ##### -->
 
2
GtkTree
 
3
 
 
4
<!-- ##### SECTION Short_Description ##### -->
 
5
A tree widget
 
6
 
 
7
<!-- ##### SECTION Long_Description ##### -->
 
8
<para>
 
9
<warning>
 
10
<para>
 
11
#GtkTree is deprecated and unsupported. It is known to be
 
12
buggy. To use it, you must define the symbol %GTK_ENABLE_BROKEN
 
13
prior to including the GTK+ header files. Use #GtkTreeView instead.
 
14
</para>
 
15
</warning>
 
16
The #GtkTree widget is a container that shows users a list of items, in a tree format complete with branches and leafnodes. Branches can be expanded to show their child items, or collapsed to hide them.
 
17
</para>
 
18
 
 
19
<!-- ##### SECTION See_Also ##### -->
 
20
<para>
 
21
#GtkTreeList for the items to put into a #GtkTree.
 
22
</para>
 
23
<para>
 
24
#GtkScrolledWindow for details on how to scroll around a #GtkTree.
 
25
</para>
 
26
 
 
27
<!-- ##### SECTION Stability_Level ##### -->
 
28
 
 
29
 
 
30
<!-- ##### STRUCT GtkTree ##### -->
 
31
<para>
 
32
<programlisting>
 
33
struct _GtkTree
 
34
{
 
35
  GtkContainer container;
 
36
  GList *children;
 
37
  GtkTree* root_tree; /* owner of selection list */
 
38
  GtkWidget* tree_owner;
 
39
  GList *selection;
 
40
  guint level;
 
41
  guint indent_value;
 
42
  guint current_indent;
 
43
  guint selection_mode : 2;
 
44
  guint view_mode : 1;
 
45
  guint view_line : 1;
 
46
};
 
47
</programlisting>
 
48
</para>
 
49
 
 
50
 
 
51
<!-- ##### SIGNAL GtkTree::select-child ##### -->
 
52
<para>
 
53
This signal is emitted by @tree whenever @widget is about to be selected.
 
54
</para>
 
55
 
 
56
@tree: the object which received the signal.
 
57
@widget: The child that is about to be selected.
 
58
 
 
59
<!-- ##### SIGNAL GtkTree::selection-changed ##### -->
 
60
<para>
 
61
This signal is emitted by the root tree whenever the selection changes.
 
62
</para>
 
63
 
 
64
@tree: the object which received the signal.
 
65
 
 
66
<!-- ##### SIGNAL GtkTree::unselect-child ##### -->
 
67
<para>
 
68
This signal is emitted by @tree whenever @widget is about to be unselected.
 
69
</para>
 
70
 
 
71
@tree: the object which received the signal.
 
72
@widget: The child that is about to be unselected.
 
73
 
 
74
<!-- ##### MACRO GTK_IS_ROOT_TREE ##### -->
 
75
<para>
 
76
A macro that returns a boolean value which indicates if @obj is a root tree or not.
 
77
</para>
 
78
 
 
79
@obj: A pointer to the #GtkTree. @obj will accept any pointer, but if the pointer does not point to a #GtkTree, the results are undefined.
 
80
 
 
81
 
 
82
<!-- ##### MACRO GTK_TREE_ROOT_TREE ##### -->
 
83
<para>
 
84
A macro that returns the root tree of @obj.
 
85
</para>
 
86
<para>
 
87
If @obj is already a root tree, @obj is cast to #GtkTree and returned.
 
88
</para>
 
89
 
 
90
@obj: A pointer to the #GtkTree. @obj will accept any pointer, but if the pointer does not point to a #GtkTree, the results are undefined.
 
91
 
 
92
 
 
93
<!-- ##### MACRO GTK_TREE_SELECTION_OLD ##### -->
 
94
<para>
 
95
 
 
96
</para>
 
97
 
 
98
@obj: 
 
99
 
 
100
 
 
101
<!-- ##### ENUM GtkTreeViewMode ##### -->
 
102
<para>
 
103
 
 
104
</para>
 
105
 
 
106
@GTK_TREE_VIEW_LINE: 
 
107
@GTK_TREE_VIEW_ITEM: 
 
108
 
 
109
<!-- ##### FUNCTION gtk_tree_new ##### -->
 
110
<para>
 
111
Creates a new #GtkTree.
 
112
</para>
 
113
 
 
114
@Returns: A pointer to the newly allocated widget.
 
115
 
 
116
 
 
117
<!-- ##### FUNCTION gtk_tree_append ##### -->
 
118
<para>
 
119
Adds the #GtkTreeItem in @tree_item to the end of the items in @tree.
 
120
</para>
 
121
 
 
122
@tree: A pointer to a #GtkTree.
 
123
@tree_item: A pointer to the #GtkWidget that is to be appended to the tree.
 
124
 
 
125
 
 
126
<!-- ##### FUNCTION gtk_tree_prepend ##### -->
 
127
<para>
 
128
Adds the #GtkTreeItem in @tree_item to the start of the items in @tree.
 
129
</para>
 
130
 
 
131
@tree: A pointer to a #GtkTree.
 
132
@tree_item: A pointer to the #GtkWidget that is to be prepended to the tree.
 
133
 
 
134
 
 
135
<!-- ##### FUNCTION gtk_tree_insert ##### -->
 
136
<para>
 
137
Adds the #GtkTreeItem in @tree_item to the list of items in @tree at the position indicated by @position.
 
138
</para>
 
139
 
 
140
@tree: A pointer to a #GtkTree.
 
141
@tree_item: A pointer to the #GtkWidget that is to be added to the tree.
 
142
@position: A #gint that indicates the position in the tree, that the @tree_item is to be added at.
 
143
 
 
144
 
 
145
<!-- ##### FUNCTION gtk_tree_remove_items ##### -->
 
146
<para>
 
147
Removes a list of items from the #GtkTree in @tree.
 
148
</para>
 
149
<para>
 
150
If only one item is to be removed from the #GtkTree, gtk_container_remove() can be used instead.
 
151
</para>
 
152
<para>
 
153
Removing an item from a #GtkTree dereferences the item, and thus usually destroys the item and any subtrees it may contain. If the item is not to be destroyed, use g_object_ref() before removing it.
 
154
</para>
 
155
 
 
156
@tree: A pointer to a #GtkTree.
 
157
@items: A pointer to a #GList that contains the items to be removed.
 
158
 
 
159
 
 
160
<!-- ##### FUNCTION gtk_tree_clear_items ##### -->
 
161
<para>
 
162
Removes the items at positions between @start and @end from the #GtkTree @tree.
 
163
</para>
 
164
<para>
 
165
Removing an item from a #GtkTree dereferences the item, and thus usually destroys the item and any subtrees it may contain. If the item is not to be destroyed, use g_object_ref() before removing it.
 
166
</para>
 
167
 
 
168
@tree: A pointer to a #GtkTree.
 
169
@start: A #gint.
 
170
@end: A #gint.
 
171
 
 
172
 
 
173
<!-- ##### FUNCTION gtk_tree_select_item ##### -->
 
174
<para>
 
175
Emits the #select_item signal for the child at position @item, and thus selects it (unless it is unselected in a signal handler).
 
176
</para>
 
177
 
 
178
@tree: A pointer to a #GtkTree.
 
179
@item: A #gint.
 
180
 
 
181
 
 
182
<!-- ##### FUNCTION gtk_tree_unselect_item ##### -->
 
183
<para>
 
184
Emits the #unselect_item for the child at position @item, and thus unselects it.
 
185
</para>
 
186
 
 
187
@tree: A pointer to a #GtkTree.
 
188
@item: A #gint.
 
189
 
 
190
 
 
191
<!-- ##### FUNCTION gtk_tree_select_child ##### -->
 
192
<para>
 
193
Emits the #select_item signal for the child @tree_item, and thus selects it (unless it is unselected in a signal handler).
 
194
</para>
 
195
 
 
196
@tree: A pointer to a #GtkTree.
 
197
@tree_item: A pointer to the #GtkWidget that is to be selected.
 
198
 
 
199
 
 
200
<!-- ##### FUNCTION gtk_tree_unselect_child ##### -->
 
201
<para>
 
202
Emits the #unselect_item signal for the child @tree_item, and thus unselects it.
 
203
</para>
 
204
 
 
205
@tree: A pointer to a #GtkTree.
 
206
@tree_item: A pointer to the #GtkWidget that is to be selected.
 
207
 
 
208
 
 
209
<!-- ##### FUNCTION gtk_tree_child_position ##### -->
 
210
<para>
 
211
Returns the position of @child in the #GtkTree @tree.
 
212
</para>
 
213
<para>
 
214
If @child is not a child of @tree, then -1 is returned.
 
215
</para>
 
216
 
 
217
@tree: A pointer to a #GtkTree.
 
218
@child: A pointer to a #GtkWidget.
 
219
@Returns: A #gint.
 
220
 
 
221
 
 
222
<!-- ##### FUNCTION gtk_tree_set_selection_mode ##### -->
 
223
<para>
 
224
Sets the selection mode for the #GtkTree @tree.
 
225
</para>
 
226
<para>
 
227
@mode can be one of
 
228
</para>
 
229
<itemizedlist>
 
230
<listitem>
 
231
<para>
 
232
%GTK_SELECTION_SINGLE for when only one item can be selected at a time.
 
233
</para>
 
234
</listitem>
 
235
<listitem>
 
236
<para>
 
237
%GTK_SELECTION_BROWSE for when one item must be selected.
 
238
</para>
 
239
</listitem>
 
240
<listitem>
 
241
<para>
 
242
%GTK_SELECTION_MULTIPLE for when many items can be selected at once.
 
243
</para>
 
244
</listitem>
 
245
<listitem>
 
246
<para>
 
247
%GTK_SELECTION_EXTENDED Reserved for later use.
 
248
</para>
 
249
</listitem>
 
250
</itemizedlist>
 
251
<para>
 
252
The selection mode is only defined for a root tree, as the root tree "owns" the selection.
 
253
</para>
 
254
<para>
 
255
The default mode is %GTK_SELECTION_SINGLE.
 
256
</para>
 
257
 
 
258
@tree: A pointer to a #GtkTree.
 
259
@mode: A #GtkSelectionMode.
 
260
 
 
261
 
 
262
<!-- ##### FUNCTION gtk_tree_set_view_mode ##### -->
 
263
<para>
 
264
Sets the 'viewmode' for the #GtkTree in @tree. The 'viewmode' defines how the tree looks when an item is selected.
 
265
</para>
 
266
<para>
 
267
@mode can be one of:
 
268
</para>
 
269
<itemizedlist>
 
270
<listitem>
 
271
<para>
 
272
%GTK_TREE_VIEW_LINE : When an item is selected the entire #GtkTreeItem is highlighted.
 
273
</para>
 
274
</listitem>
 
275
<listitem>
 
276
<para>
 
277
%GTK_TREE_VIEW_ITEM : When an item is selected only the selected item's child widget is highlighted.
 
278
</para>
 
279
</listitem>
 
280
</itemizedlist>
 
281
<para>
 
282
The default mode is %GTK_TREE_VIEW_LINE.
 
283
</para>
 
284
 
 
285
@tree: A pointer to a #GtkTree.
 
286
@mode: A #GtkTreeViewMode.
 
287
 
 
288
 
 
289
<!-- ##### FUNCTION gtk_tree_set_view_lines ##### -->
 
290
<para>
 
291
Sets whether or not the connecting lines between branches and children are drawn.
 
292
</para>
 
293
 
 
294
@tree: A pointer to a #GtkTree.
 
295
@flag: A #guint, indicating %TRUE, or %FALSE.
 
296
 
 
297
 
 
298
<!-- ##### FUNCTION gtk_tree_remove_item ##### -->
 
299
<para>
 
300
Removes the item @child from the #GtkTree @tree.
 
301
</para>
 
302
 
 
303
@tree: A pointer to a #GtkTree.
 
304
@child: A pointer to the #GtkWidget that is to be removed from the tree.
 
305
 
 
306