Mercurial > pidgin
annotate finch/libgnt/gnttree.h @ 18684:5c1ed6296b56
propagate from branch 'im.pidgin.pidgin' (head b195e262642015df66e36d33e9dd16ecae5df9d5)
to branch 'im.pidgin.soc.2007.xmpp' (head 06f9dbd73b69e26dc9f56873a9ce106146bb1b18)
author | Andreas Monitzer <pidgin@monitzer.com> |
---|---|
date | Wed, 11 Jul 2007 22:27:44 +0000 |
parents | ed17f5530300 |
children | da550279d390 |
rev | line source |
---|---|
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
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 /* |
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
6 * GNT - The GLib Ncurses Toolkit |
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
7 * |
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
8 * GNT is the legal property of its developers, whose names are too numerous |
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
9 * to list here. Please refer to the COPYRIGHT file distributed with this |
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
10 * source distribution. |
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
11 * |
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
12 * This library is free software; you can redistribute it and/or modify |
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
13 * it under the terms of the GNU General Public License as published by |
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
14 * the Free Software Foundation; either version 2 of the License, or |
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
15 * (at your option) any later version. |
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
16 * |
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
17 * This program is distributed in the hope that it will be useful, |
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
20 * GNU General Public License for more details. |
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
21 * |
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
22 * You should have received a copy of the GNU General Public License |
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
23 * along with this program; if not, write to the Free Software |
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
24 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
25 */ |
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
26 |
15817 | 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 | |
15928
f00f2e283ffb
Some define changes. This helps in generating the python bindings.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15817
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:
15817
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:
15817
diff
changeset
|
45 typedef struct _GntTreeClass GntTreeClass; |
15817 | 46 |
15928
f00f2e283ffb
Some define changes. This helps in generating the python bindings.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15817
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:
15817
diff
changeset
|
48 typedef struct _GntTreeCol GntTreeCol; |
15817 | 49 |
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
|
50 typedef enum { |
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 |
15928
f00f2e283ffb
Some define changes. This helps in generating the python bindings.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15817
diff
changeset
|
57 struct _GntTree |
15817 | 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 */ | |
65 | |
66 GntTreeRow *root; /* The root of all evil */ | |
67 | |
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; |
15817 | 82 } *columns; /* Would a GList be better? */ |
83 gboolean show_title; | |
84 gboolean show_separator; /* Whether to show column separators */ | |
85 | |
86 GString *search; | |
87 int search_timeout; | |
88 | |
89 GCompareFunc compare; | |
18440
be10fc22d649
Allow trigger keys for menuitems.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18420
diff
changeset
|
90 int lastvisible; |
15817 | 91 }; |
92 | |
15928
f00f2e283ffb
Some define changes. This helps in generating the python bindings.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15817
diff
changeset
|
93 struct _GntTreeClass |
15817 | 94 { |
95 GntWidgetClass parent; | |
96 | |
97 void (*selection_changed)(GntTreeRow *old, GntTreeRow * current); | |
98 void (*toggled)(GntTree *tree, gpointer key); | |
99 | |
100 void (*gnt_reserved1)(void); | |
101 void (*gnt_reserved2)(void); | |
102 void (*gnt_reserved3)(void); | |
103 void (*gnt_reserved4)(void); | |
104 }; | |
105 | |
106 G_BEGIN_DECLS | |
107 | |
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
108 /** |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
109 * @return The GType for GntTree |
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
110 */ |
15817 | 111 GType gnt_tree_get_gtype(void); |
112 | |
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
113 /** |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
114 * Create a tree with one column. |
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
115 * |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
116 * @return The newly created tree |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
117 * |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
118 * @see gnt_tree_new_with_columns |
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
119 */ |
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
120 GntWidget * gnt_tree_new(void); |
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
121 |
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
122 /** |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
123 * Create a tree with a specified number of columns. |
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 * @param columns Number of columns |
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
126 * |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
127 * @return The newly created tree |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
128 * |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
129 * @see gnt_tree_new |
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
130 */ |
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
131 GntWidget * gnt_tree_new_with_columns(int columns); |
15817 | 132 |
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
133 /** |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
134 * 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
|
135 * |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
136 * @param tree The tree |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
137 * @param rows The number of rows |
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
138 */ |
15817 | 139 void gnt_tree_set_visible_rows(GntTree *tree, int rows); |
140 | |
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
141 /** |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
142 * Get the number visible rows. |
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
143 * |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
144 * @param tree The tree |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
145 * |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
146 * @return The number of visible rows |
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
147 */ |
15817 | 148 int gnt_tree_get_visible_rows(GntTree *tree); |
149 | |
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
150 /** |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
151 * Scroll the contents of the tree. |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
152 * |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
153 * @param tree The tree |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
154 * @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
|
155 * otherwise, it will be scrolled up by count rows. |
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
156 */ |
15817 | 157 void gnt_tree_scroll(GntTree *tree, int count); |
158 | |
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
159 /** |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
160 * Insert a row in the tree. |
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
161 * |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
162 * @param tree The tree |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
163 * @param key The key for the row |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
164 * @param row The row to insert |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
165 * @param parent The key for the parent row |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
166 * @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
|
167 * |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
168 * @return The inserted row |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
169 * |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
170 * @see gnt_tree_create_row |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
171 * @see gnt_tree_add_row_last |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
172 * @see gnt_tree_add_choice |
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
173 */ |
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
174 GntTreeRow * gnt_tree_add_row_after(GntTree *tree, void *key, GntTreeRow *row, void *parent, void *bigbro); |
15817 | 175 |
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
176 /** |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
177 * Insert a row at the end of the tree. |
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
178 * |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
179 * @param tree The tree |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
180 * @param key The key for the row |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
181 * @param row The row to insert |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
182 * @param parent The key for the parent row |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
183 * |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
184 * @return The inserted row |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
185 * |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
186 * @see gnt_tree_create_row |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
187 * @see gnt_tree_add_row_after |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
188 * @see gnt_tree_add_choice |
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
189 */ |
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
190 GntTreeRow * gnt_tree_add_row_last(GntTree *tree, void *key, GntTreeRow *row, void *parent); |
15817 | 191 |
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
192 /** |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
193 * Get the key for the selected row. |
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
194 * |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
195 * @param tree The tree |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
196 * |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
197 * @return The key for the selected row |
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
198 */ |
15817 | 199 gpointer gnt_tree_get_selection_data(GntTree *tree); |
200 | |
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
201 /** |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
202 * Get the text displayed for the selected row. |
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
203 * |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
204 * @param tree The tree |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
205 * |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
206 * @return The text, which needs to be freed by the caller |
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
207 */ |
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
208 char * gnt_tree_get_selection_text(GntTree *tree); |
15817 | 209 |
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
210 /** |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
211 * Get a list of text of the current row. |
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
212 * |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
213 * @param tree The tree |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
214 * |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
215 * @return A list of texts of the currently selected row. The list |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
216 * and its data should be freed by the caller. |
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
217 */ |
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
218 GList * gnt_tree_get_selection_text_list(GntTree *tree); |
15817 | 219 |
18118
ab6d2763b8d8
Re-fix the DBus list handling code by killing const GList* / const GSList*
Richard Laager <rlaager@wiktel.com>
parents:
18049
diff
changeset
|
220 /** |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
221 * 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:
18049
diff
changeset
|
222 * |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
223 * @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:
18049
diff
changeset
|
224 * |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
225 * @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:
18049
diff
changeset
|
226 */ |
ab6d2763b8d8
Re-fix the DBus list handling code by killing const GList* / const GSList*
Richard Laager <rlaager@wiktel.com>
parents:
18049
diff
changeset
|
227 GList *gnt_tree_get_rows(GntTree *tree); |
15817 | 228 |
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
229 /** |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
230 * Remove a row from the tree. |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
231 * |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
232 * @param tree The tree |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
233 * @param key The key for the row to remove |
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
234 */ |
15817 | 235 void gnt_tree_remove(GntTree *tree, gpointer key); |
236 | |
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
237 /** |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
238 * Remove all the item from the tree. |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
239 * |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
240 * @param tree The tree |
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
241 */ |
15817 | 242 void gnt_tree_remove_all(GntTree *tree); |
243 | |
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
244 /** |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
245 * Get the visible line number of the selected row. |
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
246 * |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
247 * @param tree The tree |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
248 * |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
249 * @return The line number of the currently selected row |
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
250 */ |
15817 | 251 int gnt_tree_get_selection_visible_line(GntTree *tree); |
252 | |
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
253 /** |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
254 * Change the text of a column in a row. |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
255 * |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
256 * @param tree The tree |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
257 * @param key The key for the row |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
258 * @param colno The index of the column |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
259 * @param text The new text |
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
260 */ |
15817 | 261 void gnt_tree_change_text(GntTree *tree, gpointer key, int colno, const char *text); |
262 | |
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
263 /** |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
264 * Add a checkable item in the tree. |
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
265 * |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
266 * @param tree The tree |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
267 * @param key The key for the row |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
268 * @param row The row to add |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
269 * @param parent The parent of the row, or @c NULL |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
270 * @param bigbro The row to insert after, or @c NULL |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
271 * |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
272 * @return The row inserted. |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
273 * |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
274 * @see gnt_tree_create_row |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
275 * @see gnt_tree_create_row_from_list |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
276 * @see gnt_tree_add_row_last |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
277 * @see gnt_tree_add_row_after |
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
278 */ |
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
279 GntTreeRow * gnt_tree_add_choice(GntTree *tree, void *key, GntTreeRow *row, void *parent, void *bigbro); |
15817 | 280 |
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
281 /** |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
282 * Set whether a checkable item is checked or not. |
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 * @param tree The tree |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
285 * @param key The key for the row |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
286 * @param set @c TRUE if the item should be checked, @c FALSE if not |
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
287 */ |
15817 | 288 void gnt_tree_set_choice(GntTree *tree, void *key, gboolean set); |
289 | |
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
290 /** |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
291 * Return whether a row is selected or not, where the row is a checkable item. |
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
292 * |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
293 * @param tree The tree |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
294 * @param key The key for the row |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
295 * |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
296 * @return @c TRUE if the row is checked, @c FALSE otherwise. |
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
297 */ |
15817 | 298 gboolean gnt_tree_get_choice(GntTree *tree, void *key); |
299 | |
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
300 /** |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
301 * 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
|
302 * |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
303 * @param tree The tree |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
304 * @param key The key for the row |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
305 * @param flags The flags to set |
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
306 */ |
15817 | 307 void gnt_tree_set_row_flags(GntTree *tree, void *key, GntTextFormatFlags flags); |
308 | |
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
309 /** |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
310 * Select a row. |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
311 * |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
312 * @param tree The tree |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
313 * @param key The key of the row to select |
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
314 */ |
15817 | 315 void gnt_tree_set_selected(GntTree *tree , void *key); |
316 | |
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
317 /** |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
318 * Create a row to insert in the tree. |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
319 * |
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 * @param ... A string for each column in the tree |
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
322 * |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
323 * @return The row |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
324 * |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
325 * @see gnt_tree_create_row_from_list |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
326 * @see gnt_tree_add_row_after |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
327 * @see gnt_tree_add_row_last |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
328 * @see gnt_tree_add_choice |
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
329 */ |
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
330 GntTreeRow * gnt_tree_create_row(GntTree *tree, ...); |
15817 | 331 |
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
332 /** |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
333 * Create a row from a list of text. |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
334 * |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
335 * @param tree The tree |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
336 * @param list The list containing the text for each column |
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
337 * |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
338 * @return The row |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
339 * |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
340 * @see gnt_tree_create_row |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
341 * @see gnt_tree_add_row_after |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
342 * @see gnt_tree_add_row_last |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
343 * @see gnt_tree_add_choice |
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
344 */ |
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
345 GntTreeRow * gnt_tree_create_row_from_list(GntTree *tree, GList *list); |
15817 | 346 |
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
347 /** |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
348 * Set the width of a column in the tree. |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
349 * |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
350 * @param tree The tree |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
351 * @param col The index of the column |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
352 * @param width The width for the column |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
353 * |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
354 * @see gnt_tree_set_column_width_ratio |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
355 * @see gnt_tree_set_column_resizable |
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
356 */ |
15817 | 357 void gnt_tree_set_col_width(GntTree *tree, int col, int width); |
358 | |
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
359 /** |
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
|
360 * 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
|
361 * |
1f9db757efc2
Oops. I missed this. This allows setting tree-column titles one by one.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18303
diff
changeset
|
362 * @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
|
363 * @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
|
364 * @param title The title for the column |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
365 * |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
366 * @see gnt_tree_set_column_titles |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
367 * @see gnt_tree_set_show_title |
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
|
368 */ |
1f9db757efc2
Oops. I missed this. This allows setting tree-column titles one by one.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18303
diff
changeset
|
369 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
|
370 |
1f9db757efc2
Oops. I missed this. This allows setting tree-column titles one by one.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18303
diff
changeset
|
371 /** |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
372 * Set the titles of the columns |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
373 * |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
374 * @param tree The tree |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
375 * @param ... One title for each column in the tree |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
376 * |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
377 * @see gnt_tree_set_column_title |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
378 * @see gnt_tree_set_show_title |
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
379 */ |
15817 | 380 void gnt_tree_set_column_titles(GntTree *tree, ...); |
381 | |
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
382 /** |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
383 * Set whether to display the title of the columns. |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
384 * |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
385 * @param tree The tree |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
386 * @param set If @c TRUE, the column titles are displayed |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
387 * |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
388 * @see gnt_tree_set_column_title |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
389 * @see gnt_tree_set_column_titles |
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
390 */ |
15817 | 391 void gnt_tree_set_show_title(GntTree *tree, gboolean set); |
392 | |
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
393 /** |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
394 * Set the compare function for sorting the data. |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
395 * |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
396 * @param tree The tree |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
397 * @param func The comparison function, which is used to compare |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
398 * the keys |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
399 * |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
400 * @see gnt_tree_sort_row |
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
401 */ |
15817 | 402 void gnt_tree_set_compare_func(GntTree *tree, GCompareFunc func); |
403 | |
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
404 /** |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
405 * 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
|
406 * |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
407 * @param tree The tree |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
408 * @param key The key of the row |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
409 * @param expanded Whether to expand the child rows |
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
410 */ |
15817 | 411 void gnt_tree_set_expanded(GntTree *tree, void *key, gboolean expanded); |
412 | |
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
413 /** |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
414 * Set whether to show column separators. |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
415 * |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
416 * @param tree The tree |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
417 * @param set If @c TRUE, the column separators are displayed |
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
418 */ |
15817 | 419 void gnt_tree_set_show_separator(GntTree *tree, gboolean set); |
420 | |
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
421 /** |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
422 * Sort a row in the tree. |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
423 * |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
424 * @param tree The tree |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
425 * @param row The row to sort |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
426 * |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
427 * @see gnt_tree_set_compare_func |
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
428 */ |
15817 | 429 void gnt_tree_sort_row(GntTree *tree, void *row); |
430 | |
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
431 /** |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
432 * Automatically adjust the width of the columns in the tree. |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
433 * |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
434 * @param tree The tree |
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
435 */ |
15817 | 436 void gnt_tree_adjust_columns(GntTree *tree); |
437 | |
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
438 /** |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
439 * 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
|
440 * |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
441 * @param tree The tree |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
442 * @param hash The hashing function |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
443 * @param eq The function to compare keys |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
444 * @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
|
445 * from the tree |
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
446 */ |
15817 | 447 void gnt_tree_set_hash_fns(GntTree *tree, gpointer hash, gpointer eq, gpointer kd); |
448 | |
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
449 /** |
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
|
450 * 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
|
451 * 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
|
452 * which we don't want/need to display. |
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
453 * |
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
|
454 * @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
|
455 * @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
|
456 * @param vis If @c FALSE, the column will not be displayed |
18049
1cedd520cd18
Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15970
diff
changeset
|
457 */ |
15970
790d1d003825
Allow making some columns invisible.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15928
diff
changeset
|
458 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:
15928
diff
changeset
|
459 |
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
|
460 /** |
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
|
461 * 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
|
462 * tree 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
|
463 * |
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
|
464 * @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
|
465 * @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
|
466 * @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
|
467 * tree is resized |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
468 * |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
469 * @see gnt_tree_set_col_width |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
470 * @see gnt_tree_set_column_width_ratio |
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
|
471 */ |
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
|
472 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
|
473 |
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
|
474 /** |
18420
e2b8b17fc62c
Allow storing non-string binary data in tree columns.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18419
diff
changeset
|
475 * 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
|
476 * 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
|
477 * |
e2b8b17fc62c
Allow storing non-string binary data in tree columns.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18419
diff
changeset
|
478 * @param tree The tree |
e2b8b17fc62c
Allow storing non-string binary data in tree columns.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18419
diff
changeset
|
479 * @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
|
480 * @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
|
481 */ |
e2b8b17fc62c
Allow storing non-string binary data in tree columns.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18419
diff
changeset
|
482 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
|
483 |
e2b8b17fc62c
Allow storing non-string binary data in tree columns.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18419
diff
changeset
|
484 /** |
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
|
485 * 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
|
486 * |
ed17f5530300
Allow showing right-aligned text trees. Right-align the size in the file
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18440
diff
changeset
|
487 * @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
|
488 * @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
|
489 * @param right @c TRUE if the text in the 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
|
490 */ |
ed17f5530300
Allow showing right-aligned text trees. Right-align the size in the file
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18440
diff
changeset
|
491 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
|
492 |
ed17f5530300
Allow showing right-aligned text trees. Right-align the size in the file
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18440
diff
changeset
|
493 /** |
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
|
494 * 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
|
495 * 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
|
496 * |
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
|
497 * @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
|
498 * @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
|
499 * 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
|
500 * end with a negative value for a column-width. |
18419
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
501 * |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
502 * @see gnt_tree_set_col_width |
e79da0369a6d
Docs for GntTree.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18404
diff
changeset
|
503 * @see gnt_tree_set_column_resizable |
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
|
504 */ |
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
|
505 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
|
506 |
15817 | 507 G_END_DECLS |
508 | |
509 /* The following functions should NOT be used by applications. */ | |
510 | |
511 /* This should be called by the subclasses of GntTree's in their _new function */ | |
512 void _gnt_tree_init_internals(GntTree *tree, int col); | |
513 | |
514 #endif /* GNT_TREE_H */ |