1Gtk2::TreeViewColumn(3)User Contributed Perl DocumentatioGntk2::TreeViewColumn(3)
2
3
4
6 Gtk2::TreeViewColumn - wrapper for GtkTreeViewColumn
7
9 Glib::Object
10 +----Glib::InitiallyUnowned
11 +----Gtk2::Object
12 +----Gtk2::TreeViewColumn
13
15 Gtk2::CellLayout
16 Gtk2::Buildable
17
19 treeviewcolumn = Gtk2::TreeViewColumn->new
20 treeviewcolumn = Gtk2::TreeViewColumn->new_with_attributes ($title, $cell,
21 $attr1, $col1, ...)
22 • $title (string)
23
24 • $cell (Gtk2::CellRenderer)
25
26 • ... (list) pairs of attributes and columns
27
28 • $col1 (integer) the first column
29
30 • $attr1 (string) the first attribute
31
32 $tree_column->add_attribute ($cell_renderer, $attribute, $column)
33 • $cell_renderer (Gtk2::CellRenderer)
34
35 • $attribute (string)
36
37 • $column (integer)
38
39 double = $tree_column->get_alignment
40 $tree_column->set_alignment ($xalign)
41 • $xalign (double)
42
43 $tree_column->set_attributes ($cell_renderer, ..., $col1, $attr1)
44 • $cell_renderer (Gtk2::CellRenderer)
45
46 • ... (list) pairs of attributes and columns
47
48 • $col1 (integer) the first column
49
50 • $attr1 (string) the first attribute
51
52 $tree_column->set_cell_data_func ($cell_renderer, $func, $data=undef)
53 • $cell_renderer (Gtk2::CellRenderer)
54
55 • $func (subroutine)
56
57 • $data (scalar)
58
59 Install $func as the callback to be used whenever $column needs to set
60 up $cell to render a cell. $func should look like this:
61
62 sub cell_data_func {
63 my ($column, $cell, $model, $iter, $func_data) = @_;
64 }
65
66 and should set whatever properties of $cell are required for it to draw
67 the data properly. No return value is expected.
68
69 (start_pos, width) = $tree_column->cell_get_position ($cell_renderer)
70 • $cell_renderer (Gtk2::CellRenderer)
71
72 Since: gtk+ 2.2
73
74 list = $tree_column->cell_get_size
75 boolean = $tree_column->cell_is_visible
76 list = $tree_column->get_cell_renderers
77 Returns a list of Gtk2::CellRenderer's.
78
79 $tree_column->cell_set_cell_data ($tree_model, $iter, $is_expander,
80 $is_expanded)
81 • $tree_model (Gtk2::TreeModel)
82
83 • $iter (Gtk2::TreeIter)
84
85 • $is_expander (boolean)
86
87 • $is_expanded (boolean)
88
89 $tree_column->clear
90 $tree_column->clear_attributes ($cell_renderer)
91 • $cell_renderer (Gtk2::CellRenderer)
92
93 boolean = $tree_column->get_clickable
94 $tree_column->set_clickable ($clickable)
95 • $clickable (boolean)
96
97 $tree_column->clicked
98 boolean = $tree_column->get_expand
99 Since: gtk+ 2.4
100
101 $tree_column->set_expand ($expand)
102 • $expand (boolean)
103
104 Since: gtk+ 2.4
105
106 integer = $tree_column->get_fixed_width
107 $tree_column->set_fixed_width ($fixed_width)
108 • $fixed_width (integer)
109
110 $tree_column->focus_cell ($cell)
111 • $cell (Gtk2::CellRenderer)
112
113 Since: gtk+ 2.2
114
115 integer = $tree_column->get_max_width
116 $tree_column->set_max_width ($max_width)
117 • $max_width (integer)
118
119 integer = $tree_column->get_min_width
120 $tree_column->set_min_width ($min_width)
121 • $min_width (integer)
122
123 $tree_column->pack_end ($cell, $expand)
124 • $cell (Gtk2::CellRenderer)
125
126 • $expand (boolean)
127
128 $tree_column->pack_start ($cell, $expand)
129 • $cell (Gtk2::CellRenderer)
130
131 • $expand (boolean)
132
133 $tree_column->queue_resize
134 Since: gtk+ 2.8
135
136 boolean = $tree_column->get_reorderable
137 $tree_column->set_reorderable ($reorderable)
138 • $reorderable (boolean)
139
140 boolean = $tree_column->get_resizable
141 $tree_column->set_resizable ($resizable)
142 • $resizable (boolean)
143
144 treeviewcolumnsizing = $tree_column->get_sizing
145 $tree_column->set_sizing ($type)
146 • $type (Gtk2::TreeViewColumnSizing)
147
148 integer = $tree_column->get_sort_column_id
149 $tree_column->set_sort_column_id ($sort_column_id)
150 • $sort_column_id (integer)
151
152 boolean = $tree_column->get_sort_indicator
153 $tree_column->set_sort_indicator ($setting)
154 • $setting (boolean)
155
156 sorttype = $tree_column->get_sort_order
157 $tree_column->set_sort_order ($order)
158 • $order (Gtk2::SortType)
159
160 integer = $tree_column->get_spacing
161 $tree_column->set_spacing ($spacing)
162 • $spacing (integer)
163
164 string = $tree_column->get_title
165 $tree_column->set_title ($title)
166 • $title (string)
167
168 widget or undef = $tree_column->get_tree_view
169 Since: gtk+ 2.12
170
171 boolean = $tree_column->get_visible
172 $tree_column->set_visible ($visible)
173 • $visible (boolean)
174
175 widget or undef = $tree_column->get_widget
176 $tree_column->set_widget ($widget)
177 • $widget (Gtk2::Widget or undef)
178
179 integer = $tree_column->get_width
181 'alignment' (float : default 0 : readable / writable / private /
182 static-nick / static-blurb)
183 X Alignment of the column header text or widget
184
185 'clickable' (boolean : default false : readable / writable / private /
186 static-nick / static-blurb)
187 Whether the header can be clicked
188
189 'expand' (boolean : default false : readable / writable / private /
190 static-nick / static-blurb)
191 Column gets share of extra width allocated to the widget
192
193 'fixed-width' (integer : default 1 : readable / writable / private /
194 static-nick / static-blurb)
195 Current fixed width of the column
196
197 'max-width' (integer : default -1 : readable / writable / private /
198 static-nick / static-blurb)
199 Maximum allowed width of the column
200
201 'min-width' (integer : default -1 : readable / writable / private /
202 static-nick / static-blurb)
203 Minimum allowed width of the column
204
205 'reorderable' (boolean : default false : readable / writable / private
206 / static-nick / static-blurb)
207 Whether the column can be reordered around the headers
208
209 'resizable' (boolean : default false : readable / writable / private /
210 static-nick / static-blurb)
211 Column is user-resizable
212
213 'sizing' (Gtk2::TreeViewColumnSizing : default "grow-only" : readable /
214 writable / private / static-nick / static-blurb)
215 Resize mode of the column
216
217 'sort-column-id' (integer : default -1 : readable / writable / private
218 / static-nick / static-blurb)
219 Logical sort column ID this column sorts on when selected for
220 sorting
221
222 'sort-indicator' (boolean : default false : readable / writable /
223 private / static-nick / static-blurb)
224 Whether to show a sort indicator
225
226 'sort-order' (Gtk2::SortType : default "ascending" : readable /
227 writable / private / static-nick / static-blurb)
228 Sort direction the sort indicator should indicate
229
230 'spacing' (integer : default 0 : readable / writable / private /
231 static-nick / static-blurb)
232 Space which is inserted between cells
233
234 'title' (string : default "" : readable / writable / private / static-
235 nick / static-blurb)
236 Title to appear in column header
237
238 'visible' (boolean : default true : readable / writable / private /
239 static-nick / static-blurb)
240 Whether to display the column
241
242 'widget' (Gtk2::Widget : default undef : readable / writable / private
243 / static-nick / static-blurb)
244 Widget to put in column header button instead of column title
245
246 'width' (integer : default 0 : readable / private / static-nick /
247 static-blurb)
248 Current width of the column
249
251 clicked (Gtk2::TreeViewColumn)
252
254 enum Gtk2::SortType
255 • 'ascending' / 'GTK_SORT_ASCENDING'
256
257 • 'descending' / 'GTK_SORT_DESCENDING'
258
259 enum Gtk2::TreeViewColumnSizing
260 • 'grow-only' / 'GTK_TREE_VIEW_COLUMN_GROW_ONLY'
261
262 • 'autosize' / 'GTK_TREE_VIEW_COLUMN_AUTOSIZE'
263
264 • 'fixed' / 'GTK_TREE_VIEW_COLUMN_FIXED'
265
267 Gtk2, Glib::Object, Glib::InitiallyUnowned, Gtk2::Object
268
270 Copyright (C) 2003-2011 by the gtk2-perl team.
271
272 This software is licensed under the LGPL. See Gtk2 for a full notice.
273
274
275
276perl v5.36.0 2022-07-22 Gtk2::TreeViewColumn(3)