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

NAME

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

SIGNALS

234       clicked (Gtk2::TreeViewColumn)
235

ENUMS AND FLAGS

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

SEE ALSO

250       Gtk2, Glib::Object, Glib::InitiallyUnowned, Gtk2::Object
251
253       Copyright (C) 2003-2008 by the gtk2-perl team.
254
255       This software is licensed under the LGPL.  See Gtk2 for a full notice.
256
257
258
259perl v5.12.0                      2010-05-02           Gtk2::TreeViewColumn(3)
Impressum