GtkTreeViewColumn: GtkTreeViewColumn

Description Methods and Functions Hierarchy Interfaces Detailed Description Structures Convenient Construction Enums and Flags User Functions Signals Properties Author(s) References See Also

Description

A visible column in a GtkTreeView widget

Methods and Functions

gtkTreeViewColumnNew()
gtkTreeViewColumnNewWithAttributes(title, cell, ...)
gtkTreeViewColumnPackStart(object, cell, expand = TRUE)
gtkTreeViewColumnPackEnd(object, cell, expand = TRUE)
gtkTreeViewColumnClear(object)
gtkTreeViewColumnGetCellRenderers(object)
gtkTreeViewColumnAddAttribute(object, cell.renderer, attribute, column)
gtkTreeViewColumnSetAttributes(object, cell.renderer, ...)
gtkTreeViewColumnSetCellDataFunc(object, cell.renderer, func, func.data = NULL)
gtkTreeViewColumnClearAttributes(object, cell.renderer)
gtkTreeViewColumnSetSpacing(object, spacing)
gtkTreeViewColumnGetSpacing(object)
gtkTreeViewColumnSetVisible(object, visible)
gtkTreeViewColumnGetVisible(object)
gtkTreeViewColumnSetResizable(object, resizable)
gtkTreeViewColumnGetResizable(object)
gtkTreeViewColumnSetSizing(object, type)
gtkTreeViewColumnGetSizing(object)
gtkTreeViewColumnGetWidth(object)
gtkTreeViewColumnGetFixedWidth(object)
gtkTreeViewColumnSetFixedWidth(object, fixed.width)
gtkTreeViewColumnSetMinWidth(object, min.width)
gtkTreeViewColumnGetMinWidth(object)
gtkTreeViewColumnSetMaxWidth(object, max.width)
gtkTreeViewColumnGetMaxWidth(object)
gtkTreeViewColumnClicked(object)
gtkTreeViewColumnSetTitle(object, title)
gtkTreeViewColumnGetTitle(object)
gtkTreeViewColumnSetExpand(object, expand)
gtkTreeViewColumnGetExpand(object)
gtkTreeViewColumnSetClickable(object, active)
gtkTreeViewColumnGetClickable(object)
gtkTreeViewColumnSetWidget(object, widget = NULL)
gtkTreeViewColumnGetWidget(object)
gtkTreeViewColumnSetAlignment(object, xalign)
gtkTreeViewColumnGetAlignment(object)
gtkTreeViewColumnSetReorderable(object, reorderable)
gtkTreeViewColumnGetReorderable(object)
gtkTreeViewColumnSetSortColumnId(object, sort.column.id)
gtkTreeViewColumnGetSortColumnId(object)
gtkTreeViewColumnSetSortIndicator(object, setting)
gtkTreeViewColumnGetSortIndicator(object)
gtkTreeViewColumnSetSortOrder(object, order)
gtkTreeViewColumnGetSortOrder(object)
gtkTreeViewColumnCellSetCellData(object, tree.model, iter, is.expander, is.expanded)
gtkTreeViewColumnCellGetSize(object)
gtkTreeViewColumnCellGetPosition(object, cell.renderer)
gtkTreeViewColumnCellIsVisible(object)
gtkTreeViewColumnFocusCell(object, cell)
gtkTreeViewColumnQueueResize(object)
gtkTreeViewColumnGetTreeView(object)
gtkTreeViewColumn(title, cell, ...)

Hierarchy

1
2
3
4
GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkTreeViewColumn

Interfaces

GtkTreeViewColumn implements GtkCellLayout and GtkBuildable.

Detailed Description

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.

Structures

GtkTreeViewColumn

undocumented

Convenient Construction

gtkTreeViewColumn is the result of collapsing the constructors of GtkTreeViewColumn (gtkTreeViewColumnNew, gtkTreeViewColumnNewWithAttributes) and accepts a subset of its arguments matching the required arguments of one of its delegate constructors.

Enums and Flags

GtkTreeViewColumnSizing

The sizing method the column uses to determine its width. Please note that GTK.TREE.VIEW.COLUMN.AUTOSIZE are inefficient for large views, and can make columns appear choppy.

grow-only

Columns only get bigger in reaction to changes in the model

autosize

Columns resize to be the optimal size everytime the model changes.

fixed

Columns are a fixed numbers of pixels wide.

User Functions

GtkTreeCellDataFunc(tree.column, cell, tree.model, iter, data)

A function to set the properties of a cell instead of just using the straight mapping between the cell and the model. This is useful for customizing the cell renderer. For example, a function might get an integer from the tree.model, and render it to the "text" attribute of "cell" by converting it to its written equivilent. This is set by calling gtkTreeViewColumnSetCellDataFunc

tree.column

A GtkTreeColumn

cell

The GtkCellRenderer that is being rendered by tree.column

tree.model

The GtkTreeModel being rendered

iter

A GtkTreeIter of the current row rendered

data

user data

Signals

clicked(treeviewcolumn, user.data)

undocumented

treeviewcolumn

the object which received the signal.

user.data

user data set when the signal handler was connected.

Properties

alignment [numeric : Read / Write]

X Alignment of the column header text or widget. Allowed values: [0,1] Default value: 0

clickable [logical : Read / Write]

Whether the header can be clicked. Default value: FALSE

expand [logical : Read / Write]

Column gets share of extra width allocated to the widget. Default value: FALSE

fixed-width [integer : Read / Write]

Current fixed width of the column. Allowed values: >= 1 Default value: 1

max-width [integer : Read / Write]

Maximum allowed width of the column. Allowed values: >= -1 Default value: -1

min-width [integer : Read / Write]

Minimum allowed width of the column. Allowed values: >= -1 Default value: -1

reorderable [logical : Read / Write]

Whether the column can be reordered around the headers. Default value: FALSE

resizable [logical : Read / Write]

Column is user-resizable. Default value: FALSE

sizing [GtkTreeViewColumnSizing : Read / Write]

Resize mode of the column. Default value: GTK_TREE_VIEW_COLUMN_GROW_ONLY

sort-column-id [integer : Read / Write]

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. Allowed values: >= -1 Default value: -1 Since 2.18

sort-indicator [logical : Read / Write]

Whether to show a sort indicator. Default value: FALSE

sort-order [GtkSortType : Read / Write]

Sort direction the sort indicator should indicate. Default value: GTK_SORT_ASCENDING

spacing [integer : Read / Write]

Space which is inserted between cells. Allowed values: >= 0 Default value: 0

title [character : * : Read / Write]

Title to appear in column header. Default value: ""

visible [logical : Read / Write]

Whether to display the column. Default value: TRUE

widget [GtkWidget : * : Read / Write]

Widget to put in column header button instead of column title.

width [integer : Read]

Current width of the column. Allowed values: >= 0 Default value: 0

Author(s)

Derived by RGtkGen from GTK+ documentation

References

https://developer.gnome.org/gtk2/stable/GtkTreeViewColumn.html

See Also

GtkTreeView GtkTreeSelection GtkTreeSortable GtkTreeModelSort GtkListStore GtkTreeStore GtkCellRenderer GtkCellEditable GtkCellRendererPixbuf GtkCellRendererText GtkCellRendererToggle


RGtk2 documentation built on Oct. 14, 2021, 5:08 p.m.