gtk.column_view_column

Module for [ColumnViewColumn] class

Types 3

[gtk.column_view_column.ColumnViewColumn] represents the columns being added to a [gtk.column_view.ColumnView].

The main ingredient for a [gtk.column_view_column.ColumnViewColumn] is the [gtk.list_item_factory.ListItemFactory] that tells the columnview how to create cells for this column from items in the model.

Columns have a title, and can optionally have a header menu set with [gtk.column_view_column.ColumnViewColumn.setHeaderMenu].

A sorter can be associated with a column using [gtk.column_view_column.ColumnViewColumn.setSorter], to let users influence sorting by clicking on the column header.

Methods
GType _gType() @property
ColumnViewColumn self()Returns `this`, for use in `with` statements.
ColumnViewColumnGidBuilder builder()Get builder for [gtk.columnviewcolumn.ColumnViewColumn] Returns: New builder object
gtk.column_view.ColumnView columnView() @propertyGet `columnView` property. Returns: The [gtk.column_view.ColumnView] this column is a part of.
bool expand() @propertyGet `expand` property. Returns: Column gets share of extra width allocated to the view.
void expand(bool propval) @propertySet `expand` property. Params: propval = Column gets share of extra width allocated to the view.
gtk.list_item_factory.ListItemFactory factory() @propertyGet `factory` property. Returns: Factory for populating list items.
void factory(gtk.list_item_factory.ListItemFactory propval) @propertySet `factory` property. Params: propval = Factory for populating list items.
int fixedWidth() @propertyGet `fixedWidth` property. Returns: If not -1, this is the width that the column is allocated, regardless of the size of its content.
void fixedWidth(int propval) @propertySet `fixedWidth` property. Params: propval = If not -1, this is the width that the column is allocated, regardless of the size of its content.
gio.menu_model.MenuModel headerMenu() @propertyGet `headerMenu` property. Returns: Menu model used to create the context menu for the column header.
void headerMenu(gio.menu_model.MenuModel propval) @propertySet `headerMenu` property. Params: propval = Menu model used to create the context menu for the column header.
string id() @propertyGet `id` property. Returns: An ID for the column.
void id(string propval) @propertySet `id` property. Params: propval = An ID for the column.
bool resizable() @propertyGet `resizable` property. Returns: Whether this column is resizable.
void resizable(bool propval) @propertySet `resizable` property. Params: propval = Whether this column is resizable.
gtk.sorter.Sorter sorter() @propertyGet `sorter` property. Returns: Sorter for sorting items according to this column.
void sorter(gtk.sorter.Sorter propval) @propertySet `sorter` property. Params: propval = Sorter for sorting items according to this column.
string title() @propertyGet `title` property. Returns: Title displayed in the header.
void title(string propval) @propertySet `title` property. Params: propval = Title displayed in the header.
bool visible() @propertyGet `visible` property. Returns: Whether this column is visible.
void visible(bool propval) @propertySet `visible` property. Params: propval = Whether this column is visible.
gtk.column_view.ColumnView getColumnView()Gets the column view that's currently displaying this column.
bool getExpand()Returns whether this column should expand. Returns: true if this column expands
gtk.list_item_factory.ListItemFactory getFactory()Gets the factory that's currently used to populate list items for this column. Returns: The factory in use
int getFixedWidth()Gets the fixed width of the column. Returns: the fixed with of the column
gio.menu_model.MenuModel getHeaderMenu()Gets the menu model that is used to create the context menu for the column header. Returns: the [gio.menu_model.MenuModel]
string getId()Returns the ID set with [gtk.columnviewcolumn.ColumnViewColumn.setId]. Returns: The column's ID
bool getResizable()Returns whether this column is resizable. Returns: true if this column is resizable
gtk.sorter.Sorter getSorter()Returns the sorter that is associated with the column. Returns: the [gtk.sorter.Sorter] of self
string getTitle()Returns the title set with [gtk.columnviewcolumn.ColumnViewColumn.setTitle]. Returns: The column's title
bool getVisible()Returns whether this column is visible. Returns: true if this column is visible
void setExpand(bool expand)Sets the column to take available extra space.
void setFactory(gtk.list_item_factory.ListItemFactory factory = null)Sets the [gtk.listitemfactory.ListItemFactory] to use for populating list items for this column.
void setFixedWidth(int fixedWidth)If fixed_width is not -1, sets the fixed width of column; otherwise unsets it.
void setHeaderMenu(gio.menu_model.MenuModel menu = null)Sets the menu model that is used to create the context menu for the column header.
void setId(string id = null)Sets the id of this column.
void setResizable(bool resizable)Sets whether this column should be resizable by dragging.
void setSorter(gtk.sorter.Sorter sorter = null)Associates a sorter with the column.
void setTitle(string title = null)Sets the title of this column.
void setVisible(bool visible)Sets whether this column should be visible in views.
Constructors
this(void * ptr, Flag!"Take" take)
this(string title = null, gtk.list_item_factory.ListItemFactory factory = null)Creates a new [gtk.columnviewcolumn.ColumnViewColumn] that uses the given factory for mapping items to widgets.
Methods
T expand(bool propval)Set `expand` property. Params: propval = Column gets share of extra width allocated to the view. Returns: Builder instance for fluent chaining
T factory(gtk.list_item_factory.ListItemFactory propval)Set `factory` property. Params: propval = Factory for populating list items. Returns: Builder instance for fluent chaining
T fixedWidth(int propval)Set `fixedWidth` property. Params: propval = If not -1, this is the width that the column is allocated, regardless of the size of its content. Returns: Builder instance for fluent chaining
T headerMenu(gio.menu_model.MenuModel propval)Set `headerMenu` property. Params: propval = Menu model used to create the context menu for the column header. Returns: Builder instance for fluent chaining
T id(string propval)Set `id` property. Params: propval = An ID for the column.
T resizable(bool propval)Set `resizable` property. Params: propval = Whether this column is resizable. Returns: Builder instance for fluent chaining
T sorter(gtk.sorter.Sorter propval)Set `sorter` property. Params: propval = Sorter for sorting items according to this column. Returns: Builder instance for fluent chaining
T title(string propval)Set `title` property. Params: propval = Title displayed in the header. Returns: Builder instance for fluent chaining
T visible(bool propval)Set `visible` property. Params: propval = Whether this column is visible. Returns: Builder instance for fluent chaining

Fluent builder for [gtk.column_view_column.ColumnViewColumn]