TreeViewColumn
Object Hierarchy:
Description:
[ CCode ( type_id = "gtk_tree_view_column_get_type ()" ) ]
public class TreeViewColumn : InitiallyUnowned, Buildable, CellLayout
public class TreeViewColumn : InitiallyUnowned, Buildable, CellLayout
The GtkTreeViewColumn object represents a visible column in a TreeView 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](TreeWidget.html) for an overview of all the objects and data types related to the tree widget and how they work together.
Namespace: Gtk
Package: gtk+-3.0
Content:
Properties:
- public float alignment { get; set; }
- public CellArea cell_area { owned get; construct; }
The CellArea used to layout cell renderers for this column.
- public bool clickable { get; set; }
- public bool expand { get; set; }
- public int fixed_width { get; set; }
- public int max_width { get; set; }
- public int min_width { get; set; }
- public bool reorderable { get; set; }
- public bool resizable { get; set; }
- public TreeViewColumnSizing sizing { get; set; }
- public int sort_column_id { get; set; }
Logical sort column ID this column sorts on when selected for sorting.
- public bool sort_indicator { get; set; }
- public SortType sort_order { get; set; }
- public int spacing { get; set; }
- public string title { get; set; }
- public bool visible { get; set; }
- public Widget widget { get; set; }
- public int width { get; }
- public int x_offset { get; }
Creation methods:
- public TreeViewColumn ()
Creates a new TreeViewColumn.
- public TreeViewColumn.with_area (CellArea area)
Creates a new TreeViewColumn using
area
to render its cells. - public TreeViewColumn.with_attributes (string? title, CellRenderer cell, ...)
Creates a new TreeViewColumn with a number of default values.
Methods:
- public bool cell_get_position (CellRenderer cell_renderer, out int x_offset, out int width)
Obtains the horizontal position and size of a cell in a column.
- public void cell_get_size (Rectangle? cell_area, out int x_offset, out int y_offset, out int width, out int height)
Obtains the width and height needed to render the column.
- public bool cell_is_visible ()
Returns true if any of the cells packed into the this are visible.
- public void cell_set_cell_data (TreeModel tree_model, TreeIter iter, bool is_expander, bool is_expanded)
Sets the cell renderer based on the
tree_model
anditer
. - public void focus_cell (CellRenderer cell)
Sets the current keyboard focus to be at
cell
, if the column contains 2 or more editable and activatable cells. - public float get_alignment ()
Returns the current x alignment of this.
- public unowned Widget get_button ()
Returns the button used in the treeview column header
- public bool get_clickable ()
Returns true if the user can click on the header for the column.
- public bool get_expand ()
Returns true if the column expands to fill available space.
- public int get_fixed_width ()
Gets the fixed width of the column.
- public int get_max_width ()
Returns the maximum width in pixels of the this , or -1 if no maximum width is set.
- public int get_min_width ()
Returns the minimum width in pixels of the this , or -1 if no minimum width is set.
- public bool get_reorderable ()
Returns true if the this can be reordered by the user.
- public bool get_resizable ()
Returns true if the this can be resized by the end user.
- public TreeViewColumnSizing get_sizing ()
Returns the current type of this.
- public int get_sort_column_id ()
Gets the logical
sort_column_id
that the model sorts on when this column is selected for sorting. - public bool get_sort_indicator ()
Gets the value set by set_sort_indicator.
- public SortType get_sort_order ()
Gets the value set by set_sort_order.
- public int get_spacing ()
Returns the spacing of this.
- public unowned string get_title ()
Returns the title of the widget.
- public unowned Widget? get_tree_view ()
Returns the TreeView wherein this has been inserted.
- public bool get_visible ()
Returns true if this is visible.
- public unowned Widget? get_widget ()
Returns the Widget in the button on the column header.
- public int get_width ()
Returns the current size of this in pixels.
- public int get_x_offset ()
Returns the current X offset of this in pixels.
- public void queue_resize ()
Flags the column, and the cell renderers added to this column, to have their sizes renegotiated.
- public void set_alignment (float xalign)
Sets the alignment of the title or custom widget inside the column header.
- public void set_attributes (CellRenderer cell_renderer, ...)
Sets the attributes in the list as the attributes of this.
- public void set_clickable (bool clickable)
Sets the header to be active if
clickable
is true. - public void set_expand (bool expand)
Sets the column to take available extra space.
- public void set_fixed_width (int fixed_width)
If
fixed_width
is not -1, sets the fixed width of this; otherwise unsets it. - public void set_max_width (int max_width)
Sets the maximum width of the this.
- public void set_min_width (int min_width)
Sets the minimum width of the this.
- public void set_reorderable (bool reorderable)
If
reorderable
is true, then the column can be reordered by the end user dragging the header. - public void set_resizable (bool resizable)
If
resizable
is true, then the user can explicitly resize the column by grabbing the outer edge of the column button. - public void set_sizing (TreeViewColumnSizing type)
Sets the growth behavior of this to
type
. - public void set_sort_column_id (int sort_column_id)
Sets the logical
sort_column_id
that this column sorts on when this column is selected for sorting. - public void set_sort_indicator (bool setting)
Call this function with a
setting
of true to display an arrow in the header button indicating the column is sorted. - public void set_sort_order (SortType order)
Changes the appearance of the sort indicator.
- public void set_spacing (int spacing)
Sets the spacing field of this, which is the number of pixels to place between cell renderers packed into it.
- public void set_title (string title)
Sets the title of the this.
- public void set_visible (bool visible)
Sets the visibility of this.
- public void set_widget (Widget? widget)
Sets the widget in the header to be
widget
.
Signals:
- public virtual signal void clicked ()
Emits the “clicked” signal on the column.
Inherited Members:
All known members inherited from class GLib.Object
All known members inherited from interface Gtk.Buildable
All known members inherited from interface Gtk.CellLayout