Mercurial > pidgin.yaz
annotate finch/libgnt/gnttree.h @ 32118:7675022d2312
We should not be installing libpurple/valgrind.h
author | Stu Tomlinson <stu@nosnilmot.com> |
---|---|
date | Mon, 13 Jun 2011 17:31:03 +0000 |
parents | 44f53d3fc54f |
children | 5876584828e8 |
rev | line source |
---|---|
17718
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
1 /** |
18303
5c6f019e48f8
Generate doxy-help files for libgnt. And make it actually work.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18118
diff
changeset
|
2 * @file gnttree.h Tree API |
5c6f019e48f8
Generate doxy-help files for libgnt. And make it actually work.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18118
diff
changeset
|
3 * @ingroup gnt |
5c6f019e48f8
Generate doxy-help files for libgnt. And make it actually work.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18118
diff
changeset
|
4 */ |
5c6f019e48f8
Generate doxy-help files for libgnt. And make it actually work.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18118
diff
changeset
|
5 /* |
17718
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
6 * GNT - The GLib Ncurses Toolkit |
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
7 * |
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
8 * GNT is the legal property of its developers, whose names are too numerous |
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
9 * to list here. Please refer to the COPYRIGHT file distributed with this |
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
10 * source distribution. |
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
11 * |
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
12 * This library is free software; you can redistribute it and/or modify |
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
13 * it under the terms of the GNU General Public License as published by |
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
14 * the Free Software Foundation; either version 2 of the License, or |
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
15 * (at your option) any later version. |
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
16 * |
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
17 * This program is distributed in the hope that it will be useful, |
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
20 * GNU General Public License for more details. |
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
21 * |
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
22 * You should have received a copy of the GNU General Public License |
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
23 * along with this program; if not, write to the Free Software |
19680
44b4e8bd759b
The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
18564
diff
changeset
|
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
17718
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
25 */ |
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
26 |
15818 | 27 #ifndef GNT_TREE_H |
28 #define GNT_TREE_H | |
29 | |
30 #include "gntwidget.h" | |
31 #include "gnt.h" | |
32 #include "gntcolors.h" | |
33 #include "gntkeys.h" | |
34 #include "gnttextview.h" | |
35 | |
36 #define GNT_TYPE_TREE (gnt_tree_get_gtype()) | |
37 #define GNT_TREE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GNT_TYPE_TREE, GntTree)) | |
38 #define GNT_TREE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GNT_TYPE_TREE, GntTreeClass)) | |
39 #define GNT_IS_TREE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GNT_TYPE_TREE)) | |
40 #define GNT_IS_TREE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GNT_TYPE_TREE)) | |
41 #define GNT_TREE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GNT_TYPE_TREE, GntTreeClass)) | |
42 | |
15931
f00f2e283ffb
Some define changes. This helps in generating the python bindings.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15818
diff
changeset
|
43 typedef struct _GntTree GntTree; |
f00f2e283ffb
Some define changes. This helps in generating the python bindings.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15818
diff
changeset
|
44 typedef struct _GntTreePriv GntTreePriv; |
f00f2e283ffb
Some define changes. This helps in generating the python bindings.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15818
diff
changeset
|
45 typedef struct _GntTreeClass GntTreeClass; |
15818 | 46 |
15931
f00f2e283ffb
Some define changes. This helps in generating the python bindings.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15818
diff
changeset
|
47 typedef struct _GntTreeRow GntTreeRow; |
f00f2e283ffb
Some define changes. This helps in generating the python bindings.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15818
diff
changeset
|
48 typedef struct _GntTreeCol GntTreeCol; |
15818 | 49 |
18548
8838b67b1ea0
Fixes for pygnt generation.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18535
diff
changeset
|
50 typedef enum _GntTreeColumnFlag { |
18404
9a0f99ea664d
Resize tree-columns nicely when the tree is resized. We can tell it to
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18348
diff
changeset
|
51 GNT_TREE_COLUMN_INVISIBLE = 1 << 0, |
9a0f99ea664d
Resize tree-columns nicely when the tree is resized. We can tell it to
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18348
diff
changeset
|
52 GNT_TREE_COLUMN_FIXED_SIZE = 1 << 1, |
18420
e2b8b17fc62c
Allow storing non-string binary data in tree columns.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18419
diff
changeset
|
53 GNT_TREE_COLUMN_BINARY_DATA = 1 << 2, |
18449
ed17f5530300
Allow showing right-aligned text trees. Right-align the size in the file
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18440
diff
changeset
|
54 GNT_TREE_COLUMN_RIGHT_ALIGNED = 1 << 3, |
18404
9a0f99ea664d
Resize tree-columns nicely when the tree is resized. We can tell it to
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18348
diff
changeset
|
55 } GntTreeColumnFlag; |
9a0f99ea664d
Resize tree-columns nicely when the tree is resized. We can tell it to
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18348
diff
changeset
|
56 |
15931
f00f2e283ffb
Some define changes. This helps in generating the python bindings.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15818
diff
changeset
|
57 struct _GntTree |
15818 | 58 { |
59 GntWidget parent; | |
60 | |
61 GntTreeRow *current; /* current selection */ | |
62 | |
63 GntTreeRow *top; /* The topmost visible item */ | |
64 GntTreeRow *bottom; /* The bottommost visible item */ | |
31533
44f53d3fc54f
Remove trailing whitespace
Richard Laager <rlaager@wiktel.com>
parents:
30673
diff
changeset
|
65 |
15818 | 66 GntTreeRow *root; /* The root of all evil */ |
31533
44f53d3fc54f
Remove trailing whitespace
Richard Laager <rlaager@wiktel.com>
parents:
30673
diff
changeset
|
67 |
15818 | 68 GList *list; /* List of GntTreeRow s */ |
69 GHashTable *hash; /* We need this for quickly referencing the rows */ | |
70 guint (*hash_func)(gconstpointer); | |
71 gboolean (*hash_eq_func)(gconstpointer, gconstpointer); | |
72 GDestroyNotify key_destroy; | |
73 GDestroyNotify value_destroy; | |
74 | |
75 int ncol; /* No. of columns */ | |
76 struct _GntTreeColInfo | |
77 { | |
78 int width; | |
79 char *title; | |
18404
9a0f99ea664d
Resize tree-columns nicely when the tree is resized. We can tell it to
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18348
diff
changeset
|
80 int width_ratio; |
9a0f99ea664d
Resize tree-columns nicely when the tree is resized. We can tell it to
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18348
diff
changeset
|
81 GntTreeColumnFlag flags; |
15818 | 82 } *columns; /* Would a GList be better? */ |
83 gboolean show_title; | |
84 gboolean show_separator; /* Whether to show column separators */ | |
85 | |
18534
ffa46a399f3c
Allow setting the search column in a tree to use for typeahead searching.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18531
diff
changeset
|
86 GntTreePriv *priv; |
15818 | 87 }; |
88 | |
15931
f00f2e283ffb
Some define changes. This helps in generating the python bindings.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15818
diff
changeset
|
89 struct _GntTreeClass |
15818 | 90 { |
91 GntWidgetClass parent; | |
92 | |
93 void (*selection_changed)(GntTreeRow *old, GntTreeRow * current); | |
94 void (*toggled)(GntTree *tree, gpointer key); | |
95 | |
96 void (*gnt_reserved1)(void); | |
97 void (*gnt_reserved2)(void); | |
98 void (*gnt_reserved3)(void); | |
99 void (*gnt_reserved4)(void); | |
100 }; | |
101 | |
102 G_BEGIN_DECLS | |
103 | |
17718
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
104 /** |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
105 * @return The GType for GntTree |
17718
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
106 */ |
15818 | 107 GType gnt_tree_get_gtype(void); |
108 | |
17718
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
109 /** |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
110 * Create a tree with one column. |
17718
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
111 * |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
112 * @return The newly created tree |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
113 * |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
114 * @see gnt_tree_new_with_columns |
17718
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
115 */ |
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
116 GntWidget * gnt_tree_new(void); |
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
117 |
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
118 /** |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
119 * Create a tree with a specified number of columns. |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
120 * |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
121 * @param columns Number of columns |
17718
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
122 * |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
123 * @return The newly created tree |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
124 * |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
125 * @see gnt_tree_new |
17718
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
126 */ |
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
127 GntWidget * gnt_tree_new_with_columns(int columns); |
15818 | 128 |
17718
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
129 /** |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
130 * The number of rows the tree should display at a time. |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
131 * |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
132 * @param tree The tree |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
133 * @param rows The number of rows |
17718
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
134 */ |
15818 | 135 void gnt_tree_set_visible_rows(GntTree *tree, int rows); |
136 | |
17718
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
137 /** |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
138 * Get the number visible rows. |
17718
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
139 * |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
140 * @param tree The tree |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
141 * |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
142 * @return The number of visible rows |
17718
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
143 */ |
15818 | 144 int gnt_tree_get_visible_rows(GntTree *tree); |
145 | |
17718
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
146 /** |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
147 * Scroll the contents of the tree. |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
148 * |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
149 * @param tree The tree |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
150 * @param count If positive, the tree will be scrolled down by count rows, |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
151 * otherwise, it will be scrolled up by count rows. |
17718
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
152 */ |
15818 | 153 void gnt_tree_scroll(GntTree *tree, int count); |
154 | |
17718
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
155 /** |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
156 * Insert a row in the tree. |
17718
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
157 * |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
158 * @param tree The tree |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
159 * @param key The key for the row |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
160 * @param row The row to insert |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
161 * @param parent The key for the parent row |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
162 * @param bigbro The key for the row to insert the new row after. |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
163 * |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
164 * @return The inserted row |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
165 * |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
166 * @see gnt_tree_create_row |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
167 * @see gnt_tree_add_row_last |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
168 * @see gnt_tree_add_choice |
17718
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
169 */ |
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
170 GntTreeRow * gnt_tree_add_row_after(GntTree *tree, void *key, GntTreeRow *row, void *parent, void *bigbro); |
15818 | 171 |
17718
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
172 /** |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
173 * Insert a row at the end of the tree. |
17718
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
174 * |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
175 * @param tree The tree |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
176 * @param key The key for the row |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
177 * @param row The row to insert |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
178 * @param parent The key for the parent row |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
179 * |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
180 * @return The inserted row |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
181 * |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
182 * @see gnt_tree_create_row |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
183 * @see gnt_tree_add_row_after |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
184 * @see gnt_tree_add_choice |
17718
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
185 */ |
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
186 GntTreeRow * gnt_tree_add_row_last(GntTree *tree, void *key, GntTreeRow *row, void *parent); |
15818 | 187 |
17718
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
188 /** |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
189 * Get the key for the selected row. |
17718
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
190 * |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
191 * @param tree The tree |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
192 * |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
193 * @return The key for the selected row |
17718
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
194 */ |
15818 | 195 gpointer gnt_tree_get_selection_data(GntTree *tree); |
196 | |
17718
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
197 /** |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
198 * Get the text displayed for the selected row. |
17718
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
199 * |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
200 * @param tree The tree |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
201 * |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
202 * @return The text, which needs to be freed by the caller |
18564
36257cac2b11
Anoter patch from Javeed Shaikh to introduce a utility function for a tree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18563
diff
changeset
|
203 * @see gnt_tree_get_row_text_list |
36257cac2b11
Anoter patch from Javeed Shaikh to introduce a utility function for a tree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18563
diff
changeset
|
204 * @see gnt_tree_get_selection_text_list |
17718
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
205 */ |
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
206 char * gnt_tree_get_selection_text(GntTree *tree); |
15818 | 207 |
17718
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
208 /** |
18564
36257cac2b11
Anoter patch from Javeed Shaikh to introduce a utility function for a tree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18563
diff
changeset
|
209 * Get a list of text for a row. |
36257cac2b11
Anoter patch from Javeed Shaikh to introduce a utility function for a tree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18563
diff
changeset
|
210 * |
36257cac2b11
Anoter patch from Javeed Shaikh to introduce a utility function for a tree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18563
diff
changeset
|
211 * @param tree The tree |
36257cac2b11
Anoter patch from Javeed Shaikh to introduce a utility function for a tree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18563
diff
changeset
|
212 * @param key A key corresponding to the row in question. If key |
36257cac2b11
Anoter patch from Javeed Shaikh to introduce a utility function for a tree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18563
diff
changeset
|
213 * is @c NULL, the text list for the selected row will |
36257cac2b11
Anoter patch from Javeed Shaikh to introduce a utility function for a tree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18563
diff
changeset
|
214 * be returned. |
36257cac2b11
Anoter patch from Javeed Shaikh to introduce a utility function for a tree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18563
diff
changeset
|
215 * |
36257cac2b11
Anoter patch from Javeed Shaikh to introduce a utility function for a tree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18563
diff
changeset
|
216 * @return A list of texts of a row. The list and its data should be |
36257cac2b11
Anoter patch from Javeed Shaikh to introduce a utility function for a tree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18563
diff
changeset
|
217 * freed by the caller. The caller should make sure that if |
36257cac2b11
Anoter patch from Javeed Shaikh to introduce a utility function for a tree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18563
diff
changeset
|
218 * any column of the tree contains binary data, it's not freed. |
31533
44f53d3fc54f
Remove trailing whitespace
Richard Laager <rlaager@wiktel.com>
parents:
30673
diff
changeset
|
219 * @see gnt_tree_get_selection_text_list |
18564
36257cac2b11
Anoter patch from Javeed Shaikh to introduce a utility function for a tree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18563
diff
changeset
|
220 * @see gnt_tree_get_selection_text |
36257cac2b11
Anoter patch from Javeed Shaikh to introduce a utility function for a tree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18563
diff
changeset
|
221 */ |
36257cac2b11
Anoter patch from Javeed Shaikh to introduce a utility function for a tree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18563
diff
changeset
|
222 GList * gnt_tree_get_row_text_list(GntTree *tree, gpointer key); |
36257cac2b11
Anoter patch from Javeed Shaikh to introduce a utility function for a tree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18563
diff
changeset
|
223 |
36257cac2b11
Anoter patch from Javeed Shaikh to introduce a utility function for a tree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18563
diff
changeset
|
224 /** |
30673
e1b511df0d3e
Make the combobox a tiny bit friendlier.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22234
diff
changeset
|
225 * Get the key of a row. |
e1b511df0d3e
Make the combobox a tiny bit friendlier.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22234
diff
changeset
|
226 * |
e1b511df0d3e
Make the combobox a tiny bit friendlier.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22234
diff
changeset
|
227 * @param tree The tree |
e1b511df0d3e
Make the combobox a tiny bit friendlier.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22234
diff
changeset
|
228 * @param row The GntTreeRow object |
e1b511df0d3e
Make the combobox a tiny bit friendlier.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22234
diff
changeset
|
229 * |
e1b511df0d3e
Make the combobox a tiny bit friendlier.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22234
diff
changeset
|
230 * @return The key of the row. |
e1b511df0d3e
Make the combobox a tiny bit friendlier.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22234
diff
changeset
|
231 * @since 2.8.0 (gnt), 2.7.2 (pidgin) |
e1b511df0d3e
Make the combobox a tiny bit friendlier.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22234
diff
changeset
|
232 */ |
e1b511df0d3e
Make the combobox a tiny bit friendlier.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22234
diff
changeset
|
233 gpointer gnt_tree_row_get_key(GntTree *tree, GntTreeRow *row); |
e1b511df0d3e
Make the combobox a tiny bit friendlier.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22234
diff
changeset
|
234 |
e1b511df0d3e
Make the combobox a tiny bit friendlier.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22234
diff
changeset
|
235 /** |
e1b511df0d3e
Make the combobox a tiny bit friendlier.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22234
diff
changeset
|
236 * Get the next row. |
e1b511df0d3e
Make the combobox a tiny bit friendlier.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22234
diff
changeset
|
237 * |
e1b511df0d3e
Make the combobox a tiny bit friendlier.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22234
diff
changeset
|
238 * @param tree The tree |
e1b511df0d3e
Make the combobox a tiny bit friendlier.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22234
diff
changeset
|
239 * @param row The GntTreeRow object |
e1b511df0d3e
Make the combobox a tiny bit friendlier.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22234
diff
changeset
|
240 * |
e1b511df0d3e
Make the combobox a tiny bit friendlier.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22234
diff
changeset
|
241 * @return The next row. |
e1b511df0d3e
Make the combobox a tiny bit friendlier.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22234
diff
changeset
|
242 * @since 2.8.0 (gnt), 2.7.2 (pidgin) |
e1b511df0d3e
Make the combobox a tiny bit friendlier.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22234
diff
changeset
|
243 */ |
e1b511df0d3e
Make the combobox a tiny bit friendlier.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22234
diff
changeset
|
244 GntTreeRow * gnt_tree_row_get_next(GntTree *tree, GntTreeRow *row); |
e1b511df0d3e
Make the combobox a tiny bit friendlier.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22234
diff
changeset
|
245 |
e1b511df0d3e
Make the combobox a tiny bit friendlier.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22234
diff
changeset
|
246 /** |
e1b511df0d3e
Make the combobox a tiny bit friendlier.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22234
diff
changeset
|
247 * Get the previous row. |
e1b511df0d3e
Make the combobox a tiny bit friendlier.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22234
diff
changeset
|
248 * |
e1b511df0d3e
Make the combobox a tiny bit friendlier.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22234
diff
changeset
|
249 * @param tree The tree |
e1b511df0d3e
Make the combobox a tiny bit friendlier.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22234
diff
changeset
|
250 * @param row The GntTreeRow object |
e1b511df0d3e
Make the combobox a tiny bit friendlier.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22234
diff
changeset
|
251 * |
e1b511df0d3e
Make the combobox a tiny bit friendlier.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22234
diff
changeset
|
252 * @return The previous row. |
e1b511df0d3e
Make the combobox a tiny bit friendlier.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22234
diff
changeset
|
253 * @since 2.8.0 (gnt), 2.7.2 (pidgin) |
e1b511df0d3e
Make the combobox a tiny bit friendlier.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22234
diff
changeset
|
254 */ |
e1b511df0d3e
Make the combobox a tiny bit friendlier.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22234
diff
changeset
|
255 GntTreeRow * gnt_tree_row_get_prev(GntTree *tree, GntTreeRow *row); |
e1b511df0d3e
Make the combobox a tiny bit friendlier.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22234
diff
changeset
|
256 |
e1b511df0d3e
Make the combobox a tiny bit friendlier.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22234
diff
changeset
|
257 /** |
e1b511df0d3e
Make the combobox a tiny bit friendlier.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22234
diff
changeset
|
258 * Get the child row. |
e1b511df0d3e
Make the combobox a tiny bit friendlier.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22234
diff
changeset
|
259 * |
e1b511df0d3e
Make the combobox a tiny bit friendlier.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22234
diff
changeset
|
260 * @param tree The tree |
e1b511df0d3e
Make the combobox a tiny bit friendlier.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22234
diff
changeset
|
261 * @param row The GntTreeRow object |
e1b511df0d3e
Make the combobox a tiny bit friendlier.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22234
diff
changeset
|
262 * |
e1b511df0d3e
Make the combobox a tiny bit friendlier.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22234
diff
changeset
|
263 * @return The child row. |
e1b511df0d3e
Make the combobox a tiny bit friendlier.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22234
diff
changeset
|
264 * @since 2.8.0 (gnt), 2.7.2 (pidgin) |
e1b511df0d3e
Make the combobox a tiny bit friendlier.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22234
diff
changeset
|
265 */ |
e1b511df0d3e
Make the combobox a tiny bit friendlier.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22234
diff
changeset
|
266 GntTreeRow * gnt_tree_row_get_child(GntTree *tree, GntTreeRow *row); |
e1b511df0d3e
Make the combobox a tiny bit friendlier.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22234
diff
changeset
|
267 |
e1b511df0d3e
Make the combobox a tiny bit friendlier.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22234
diff
changeset
|
268 /** |
e1b511df0d3e
Make the combobox a tiny bit friendlier.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22234
diff
changeset
|
269 * Get the parent row. |
e1b511df0d3e
Make the combobox a tiny bit friendlier.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22234
diff
changeset
|
270 * |
e1b511df0d3e
Make the combobox a tiny bit friendlier.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22234
diff
changeset
|
271 * @param tree The tree |
e1b511df0d3e
Make the combobox a tiny bit friendlier.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22234
diff
changeset
|
272 * @param row The GntTreeRow object |
e1b511df0d3e
Make the combobox a tiny bit friendlier.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22234
diff
changeset
|
273 * |
e1b511df0d3e
Make the combobox a tiny bit friendlier.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22234
diff
changeset
|
274 * @return The parent row. |
e1b511df0d3e
Make the combobox a tiny bit friendlier.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22234
diff
changeset
|
275 * @since 2.8.0 (gnt), 2.7.2 (pidgin) |
e1b511df0d3e
Make the combobox a tiny bit friendlier.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22234
diff
changeset
|
276 */ |
e1b511df0d3e
Make the combobox a tiny bit friendlier.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22234
diff
changeset
|
277 GntTreeRow * gnt_tree_row_get_parent(GntTree *tree, GntTreeRow *row); |
e1b511df0d3e
Make the combobox a tiny bit friendlier.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22234
diff
changeset
|
278 |
e1b511df0d3e
Make the combobox a tiny bit friendlier.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22234
diff
changeset
|
279 /** |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
280 * Get a list of text of the current row. |
17718
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
281 * |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
282 * @param tree The tree |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
283 * |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
284 * @return A list of texts of the currently selected row. The list |
18564
36257cac2b11
Anoter patch from Javeed Shaikh to introduce a utility function for a tree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18563
diff
changeset
|
285 * and its data should be freed by the caller. The caller |
36257cac2b11
Anoter patch from Javeed Shaikh to introduce a utility function for a tree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18563
diff
changeset
|
286 * should make sure that if any column of the tree contains |
36257cac2b11
Anoter patch from Javeed Shaikh to introduce a utility function for a tree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18563
diff
changeset
|
287 * binary data, it's not freed. |
36257cac2b11
Anoter patch from Javeed Shaikh to introduce a utility function for a tree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18563
diff
changeset
|
288 * @see gnt_tree_get_row_text_list |
36257cac2b11
Anoter patch from Javeed Shaikh to introduce a utility function for a tree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18563
diff
changeset
|
289 * @see gnt_tree_get_selection_text |
17718
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
290 */ |
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
291 GList * gnt_tree_get_selection_text_list(GntTree *tree); |
15818 | 292 |
18118
ab6d2763b8d8
Re-fix the DBus list handling code by killing const GList* / const GSList*
Richard Laager <rlaager@wiktel.com>
parents:
17718
diff
changeset
|
293 /** |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
294 * Returns the list of rows in the tree. |
18118
ab6d2763b8d8
Re-fix the DBus list handling code by killing const GList* / const GSList*
Richard Laager <rlaager@wiktel.com>
parents:
17718
diff
changeset
|
295 * |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
296 * @param tree The tree |
18118
ab6d2763b8d8
Re-fix the DBus list handling code by killing const GList* / const GSList*
Richard Laager <rlaager@wiktel.com>
parents:
17718
diff
changeset
|
297 * |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
298 * @return The list of the rows. The list should not be modified by the caller. |
18118
ab6d2763b8d8
Re-fix the DBus list handling code by killing const GList* / const GSList*
Richard Laager <rlaager@wiktel.com>
parents:
17718
diff
changeset
|
299 */ |
ab6d2763b8d8
Re-fix the DBus list handling code by killing const GList* / const GSList*
Richard Laager <rlaager@wiktel.com>
parents:
17718
diff
changeset
|
300 GList *gnt_tree_get_rows(GntTree *tree); |
15818 | 301 |
17718
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
302 /** |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
303 * Remove a row from the tree. |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
304 * |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
305 * @param tree The tree |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
306 * @param key The key for the row to remove |
17718
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
307 */ |
15818 | 308 void gnt_tree_remove(GntTree *tree, gpointer key); |
309 | |
17718
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
310 /** |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
311 * Remove all the item from the tree. |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
312 * |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
313 * @param tree The tree |
17718
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
314 */ |
15818 | 315 void gnt_tree_remove_all(GntTree *tree); |
316 | |
17718
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
317 /** |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
318 * Get the visible line number of the selected row. |
17718
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
319 * |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
320 * @param tree The tree |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
321 * |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
322 * @return The line number of the currently selected row |
17718
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
323 */ |
15818 | 324 int gnt_tree_get_selection_visible_line(GntTree *tree); |
325 | |
17718
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
326 /** |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
327 * Change the text of a column in a row. |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
328 * |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
329 * @param tree The tree |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
330 * @param key The key for the row |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
331 * @param colno The index of the column |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
332 * @param text The new text |
17718
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
333 */ |
15818 | 334 void gnt_tree_change_text(GntTree *tree, gpointer key, int colno, const char *text); |
335 | |
17718
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
336 /** |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
337 * Add a checkable item in the tree. |
17718
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
338 * |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
339 * @param tree The tree |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
340 * @param key The key for the row |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
341 * @param row The row to add |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
342 * @param parent The parent of the row, or @c NULL |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
343 * @param bigbro The row to insert after, or @c NULL |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
344 * |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
345 * @return The row inserted. |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
346 * |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
347 * @see gnt_tree_create_row |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
348 * @see gnt_tree_create_row_from_list |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
349 * @see gnt_tree_add_row_last |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
350 * @see gnt_tree_add_row_after |
17718
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
351 */ |
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
352 GntTreeRow * gnt_tree_add_choice(GntTree *tree, void *key, GntTreeRow *row, void *parent, void *bigbro); |
15818 | 353 |
17718
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
354 /** |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
355 * Set whether a checkable item is checked or not. |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
356 * |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
357 * @param tree The tree |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
358 * @param key The key for the row |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
359 * @param set @c TRUE if the item should be checked, @c FALSE if not |
17718
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
360 */ |
15818 | 361 void gnt_tree_set_choice(GntTree *tree, void *key, gboolean set); |
362 | |
17718
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
363 /** |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
364 * Return whether a row is selected or not, where the row is a checkable item. |
17718
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
365 * |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
366 * @param tree The tree |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
367 * @param key The key for the row |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
368 * |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
369 * @return @c TRUE if the row is checked, @c FALSE otherwise. |
17718
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
370 */ |
15818 | 371 gboolean gnt_tree_get_choice(GntTree *tree, void *key); |
372 | |
17718
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
373 /** |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
374 * Set flags for the text in a row in the tree. |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
375 * |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
376 * @param tree The tree |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
377 * @param key The key for the row |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
378 * @param flags The flags to set |
17718
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
379 */ |
15818 | 380 void gnt_tree_set_row_flags(GntTree *tree, void *key, GntTextFormatFlags flags); |
381 | |
17718
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
382 /** |
21691
3ed9b027479d
Add support for colour in gnttreerows, and colourise the blist. Fixes #1490
Richard Nelson <wabz@pidgin.im>
parents:
20874
diff
changeset
|
383 * Set color for the text in a row in the tree. |
3ed9b027479d
Add support for colour in gnttreerows, and colourise the blist. Fixes #1490
Richard Nelson <wabz@pidgin.im>
parents:
20874
diff
changeset
|
384 * |
3ed9b027479d
Add support for colour in gnttreerows, and colourise the blist. Fixes #1490
Richard Nelson <wabz@pidgin.im>
parents:
20874
diff
changeset
|
385 * @param tree The tree |
3ed9b027479d
Add support for colour in gnttreerows, and colourise the blist. Fixes #1490
Richard Nelson <wabz@pidgin.im>
parents:
20874
diff
changeset
|
386 * @param key The key for the row |
3ed9b027479d
Add support for colour in gnttreerows, and colourise the blist. Fixes #1490
Richard Nelson <wabz@pidgin.im>
parents:
20874
diff
changeset
|
387 * @param color The color |
21895
39b078ac8a81
Update the changelogs, and the @since doxy-tags for new functions.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
21691
diff
changeset
|
388 * @since 2.4.0 |
21691
3ed9b027479d
Add support for colour in gnttreerows, and colourise the blist. Fixes #1490
Richard Nelson <wabz@pidgin.im>
parents:
20874
diff
changeset
|
389 */ |
22234
f60ce471c174
Fix some minor 'make docs' errors. For some reason the callback
Mark Doliner <mark@kingant.net>
parents:
22170
diff
changeset
|
390 void gnt_tree_set_row_color(GntTree *tree, void *key, int color); |
21691
3ed9b027479d
Add support for colour in gnttreerows, and colourise the blist. Fixes #1490
Richard Nelson <wabz@pidgin.im>
parents:
20874
diff
changeset
|
391 |
3ed9b027479d
Add support for colour in gnttreerows, and colourise the blist. Fixes #1490
Richard Nelson <wabz@pidgin.im>
parents:
20874
diff
changeset
|
392 /** |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
393 * Select a row. |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
394 * |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
395 * @param tree The tree |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
396 * @param key The key of the row to select |
17718
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
397 */ |
15818 | 398 void gnt_tree_set_selected(GntTree *tree , void *key); |
399 | |
17718
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
400 /** |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
401 * Create a row to insert in the tree. |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
402 * |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
403 * @param tree The tree |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
404 * @param ... A string for each column in the tree |
17718
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
405 * |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
406 * @return The row |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
407 * |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
408 * @see gnt_tree_create_row_from_list |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
409 * @see gnt_tree_add_row_after |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
410 * @see gnt_tree_add_row_last |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
411 * @see gnt_tree_add_choice |
17718
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
412 */ |
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
413 GntTreeRow * gnt_tree_create_row(GntTree *tree, ...); |
15818 | 414 |
17718
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
415 /** |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
416 * Create a row from a list of text. |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
417 * |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
418 * @param tree The tree |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
419 * @param list The list containing the text for each column |
17718
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
420 * |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
421 * @return The row |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
422 * |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
423 * @see gnt_tree_create_row |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
424 * @see gnt_tree_add_row_after |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
425 * @see gnt_tree_add_row_last |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
426 * @see gnt_tree_add_choice |
17718
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
427 */ |
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
428 GntTreeRow * gnt_tree_create_row_from_list(GntTree *tree, GList *list); |
15818 | 429 |
17718
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
430 /** |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
431 * Set the width of a column in the tree. |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
432 * |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
433 * @param tree The tree |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
434 * @param col The index of the column |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
435 * @param width The width for the column |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
436 * |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
437 * @see gnt_tree_set_column_width_ratio |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
438 * @see gnt_tree_set_column_resizable |
17718
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
439 */ |
15818 | 440 void gnt_tree_set_col_width(GntTree *tree, int col, int width); |
441 | |
17718
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
442 /** |
18348
1f9db757efc2
Oops. I missed this. This allows setting tree-column titles one by one.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18303
diff
changeset
|
443 * Set the title for a column. |
1f9db757efc2
Oops. I missed this. This allows setting tree-column titles one by one.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18303
diff
changeset
|
444 * |
1f9db757efc2
Oops. I missed this. This allows setting tree-column titles one by one.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18303
diff
changeset
|
445 * @param tree The tree |
1f9db757efc2
Oops. I missed this. This allows setting tree-column titles one by one.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18303
diff
changeset
|
446 * @param index The index of the column |
1f9db757efc2
Oops. I missed this. This allows setting tree-column titles one by one.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18303
diff
changeset
|
447 * @param title The title for the column |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
448 * |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
449 * @see gnt_tree_set_column_titles |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
450 * @see gnt_tree_set_show_title |
20874
acf284962b40
Add @since doxygen tags for finch/libgnt.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
19680
diff
changeset
|
451 * |
acf284962b40
Add @since doxygen tags for finch/libgnt.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
19680
diff
changeset
|
452 * @since 2.0.0 (gnt), 2.1.0 (pidgin) |
18348
1f9db757efc2
Oops. I missed this. This allows setting tree-column titles one by one.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18303
diff
changeset
|
453 */ |
1f9db757efc2
Oops. I missed this. This allows setting tree-column titles one by one.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18303
diff
changeset
|
454 void gnt_tree_set_column_title(GntTree *tree, int index, const char *title); |
1f9db757efc2
Oops. I missed this. This allows setting tree-column titles one by one.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18303
diff
changeset
|
455 |
1f9db757efc2
Oops. I missed this. This allows setting tree-column titles one by one.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18303
diff
changeset
|
456 /** |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
457 * Set the titles of the columns |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
458 * |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
459 * @param tree The tree |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
460 * @param ... One title for each column in the tree |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
461 * |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
462 * @see gnt_tree_set_column_title |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
463 * @see gnt_tree_set_show_title |
17718
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
464 */ |
15818 | 465 void gnt_tree_set_column_titles(GntTree *tree, ...); |
466 | |
17718
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
467 /** |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
468 * Set whether to display the title of the columns. |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
469 * |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
470 * @param tree The tree |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
471 * @param set If @c TRUE, the column titles are displayed |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
472 * |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
473 * @see gnt_tree_set_column_title |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
474 * @see gnt_tree_set_column_titles |
17718
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
475 */ |
15818 | 476 void gnt_tree_set_show_title(GntTree *tree, gboolean set); |
477 | |
17718
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
478 /** |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
479 * Set the compare function for sorting the data. |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
480 * |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
481 * @param tree The tree |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
482 * @param func The comparison function, which is used to compare |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
483 * the keys |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
484 * |
31533
44f53d3fc54f
Remove trailing whitespace
Richard Laager <rlaager@wiktel.com>
parents:
30673
diff
changeset
|
485 * @see gnt_tree_sort_row |
17718
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
486 */ |
15818 | 487 void gnt_tree_set_compare_func(GntTree *tree, GCompareFunc func); |
488 | |
17718
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
489 /** |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
490 * Set whether a row, which has child rows, should be expanded. |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
491 * |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
492 * @param tree The tree |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
493 * @param key The key of the row |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
494 * @param expanded Whether to expand the child rows |
17718
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
495 */ |
15818 | 496 void gnt_tree_set_expanded(GntTree *tree, void *key, gboolean expanded); |
497 | |
17718
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
498 /** |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
499 * Set whether to show column separators. |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
500 * |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
501 * @param tree The tree |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
502 * @param set If @c TRUE, the column separators are displayed |
17718
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
503 */ |
15818 | 504 void gnt_tree_set_show_separator(GntTree *tree, gboolean set); |
505 | |
17718
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
506 /** |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
507 * Sort a row in the tree. |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
508 * |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
509 * @param tree The tree |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
510 * @param row The row to sort |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
511 * |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
512 * @see gnt_tree_set_compare_func |
17718
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
513 */ |
15818 | 514 void gnt_tree_sort_row(GntTree *tree, void *row); |
515 | |
17718
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
516 /** |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
517 * Automatically adjust the width of the columns in the tree. |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
518 * |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
519 * @param tree The tree |
17718
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
520 */ |
15818 | 521 void gnt_tree_adjust_columns(GntTree *tree); |
522 | |
17718
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
523 /** |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
524 * Set the hash functions to use to hash, compare and free the keys. |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
525 * |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
526 * @param tree The tree |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
527 * @param hash The hashing function |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
528 * @param eq The function to compare keys |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
529 * @param kd The function to use to free the keys when a row is removed |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
530 * from the tree |
17718
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
531 */ |
15818 | 532 void gnt_tree_set_hash_fns(GntTree *tree, gpointer hash, gpointer eq, gpointer kd); |
533 | |
17718
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
534 /** |
18404
9a0f99ea664d
Resize tree-columns nicely when the tree is resized. We can tell it to
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18348
diff
changeset
|
535 * Set whether a column is visible or not. |
9a0f99ea664d
Resize tree-columns nicely when the tree is resized. We can tell it to
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18348
diff
changeset
|
536 * This can be useful when, for example, we want to store some data |
9a0f99ea664d
Resize tree-columns nicely when the tree is resized. We can tell it to
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18348
diff
changeset
|
537 * which we don't want/need to display. |
31533
44f53d3fc54f
Remove trailing whitespace
Richard Laager <rlaager@wiktel.com>
parents:
30673
diff
changeset
|
538 * |
18404
9a0f99ea664d
Resize tree-columns nicely when the tree is resized. We can tell it to
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18348
diff
changeset
|
539 * @param tree The tree |
9a0f99ea664d
Resize tree-columns nicely when the tree is resized. We can tell it to
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18348
diff
changeset
|
540 * @param col The index of the column |
9a0f99ea664d
Resize tree-columns nicely when the tree is resized. We can tell it to
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18348
diff
changeset
|
541 * @param vis If @c FALSE, the column will not be displayed |
17718
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15970
diff
changeset
|
542 */ |
15970
790d1d003825
Allow making some columns invisible.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15931
diff
changeset
|
543 void gnt_tree_set_column_visible(GntTree *tree, int col, gboolean vis); |
790d1d003825
Allow making some columns invisible.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15931
diff
changeset
|
544 |
18404
9a0f99ea664d
Resize tree-columns nicely when the tree is resized. We can tell it to
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18348
diff
changeset
|
545 /** |
9a0f99ea664d
Resize tree-columns nicely when the tree is resized. We can tell it to
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18348
diff
changeset
|
546 * Set whether a column can be resized to keep the same ratio when the |
9a0f99ea664d
Resize tree-columns nicely when the tree is resized. We can tell it to
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18348
diff
changeset
|
547 * tree is resized. |
31533
44f53d3fc54f
Remove trailing whitespace
Richard Laager <rlaager@wiktel.com>
parents:
30673
diff
changeset
|
548 * |
18404
9a0f99ea664d
Resize tree-columns nicely when the tree is resized. We can tell it to
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18348
diff
changeset
|
549 * @param tree The tree |
9a0f99ea664d
Resize tree-columns nicely when the tree is resized. We can tell it to
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18348
diff
changeset
|
550 * @param col The index of the column |
9a0f99ea664d
Resize tree-columns nicely when the tree is resized. We can tell it to
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18348
diff
changeset
|
551 * @param res If @c FALSE, the column will not be resized when the |
9a0f99ea664d
Resize tree-columns nicely when the tree is resized. We can tell it to
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18348
diff
changeset
|
552 * tree is resized |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
553 * |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
554 * @see gnt_tree_set_col_width |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
555 * @see gnt_tree_set_column_width_ratio |
20874
acf284962b40
Add @since doxygen tags for finch/libgnt.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
19680
diff
changeset
|
556 * |
acf284962b40
Add @since doxygen tags for finch/libgnt.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
19680
diff
changeset
|
557 * @since 2.0.0 (gnt), 2.1.0 (pidgin) |
18404
9a0f99ea664d
Resize tree-columns nicely when the tree is resized. We can tell it to
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18348
diff
changeset
|
558 */ |
9a0f99ea664d
Resize tree-columns nicely when the tree is resized. We can tell it to
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18348
diff
changeset
|
559 void gnt_tree_set_column_resizable(GntTree *tree, int col, gboolean res); |
9a0f99ea664d
Resize tree-columns nicely when the tree is resized. We can tell it to
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18348
diff
changeset
|
560 |
9a0f99ea664d
Resize tree-columns nicely when the tree is resized. We can tell it to
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18348
diff
changeset
|
561 /** |
18420
e2b8b17fc62c
Allow storing non-string binary data in tree columns.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18419
diff
changeset
|
562 * Set whether data in a column should be considered as binary data, and |
e2b8b17fc62c
Allow storing non-string binary data in tree columns.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18419
diff
changeset
|
563 * not as strings. A column containing binary data will be display empty text. |
e2b8b17fc62c
Allow storing non-string binary data in tree columns.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18419
diff
changeset
|
564 * |
e2b8b17fc62c
Allow storing non-string binary data in tree columns.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18419
diff
changeset
|
565 * @param tree The tree |
e2b8b17fc62c
Allow storing non-string binary data in tree columns.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18419
diff
changeset
|
566 * @param col The index of the column |
e2b8b17fc62c
Allow storing non-string binary data in tree columns.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18419
diff
changeset
|
567 * @param bin @c TRUE if the data for the column is binary |
e2b8b17fc62c
Allow storing non-string binary data in tree columns.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18419
diff
changeset
|
568 */ |
e2b8b17fc62c
Allow storing non-string binary data in tree columns.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18419
diff
changeset
|
569 void gnt_tree_set_column_is_binary(GntTree *tree, int col, gboolean bin); |
e2b8b17fc62c
Allow storing non-string binary data in tree columns.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18419
diff
changeset
|
570 |
e2b8b17fc62c
Allow storing non-string binary data in tree columns.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18419
diff
changeset
|
571 /** |
18449
ed17f5530300
Allow showing right-aligned text trees. Right-align the size in the file
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18440
diff
changeset
|
572 * Set whether text in a column should be right-aligned. |
ed17f5530300
Allow showing right-aligned text trees. Right-align the size in the file
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18440
diff
changeset
|
573 * |
ed17f5530300
Allow showing right-aligned text trees. Right-align the size in the file
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18440
diff
changeset
|
574 * @param tree The tree |
ed17f5530300
Allow showing right-aligned text trees. Right-align the size in the file
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18440
diff
changeset
|
575 * @param col The index of the column |
ed17f5530300
Allow showing right-aligned text trees. Right-align the size in the file
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18440
diff
changeset
|
576 * @param right @c TRUE if the text in the column should be right aligned |
20874
acf284962b40
Add @since doxygen tags for finch/libgnt.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
19680
diff
changeset
|
577 * |
acf284962b40
Add @since doxygen tags for finch/libgnt.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
19680
diff
changeset
|
578 * @since 2.0.0 (gnt), 2.1.0 (pidgin) |
18449
ed17f5530300
Allow showing right-aligned text trees. Right-align the size in the file
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18440
diff
changeset
|
579 */ |
ed17f5530300
Allow showing right-aligned text trees. Right-align the size in the file
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18440
diff
changeset
|
580 void gnt_tree_set_column_is_right_aligned(GntTree *tree, int col, gboolean right); |
ed17f5530300
Allow showing right-aligned text trees. Right-align the size in the file
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18440
diff
changeset
|
581 |
ed17f5530300
Allow showing right-aligned text trees. Right-align the size in the file
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18440
diff
changeset
|
582 /** |
18404
9a0f99ea664d
Resize tree-columns nicely when the tree is resized. We can tell it to
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18348
diff
changeset
|
583 * Set column widths to use when calculating column widths after a tree |
9a0f99ea664d
Resize tree-columns nicely when the tree is resized. We can tell it to
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18348
diff
changeset
|
584 * is resized. |
9a0f99ea664d
Resize tree-columns nicely when the tree is resized. We can tell it to
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18348
diff
changeset
|
585 * |
9a0f99ea664d
Resize tree-columns nicely when the tree is resized. We can tell it to
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18348
diff
changeset
|
586 * @param tree The tree |
9a0f99ea664d
Resize tree-columns nicely when the tree is resized. We can tell it to
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18348
diff
changeset
|
587 * @param cols Array of widths. The width must have the same number |
9a0f99ea664d
Resize tree-columns nicely when the tree is resized. We can tell it to
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18348
diff
changeset
|
588 * of entries as the number of columns in the tree, or |
9a0f99ea664d
Resize tree-columns nicely when the tree is resized. We can tell it to
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18348
diff
changeset
|
589 * end with a negative value for a column-width. |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
590 * |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
591 * @see gnt_tree_set_col_width |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
592 * @see gnt_tree_set_column_resizable |
20874
acf284962b40
Add @since doxygen tags for finch/libgnt.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
19680
diff
changeset
|
593 * |
acf284962b40
Add @since doxygen tags for finch/libgnt.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
19680
diff
changeset
|
594 * @since 2.0.0 (gnt), 2.1.0 (pidgin) |
18404
9a0f99ea664d
Resize tree-columns nicely when the tree is resized. We can tell it to
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18348
diff
changeset
|
595 */ |
9a0f99ea664d
Resize tree-columns nicely when the tree is resized. We can tell it to
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18348
diff
changeset
|
596 void gnt_tree_set_column_width_ratio(GntTree *tree, int cols[]); |
9a0f99ea664d
Resize tree-columns nicely when the tree is resized. We can tell it to
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18348
diff
changeset
|
597 |
18534
ffa46a399f3c
Allow setting the search column in a tree to use for typeahead searching.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18531
diff
changeset
|
598 /** |
ffa46a399f3c
Allow setting the search column in a tree to use for typeahead searching.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18531
diff
changeset
|
599 * Set the column to use for typeahead searching. |
ffa46a399f3c
Allow setting the search column in a tree to use for typeahead searching.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18531
diff
changeset
|
600 * |
ffa46a399f3c
Allow setting the search column in a tree to use for typeahead searching.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18531
diff
changeset
|
601 * @param tree The tree |
ffa46a399f3c
Allow setting the search column in a tree to use for typeahead searching.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18531
diff
changeset
|
602 * @param col The index of the column |
20874
acf284962b40
Add @since doxygen tags for finch/libgnt.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
19680
diff
changeset
|
603 * |
acf284962b40
Add @since doxygen tags for finch/libgnt.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
19680
diff
changeset
|
604 * @since 2.0.0 (gnt), 2.1.0 (pidgin) |
18534
ffa46a399f3c
Allow setting the search column in a tree to use for typeahead searching.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18531
diff
changeset
|
605 */ |
ffa46a399f3c
Allow setting the search column in a tree to use for typeahead searching.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18531
diff
changeset
|
606 void gnt_tree_set_search_column(GntTree *tree, int col); |
ffa46a399f3c
Allow setting the search column in a tree to use for typeahead searching.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18531
diff
changeset
|
607 |
18535
fad459189cc5
New feature: successful compilation.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18534
diff
changeset
|
608 /** |
fad459189cc5
New feature: successful compilation.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18534
diff
changeset
|
609 * Check whether the user is currently in the middle of a search. |
fad459189cc5
New feature: successful compilation.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18534
diff
changeset
|
610 * |
fad459189cc5
New feature: successful compilation.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18534
diff
changeset
|
611 * @param tree The tree |
fad459189cc5
New feature: successful compilation.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18534
diff
changeset
|
612 * @return @c TRUE if the user is searching, @c FALSE otherwise. |
20874
acf284962b40
Add @since doxygen tags for finch/libgnt.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
19680
diff
changeset
|
613 * |
acf284962b40
Add @since doxygen tags for finch/libgnt.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
19680
diff
changeset
|
614 * @since 2.0.0 (gnt), 2.1.0 (pidgin) |
18535
fad459189cc5
New feature: successful compilation.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18534
diff
changeset
|
615 */ |
fad459189cc5
New feature: successful compilation.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18534
diff
changeset
|
616 gboolean gnt_tree_is_searching(GntTree *tree); |
fad459189cc5
New feature: successful compilation.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18534
diff
changeset
|
617 |
18557
212c2bec5c97
Allow using custom search functions.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18548
diff
changeset
|
618 /** |
212c2bec5c97
Allow using custom search functions.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18548
diff
changeset
|
619 * Set a custom search function. |
212c2bec5c97
Allow using custom search functions.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18548
diff
changeset
|
620 * |
212c2bec5c97
Allow using custom search functions.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18548
diff
changeset
|
621 * @param tree The tree |
18563
dba4edbde4a7
Patch from Javeed Shaikh to make the search function non-braindamaged.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18557
diff
changeset
|
622 * @param func The custom search function. The search function is |
dba4edbde4a7
Patch from Javeed Shaikh to make the search function non-braindamaged.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18557
diff
changeset
|
623 * sent the tree itself, the key of a row, the search |
dba4edbde4a7
Patch from Javeed Shaikh to make the search function non-braindamaged.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18557
diff
changeset
|
624 * string and the content of row in the search column. |
dba4edbde4a7
Patch from Javeed Shaikh to make the search function non-braindamaged.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18557
diff
changeset
|
625 * If the function returns @c TRUE, the row is dislayed, |
dba4edbde4a7
Patch from Javeed Shaikh to make the search function non-braindamaged.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18557
diff
changeset
|
626 * otherwise it's not. |
20874
acf284962b40
Add @since doxygen tags for finch/libgnt.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
19680
diff
changeset
|
627 * |
acf284962b40
Add @since doxygen tags for finch/libgnt.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
19680
diff
changeset
|
628 * @since 2.0.0 (gnt), 2.1.0 (pidgin) |
18557
212c2bec5c97
Allow using custom search functions.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18548
diff
changeset
|
629 */ |
212c2bec5c97
Allow using custom search functions.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18548
diff
changeset
|
630 void gnt_tree_set_search_function(GntTree *tree, |
18563
dba4edbde4a7
Patch from Javeed Shaikh to make the search function non-braindamaged.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18557
diff
changeset
|
631 gboolean (*func)(GntTree *tree, gpointer key, const char *search, const char *current)); |
18557
212c2bec5c97
Allow using custom search functions.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18548
diff
changeset
|
632 |
22170
364e67f1a429
Function to get the parent key.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
21895
diff
changeset
|
633 /** |
364e67f1a429
Function to get the parent key.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
21895
diff
changeset
|
634 * Get the parent key for a row. |
364e67f1a429
Function to get the parent key.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
21895
diff
changeset
|
635 * |
364e67f1a429
Function to get the parent key.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
21895
diff
changeset
|
636 * @param tree The tree |
364e67f1a429
Function to get the parent key.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
21895
diff
changeset
|
637 * @param key The key for the row. |
364e67f1a429
Function to get the parent key.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
21895
diff
changeset
|
638 * |
364e67f1a429
Function to get the parent key.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
21895
diff
changeset
|
639 * @return The key of the parent row. |
364e67f1a429
Function to get the parent key.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
21895
diff
changeset
|
640 * @since 2.4.0 |
364e67f1a429
Function to get the parent key.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
21895
diff
changeset
|
641 */ |
364e67f1a429
Function to get the parent key.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
21895
diff
changeset
|
642 gpointer gnt_tree_get_parent_key(GntTree *tree, gpointer key); |
364e67f1a429
Function to get the parent key.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
21895
diff
changeset
|
643 |
15818 | 644 G_END_DECLS |
645 | |
646 #endif /* GNT_TREE_H */ |