gtk.tree_view_column

Module for [TreeViewColumn] class

Types 3

A visible column in a gtk.tree_view.TreeView widget

The gtk.tree_view_column.TreeViewColumn object represents a visible column in a gtk.tree_view.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 for an overview of all the objects and data types related to the tree widget and how they work together, and to the gtk.tree_view.TreeView documentation for specifics about the CSS node structure for treeviews and their headers.

Deprecated

Methods
GType _getGType() static nothrow
GType _gType() @property nothrow
TreeViewColumn self() nothrowReturns `this`, for use in `with` statements.
TreeViewColumnGidBuilder builder() static nothrowGet builder for [gtk.tree_view_column.TreeViewColumn] Returns: New builder object
float alignment() @property nothrow
void alignment(float propval) @property nothrow
gtk.cell_area.CellArea cellArea() @property nothrowGet `cellArea` property. Returns: The [gtk.cell_area.CellArea] used to layout cell renderers for this column.
bool clickable() @property nothrow
void clickable(bool propval) @property nothrow
bool expand() @property nothrow
void expand(bool propval) @property nothrow
int fixedWidth() @property nothrow
void fixedWidth(int propval) @property nothrow
int maxWidth() @property nothrow
void maxWidth(int propval) @property nothrow
int minWidth() @property nothrow
void minWidth(int propval) @property nothrow
bool reorderable() @property nothrow
void reorderable(bool propval) @property nothrow
bool resizable() @property nothrow
void resizable(bool propval) @property nothrow
void sizing(gtk.types.TreeViewColumnSizing propval) @property nothrow
int sortColumnId() @property nothrowGet `sortColumnId` property. Returns: 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 colu...
void sortColumnId(int propval) @property nothrowSet `sortColumnId` property. Params: propval = 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...
bool sortIndicator() @property nothrow
void sortIndicator(bool propval) @property nothrow
gtk.types.SortType sortOrder() @property nothrow
void sortOrder(gtk.types.SortType propval) @property nothrow
int spacing() @property nothrow
void spacing(int propval) @property nothrow
string title() @property nothrow
void title(string propval) @property nothrow
bool visible() @property nothrow
void visible(bool propval) @property nothrow
gtk.widget.Widget widget() @property nothrow
void widget(gtk.widget.Widget propval) @property nothrow
int width() @property nothrow
int xOffset() @property nothrow
gtk.tree_view_column.TreeViewColumn newWithArea(gtk.cell_area.CellArea area) static nothrowCreates a new [gtk.tree_view_column.TreeViewColumn] using area to render its cells.
void addAttribute(gtk.cell_renderer.CellRenderer cellRenderer, string attribute, int column) nothrowAdds an attribute mapping to the list in tree_column.
bool cellGetPosition(gtk.cell_renderer.CellRenderer cellRenderer, out int xOffset, out int width) nothrowObtains the horizontal position and size of a cell in a column.
void cellGetSize(out int xOffset, out int yOffset, out int width, out int height) nothrowObtains the width and height needed to render the column. This is used primarily by the [gtk.tree_view.TreeView].
bool cellIsVisible() nothrowReturns 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.TreeViewColumn.cellSetCellData] R...
void cellSetCellData(gtk.tree_model.TreeModel treeModel, gtk.tree_iter.TreeIter iter, bool isExpander, bool isExpanded) nothrowSets 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 att...
void clear() nothrowUnsets all the mappings on all renderers on the tree_column.
void clearAttributes(gtk.cell_renderer.CellRenderer cellRenderer) nothrowClears all existing attributes previously set with [gtk.tree_view_column.TreeViewColumn.setAttributes].
void clicked() nothrowEmits the “clicked” signal on the column. This function will only work if tree_column is clickable.
void focusCell(gtk.cell_renderer.CellRenderer cell) nothrowSets the current keyboard focus to be at cell, if the column contains 2 or more editable and activatable cells.
float getAlignment() nothrowReturns the current x alignment of tree_column. This value can range between 0.0 and 1.0. Returns: The current alignent of tree_column.
gtk.widget.Widget getButton() nothrowReturns the button used in the treeview column header Returns: The button for the column header.
bool getClickable() nothrowReturns true if the user can click on the header for the column. Returns: true if user can click the column header.
bool getExpand() nothrowReturns true if the column expands to fill available space. Returns: true if the column expands to fill available space.
int getFixedWidth() nothrowGets the fixed width of the column. This may not be the actual displayed width of the column; for that, use [gtk.tree_view_column.TreeViewColumn.getWidth]. Returns: The fixed width of the column.
int getMaxWidth() nothrowReturns the maximum width in pixels of the tree_column, or -1 if no maximum width is set. Returns: The maximum width of the tree_column.
int getMinWidth() nothrowReturns the minimum width in pixels of the tree_column, or -1 if no minimum width is set. Returns: The minimum width of the tree_column.
bool getReorderable() nothrowReturns true if the tree_column can be reordered by the user. Returns: true if the tree_column can be reordered by the user.
bool getResizable() nothrowReturns true if the tree_column can be resized by the end user. Returns: true, if the tree_column can be resized.
gtk.types.TreeViewColumnSizing getSizing() nothrowReturns the current type of tree_column. Returns: The type of tree_column.
int getSortColumnId() nothrowGets the logical sort_column_id that the model sorts on when this column is selected for sorting.
bool getSortIndicator() nothrowGets the value set by [gtk.tree_view_column.TreeViewColumn.setSortIndicator]. Returns: whether the sort indicator arrow is displayed
gtk.types.SortType getSortOrder() nothrowGets the value set by [gtk.tree_view_column.TreeViewColumn.setSortOrder]. Returns: the sort order the sort indicator is indicating
int getSpacing() nothrowReturns the spacing of tree_column. Returns: the spacing of tree_column.
string getTitle() nothrowReturns the title of the widget. Returns: the title of the column. This string should not be modified or freed.
gtk.widget.Widget getTreeView() nothrowReturns the [gtk.tree_view.TreeView] wherein tree_column has been inserted. If column is currently not inserted in any tree view, null is returned. Returns: The tree view wherein column has been in...
bool getVisible() nothrowReturns true if tree_column is visible. Returns: whether the column is visible or not. If it is visible, then the tree will show the column.
gtk.widget.Widget getWidget() nothrowReturns the [gtk.widget.Widget] in the button on the column header.
int getWidth() nothrowReturns the current size of tree_column in pixels. Returns: The current width of tree_column.
int getXOffset() nothrowReturns the current X offset of tree_column in pixels. Returns: The current X offset of tree_column.
void packEnd(gtk.cell_renderer.CellRenderer cell, bool expand) nothrowAdds 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.
void packStart(gtk.cell_renderer.CellRenderer cell, bool expand) nothrowPacks 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.
void queueResize() nothrowFlags the column, and the cell renderers added to this column, to have their sizes renegotiated.
void setAlignment(float xalign) nothrowSets 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.
void setCellDataFunc(gtk.cell_renderer.CellRenderer cellRenderer, gtk.types.TreeCellDataFunc func = null) nothrowSets the [gtk.types.TreeCellDataFunc] to use for the column.
void setClickable(bool clickable) nothrowSets the header to be active if clickable is true. When the header is active, then it can take keyboard focus, and can be clicked.
void setExpand(bool expand) nothrowSets 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 e...
void setFixedWidth(int fixedWidth) nothrowIf 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 ...
void setMaxWidth(int maxWidth) nothrowSets 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...
void setMinWidth(int minWidth) nothrowSets the minimum width of the tree_column. If min_width is -1, then the minimum width is unset.
void setReorderable(bool reorderable) nothrowIf reorderable is true, then the column can be reordered by the end user dragging the header.
void setResizable(bool resizable) nothrowIf resizable is true, then the user can explicitly resize the column by grabbing the outer edge of the column button.
void setSizing(gtk.types.TreeViewColumnSizing type) nothrowSets the growth behavior of tree_column to type.
void setSortColumnId(int sortColumnId) nothrowSets the logical sort_column_id that this column sorts on when this column is selected for sorting. Doing so makes the column header clickable.
void setSortIndicator(bool setting) nothrowCall 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.TreeViewColumn.setSortOrder] to change the direction o...
void setSortOrder(gtk.types.SortType order) nothrowChanges the appearance of the sort indicator.
void setSpacing(int spacing) nothrowSets the spacing field of tree_column, which is the number of pixels to place between cell renderers packed into it.
void setTitle(string title) nothrowSets the title of the tree_column. If a custom widget has been set, then this value is ignored.
void setVisible(bool visible) nothrowSets the visibility of tree_column.
void setWidget(gtk.widget.Widget widget = null) nothrowSets the widget in the header to be widget. If widget is null, then the header button is set with a [gtk.label.Label] set to the title of tree_column.
gulong connectClicked(T)(T callback, Flag!"After" after = No.After) if (isCallable!T && is(ReturnType!T == void) && (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gtk.tree_view_column.TreeViewColumn))) && Parameters!T.length < 2) nothrowConnect to `Clicked` signal.
Constructors
this(void * ptr, Flag!"Take" take)
this()Creates a new [gtk.tree_view_column.TreeViewColumn]. Returns: A newly created [gtk.tree_view_column.TreeViewColumn].

Fluent builder implementation template for gtk.tree_view_column.TreeViewColumn

Methods
T alignment(float propval) nothrow
T cellArea(gtk.cell_area.CellArea propval) nothrowSet `cellArea` property. Params: propval = The [gtk.cell_area.CellArea] used to layout cell renderers for this column.
T clickable(bool propval) nothrow
T expand(bool propval) nothrow
T fixedWidth(int propval) nothrow
T maxWidth(int propval) nothrow
T minWidth(int propval) nothrow
T reorderable(bool propval) nothrow
T resizable(bool propval) nothrow
T sortColumnId(int propval) nothrowSet `sortColumnId` property. Params: propval = 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...
T sortIndicator(bool propval) nothrow
T sortOrder(gtk.types.SortType propval) nothrow
T spacing(int propval) nothrow
T title(string propval) nothrow
T visible(bool propval) nothrow
T widget(gtk.widget.Widget propval) nothrow
Methods
TreeViewColumn build() nothrowCreate object from builder. Returns: New object