[21:7] extends: object
A visible column in a [class@Gtk.TreeView] 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
[class@Gtk.TreeView] documentation for specifics about the CSS node structure
for treeviews and their headers.
TreeViewColumn (area = null)
Creates a new
GtkTreeViewColumn.
area is the GtkCellArea that the newly created column should use to layout cells..toNativeHandle (Source)
Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from
fn.call(...), another generated wrapper exposinghandle(), or null. Returns null when the argument carries no pointer.
Source is the raw handle, raw buffer, wrapper, or null.A raw pointer carrier or null when no pointer is present.getLib ()
Returns the opened native library for this generated wrapper.
The opened native library.handle ()
Returns the wrapped NativeHandle.
The wrapped NativeHandle.isNull ()
Returns true when the wrapped handle is null.
A bool.describe ()
Returns a small string for debugging generated wrappers.
A string.asInitiallyUnowned ()
Wraps this handle as
InitiallyUnowned.
A InitiallyUnowned object.asBuildable ()
Wraps this handle as
Buildable.
A Buildable object.asCellLayout ()
Wraps this handle as
CellLayout.
A CellLayout object.connectSignal (string Name, CallbackObj)
Connects one generated callback wrapper to a named signal.
Name is the signal name.CallbackObj is the generated callback wrapper to connect.The connected handler id.disconnectSignalHandler (int HandlerId)
Disconnects one retained signal handler id.
HandlerId is the signal handler id to disconnect.None.setOnClicked (callback Fn, UserData = null)
Emitted when the column's header has been clicked.
Fn is the Aussom callback.Fn is called with (TreeViewColumn Self).UserData is retained and passed through to the generated callback wrapper when provided.The connected handler id.getProperty (string Name)
Reads one generated property by name.
setProperty (string Name, Value)
Writes one generated property by name.
setAlignment (double Value)
Writes the
alignmentproperty.
Value is the new property value.None.setClickable (bool Value)
Writes the
clickableproperty.
Value is the new property value.None.setExpand (bool Value)
Writes the
expandproperty.
Value is the new property value.None.setFixedwidth (int Value)
Writes the
fixed-widthproperty.
Value is the new property value.None.setMaxwidth (int Value)
Writes the
max-widthproperty.
Value is the new property value.None.setMinwidth (int Value)
Writes the
min-widthproperty.
Value is the new property value.None.setReorderable (bool Value)
Writes the
reorderableproperty.
Value is the new property value.None.setResizable (bool Value)
Writes the
resizableproperty.
Value is the new property value.None.setSizing (string Value)
Writes the
sizingproperty.
Value is the new property value.None.setSortcolumnid (int Value)
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.
Value is the new property value.None.setSortindicator (bool Value)
Writes the
sort-indicatorproperty.
Value is the new property value.None.setSortorder (string Value)
Writes the
sort-orderproperty.
Value is the new property value.None.setSpacing (int Value)
Writes the
spacingproperty.
Value is the new property value.None.setTitle (string Value)
Writes the
titleproperty.
Value is the new property value.None.setVisible (bool Value)
Writes the
visibleproperty.
Value is the new property value.None.setWidget (object Value)
Writes the
widgetproperty.
Value is the new property value.None.add_attribute (object cell_renderer, string attribute, int column)
Adds an attribute mapping to the list in @tree_column. The @column is the column of the model to get a value from, and the @attribute is the parameter on @cell_renderer to be set from the value. So for example if column 2 of the model contains strings, you could have the “text” attribute of a
GtkCellRendererTextget its values from column 2.
cell_renderer is the GtkCellRenderer to set attributes on.attribute is An attribute on the renderer.column is The column position on the model to get the attribute from..None.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()
cell_set_cell_data (object tree_model, iter, bool is_expander, bool is_expanded)
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.
tree_model is The GtkTreeModel to get the cell renderers attributes from..iter is The GtkTreeIter to get the cell renderer’s attributes from..is_expander is %TRUE, if the row has children.is_expanded is %TRUE, if the row has visible children.None.clear ()
Unsets all the mappings on all renderers on the @tree_column.
None.clear_attributes (object cell_renderer)
Clears all existing attributes previously set with gtk_tree_view_column_set_attributes().
cell_renderer is a GtkCellRenderer to clear the attribute mapping on..None.clicked ()
Emits the “clicked” signal on the column. This function will only work if
is clickable.None.focus_cell (object cell)
Sets the current keyboard focus to be at @cell, if the column contains 2 or more editable and activatable cells.
cell is A GtkCellRenderer.None.get_alignment ()
Returns the current x alignment of @tree_column. This value can range between 0.0 and 1.0.
get_button ()
Returns the button used in the treeview column header
get_clickable ()
Returns %TRUE if the user can click on the header for the column.
get_expand ()
Returns %TRUE if the column expands to fill available space.
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().
get_max_width ()
Returns the maximum width in pixels of the @tree_column, or -1 if no maximum width is set.
get_min_width ()
Returns the minimum width in pixels of the @tree_column, or -1 if no minimum width is set.
get_reorderable ()
Returns %TRUE if the @tree_column can be reordered by the user.
get_resizable ()
Returns %TRUE if the @tree_column can be resized by the end user.
get_sizing ()
Returns the current type of @tree_column.
get_sort_column_id ()
Gets the logical @sort_column_id that the model sorts on when this column is selected for sorting. See [method@Gtk.TreeViewColumn.set_sort_column_id].
get_sort_indicator ()
Gets the value set by gtk_tree_view_column_set_sort_indicator().
get_sort_order ()
Gets the value set by gtk_tree_view_column_set_sort_order().
get_spacing ()
Returns the spacing of @tree_column.
get_title ()
Returns the title of the widget.
get_tree_view ()
Returns the
GtkTreeViewwherein @tree_column has been inserted. If
is currently not inserted in any tree view, %NULL is returned.get_visible ()
Returns %TRUE if @tree_column is visible.
get_widget ()
Returns the
GtkWidgetin the button on the column header. If a custom widget has not been set then %NULL is returned.
get_width ()
Returns the current size of @tree_column in pixels.
get_x_offset ()
Returns the current X offset of @tree_column in pixels.
pack_end (object cell, bool expand)
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.
cell is The GtkCellRenderer.expand is %TRUE if @cell is to be given extra space allocated toNone.pack_start (object cell, bool expand)
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.
cell is The GtkCellRenderer.expand is %TRUE if @cell is to be given extra space allocated toNone.queue_resize ()
Flags the column, and the cell renderers added to this column, to have their sizes renegotiated.
None.set_alignment (double xalign)
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.
xalign is The alignment, which is between [0.0 and 1.0] inclusive..None.set_clickable (bool 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.
clickable is %TRUE if the header is active..None.set_expand (bool 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. Along with “fixed-width”, the “expand” property changes when the column is resized by the user.
expand is %TRUE if the column should expand to fill available space..None.set_fixed_width (int 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. Along with “expand”, the “fixed-width” property changes when the column is resized by the user.
fixed_width is The new fixed width, in pixels, or -1..None.set_max_width (int 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.
max_width is The maximum width of the column in pixels, or -1..None.set_min_width (int min_width)
Sets the minimum width of the @tree_column. If @min_width is -1, then the minimum width is unset.
min_width is The minimum width of the column in pixels, or -1..None.set_reorderable (bool reorderable)
If @reorderable is %TRUE, then the column can be reordered by the end user dragging the header.
reorderable is %TRUE, if the column can be reordered..None.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. If resizable is %TRUE and sizing mode of the column is %GTK_TREE_VIEW_COLUMN_AUTOSIZE, then the sizing mode is changed to %GTK_TREE_VIEW_COLUMN_GROW_ONLY.
resizable is %TRUE, if the column can be resized.None.set_sizing (string type)
Sets the growth behavior of @tree_column to @type.
type is The GtkTreeViewColumnSizing..None.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. Doing so makes the column header clickable.
sort_column_id is The @sort_column_id of the model to sort on..None.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. Call gtk_tree_view_column_set_sort_order() to change the direction of the arrow.
setting is %TRUE to display an indicator that the column is sorted.None.set_sort_order (string order)
Changes the appearance of the sort indicator. This does not actually sort the model. Use gtk_tree_view_column_set_sort_column_id() if you want automatic sorting support. This function is primarily for custom sorting behavior, and should be used in conjunction with gtk_tree_sortable_set_sort_column_id() to do that. For custom models, the mechanism will vary. The sort indicator changes direction to indicate normal sort or reverse sort. Note that you must have the sort indicator enabled to see anything when calling this function; see gtk_tree_view_column_set_sort_indicator().
order is sort order that the sort indicator should indicate.None.set_spacing (int spacing)
Sets the spacing field of @tree_column, which is the number of pixels to place between cell renderers packed into it.
spacing is distance between cell renderers in pixels..None.set_title (string title)
Sets the title of the @tree_column. If a custom widget has been set, then this value is ignored.
title is The title of the @tree_column..None.set_visible (bool visible)
Sets the visibility of @tree_column.
visible is %TRUE if the @tree_column is visible..None.set_widget (object widget)
Sets the widget in the header to be @widget. If widget is %NULL, then the header button is set with a
GtkLabelset to the title of @tree_column.
widget is A child GtkWidget.None.[1027:14] static extends: object
Generated metadata helpers for TreeViewColumn class surfaces.
properties ()
Returns property metadata for
TreeViewColumn.
A list.signals ()
Returns signal metadata for
TreeViewColumn.
A list.[957:7] extends: object
Generated low-level callback wrapper for GIR callback clicked.
TreeViewColumnClickedCallback (callback Fn, UserData = null)
Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking
Fn.
Fn is the Aussom callback implementation.UserData is retained and passed through to Fn on each invocation when provided.trampoline (nativeSelf, nativeUserData)
Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.
callback ()
Returns the wrapped NativeCallback.
handle ()
Returns the callback as a NativeHandle.
close ()
Closes the underlying NativeCallback.
isClosed ()
Returns true when the callback has been closed.