1Gtk2::TreeViewColumn(3)User Contributed Perl DocumentatioGntk2::TreeViewColumn(3)
2
3
4

NAME

6       Gtk2::TreeViewColumn - wrapper for GtkTreeViewColumn
7

HIERARCHY

9         Glib::Object
10         +----Glib::InitiallyUnowned
11              +----Gtk2::Object
12                   +----Gtk2::TreeViewColumn
13

INTERFACES

15         Gtk2::CellLayout
16         Gtk2::Buildable
17

METHODS

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

PROPERTIES

181       'alignment' (float : default 0 : readable / writable / private)
182           X Alignment of the column header text or widget
183
184       'clickable' (boolean : default false : readable / writable / private)
185           Whether the header can be clicked
186
187       'expand' (boolean : default false : readable / writable / private)
188           Column gets share of extra width allocated to the widget
189
190       'fixed-width' (integer : default 1 : readable / writable / private)
191           Current fixed width of the column
192
193       'max-width' (integer : default -1 : readable / writable / private)
194           Maximum allowed width of the column
195
196       'min-width' (integer : default -1 : readable / writable / private)
197           Minimum allowed width of the column
198
199       'reorderable' (boolean : default false : readable / writable / private)
200           Whether the column can be reordered around the headers
201
202       'resizable' (boolean : default false : readable / writable / private)
203           Column is user-resizable
204
205       'sizing' (Gtk2::TreeViewColumnSizing : default "grow-only" : readable /
206       writable / private)
207           Resize mode of the column
208
209       'sort-column-id' (integer : default -1 : readable / writable / private)
210           Logical sort column ID this column sorts on when selected for
211           sorting
212
213       'sort-indicator' (boolean : default false : readable / writable /
214       private)
215           Whether to show a sort indicator
216
217       'sort-order' (Gtk2::SortType : default "ascending" : readable /
218       writable / private)
219           Sort direction the sort indicator should indicate
220
221       'spacing' (integer : default 0 : readable / writable / private)
222           Space which is inserted between cells
223
224       'title' (string : default "" : readable / writable / private)
225           Title to appear in column header
226
227       'visible' (boolean : default true : readable / writable / private)
228           Whether to display the column
229
230       'widget' (Gtk2::Widget : default undef : readable / writable / private)
231           Widget to put in column header button instead of column title
232
233       'width' (integer : default 0 : readable / private)
234           Current width of the column
235

SIGNALS

237       clicked (Gtk2::TreeViewColumn)
238

ENUMS AND FLAGS

240   enum Gtk2::SortType
241       ·   'ascending' / 'GTK_SORT_ASCENDING'
242
243       ·   'descending' / 'GTK_SORT_DESCENDING'
244
245   enum Gtk2::TreeViewColumnSizing
246       ·   'grow-only' / 'GTK_TREE_VIEW_COLUMN_GROW_ONLY'
247
248       ·   'autosize' / 'GTK_TREE_VIEW_COLUMN_AUTOSIZE'
249
250       ·   'fixed' / 'GTK_TREE_VIEW_COLUMN_FIXED'
251

SEE ALSO

253       Gtk2, Glib::Object, Glib::InitiallyUnowned, Gtk2::Object
254
256       Copyright (C) 2003-2011 by the gtk2-perl team.
257
258       This software is licensed under the LGPL.  See Gtk2 for a full notice.
259
260
261
262perl v5.28.1                      2019-02-02           Gtk2::TreeViewColumn(3)
Impressum