Gtk.TreeViewColumn
Class
GtkTreeViewColumn
deprecated: 4.10
Description [src]
final class Gtk.TreeViewColumn : GObject.InitiallyUnowned
implements Gtk.Buildable, Gtk.CellLayout {
/* No available fields */
}
A visible column in a GtkTreeView
widget
The GtkTreeViewColumn
object represents a visible column in a GtkTreeView
widget.
It allows to set properties of the column header, and functions as a holding pen
for the cell renderers which determine how the data in the column is displayed.
Please refer to the tree widget conceptual overview
for an overview of all the objects and data types related to the tree widget and
how they work together, and to the GtkTreeView
documentation for specifics
about the CSS node structure for treeviews and their headers.
Constructors
gtk_tree_view_column_new_with_attributes
Creates a new GtkTreeViewColumn
with a number of default values.
This is equivalent to calling gtk_tree_view_column_set_title(),
gtk_tree_view_column_pack_start(), and
gtk_tree_view_column_set_attributes()
on the newly created GtkTreeViewColumn
.
deprecated: 4.10
Instance methods
gtk_tree_view_column_cell_is_visible
Returns TRUE
if any of the cells packed into the tree_column
are visible.
For this to be meaningful, you must first initialize the cells with gtk_tree_view_column_cell_set_cell_data().
deprecated: 4.10
gtk_tree_view_column_cell_set_cell_data
Sets the cell renderer based on the tree_model
and iter
. That is, for
every attribute mapping in tree_column
, it will get a value from the set
column on the iter
, and use that value to set the attribute on the cell
renderer. This is used primarily by the GtkTreeView
.
deprecated: 4.10
gtk_tree_view_column_clicked
Emits the “clicked” signal on the column. This function will only work if
tree_column
is clickable.
deprecated: 4.10
gtk_tree_view_column_focus_cell
Sets the current keyboard focus to be at cell
, if the column contains
2 or more editable and activatable cells.
deprecated: 4.10
gtk_tree_view_column_get_fixed_width
Gets the fixed width of the column. This may not be the actual displayed width of the column; for that, use gtk_tree_view_column_get_width().
deprecated: 4.10
gtk_tree_view_column_get_tree_view
Returns the GtkTreeView
wherein tree_column
has been inserted.
If column
is currently not inserted in any tree view, NULL
is returned.
deprecated: 4.10
gtk_tree_view_column_pack_end
Adds the cell
to end of the column. If expand
is FALSE
, then the cell
is allocated no more space than it needs. Any unused space is divided
evenly between cells for which expand
is TRUE
.
deprecated: 4.10
gtk_tree_view_column_pack_start
Packs the cell
into the beginning of the column. If expand
is FALSE
, then
the cell
is allocated no more space than it needs. Any unused space is divided
evenly between cells for which expand
is TRUE
.
deprecated: 4.10
gtk_tree_view_column_set_alignment
Sets the alignment of the title or custom widget inside the column header. The alignment determines its location inside the button — 0.0 for left, 0.5 for center, 1.0 for right.
deprecated: 4.10
gtk_tree_view_column_set_clickable
Sets the header to be active if clickable
is TRUE
. When the header is
active, then it can take keyboard focus, and can be clicked.
deprecated: 4.10
gtk_tree_view_column_set_expand
Sets the column to take available extra space. This space is shared equally
amongst all columns that have the expand set to TRUE
. If no column has this
option set, then the last column gets all extra space. By default, every
column is created with this FALSE
.
deprecated: 4.10
gtk_tree_view_column_set_fixed_width
If fixed_width
is not -1, sets the fixed width of tree_column
; otherwise
unsets it. The effective value of fixed_width
is clamped between the
minimum and maximum width of the column; however, the value stored in the
“fixed-width” property is not clamped. If the column sizing is
GTK_TREE_VIEW_COLUMN_GROW_ONLY
or GTK_TREE_VIEW_COLUMN_AUTOSIZE
, setting
a fixed width overrides the automatically calculated width. Note that
fixed_width
is only a hint to GTK; the width actually allocated to the
column may be greater or less than requested.
deprecated: 4.10
gtk_tree_view_column_set_max_width
Sets the maximum width of the tree_column
. If max_width
is -1, then the
maximum width is unset. Note, the column can actually be wider than max
width if it’s the last column in a view. In this case, the column expands to
fill any extra space.
deprecated: 4.10
gtk_tree_view_column_set_sort_column_id
Sets the logical sort_column_id
that this column sorts on when this column
is selected for sorting. Doing so makes the column header clickable.
deprecated: 4.10
gtk_tree_view_column_set_sort_indicator
Call this function with a setting
of TRUE
to display an arrow in
the header button indicating the column is sorted. Call
gtk_tree_view_column_set_sort_order()
to change the direction of
the arrow.
deprecated: 4.10
gtk_tree_view_column_set_spacing
Sets the spacing field of tree_column
, which is the number of pixels to
place between cell renderers packed into it.
deprecated: 4.10
gtk_tree_view_column_set_widget
Sets the widget in the header to be widget
. If widget is NULL
, then the
header button is set with a GtkLabel
set to the title of tree_column
.
deprecated: 4.10
Methods inherited from GObject (43)
Please see GObject for a full list of methods.
Methods inherited from GtkCellLayout (10)
gtk_cell_layout_add_attribute
Adds an attribute mapping to the list in cell_layout
.
deprecated: 4.10
gtk_cell_layout_clear
Unsets all the mappings on all renderers on cell_layout
and
removes all renderers from cell_layout
.
deprecated: 4.10
gtk_cell_layout_clear_attributes
Clears all existing attributes previously set with gtk_cell_layout_set_attributes().
deprecated: 4.10
gtk_cell_layout_get_area
Returns the underlying GtkCellArea
which might be cell_layout
if called on a GtkCellArea
or might be NULL
if no GtkCellArea
is used by cell_layout
.
deprecated: 4.10
gtk_cell_layout_get_cells
Returns the cell renderers which have been added to cell_layout
.
deprecated: 4.10
gtk_cell_layout_pack_end
Adds the cell
to the end of cell_layout
. If expand
is FALSE
, then the
cell
is allocated no more space than it needs. Any unused space is
divided evenly between cells for which expand
is TRUE
.
deprecated: 4.10
gtk_cell_layout_pack_start
Packs the cell
into the beginning of cell_layout
. If expand
is FALSE
,
then the cell
is allocated no more space than it needs. Any unused space
is divided evenly between cells for which expand
is TRUE
.
deprecated: 4.10
gtk_cell_layout_reorder
Re-inserts cell
at position
.
deprecated: 4.10
gtk_cell_layout_set_attributes
Sets the attributes in the parameter list as the attributes
of cell_layout
.
deprecated: 4.10
gtk_cell_layout_set_cell_data_func
Sets the GtkCellLayout
DataFunc to use for cell_layout
.
deprecated: 4.10
Properties
Gtk.TreeViewColumn:sort-column-id
Logical sort column ID this column sorts on when selected for sorting. Setting the sort column ID makes the column header clickable. Set to -1 to make the column unsortable.