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
ColumnViewColumn self()Returns `this`, for use in `with` statements.ColumnViewColumnGidBuilder builder()Get builder for [gtk.columnviewcolumn.ColumnViewColumn] Returns: New builder objectgtk.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.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.void title(string propval) @propertySet `title` property. Params: propval = Title displayed in the header.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 expandsgtk.list_item_factory.ListItemFactory getFactory()Gets the factory that's currently used to populate list items for this column. Returns: The factory in useint getFixedWidth()Gets the fixed width of the column. Returns: the fixed with of the columngio.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 IDbool getResizable()Returns whether this column is resizable. Returns: true if this column is resizablegtk.sorter.Sorter getSorter()Returns the sorter that is associated with the column. Returns: the [gtk.sorter.Sorter] of selfstring getTitle()Returns the title set with [gtk.columnviewcolumn.ColumnViewColumn.setTitle]. Returns: The column's titlebool getVisible()Returns whether this column is visible. Returns: true if this column is visiblevoid 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(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 chainingT factory(gtk.list_item_factory.ListItemFactory propval)Set `factory` property. Params: propval = Factory for populating list items. Returns: Builder instance for fluent chainingT 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 chainingT 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 chainingT 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 chainingT sorter(gtk.sorter.Sorter propval)Set `sorter` property. Params: propval = Sorter for sorting items according to this column. Returns: Builder instance for fluent chainingT title(string propval)Set `title` property. Params: propval = Title displayed in the header. Returns: Builder instance for fluent chainingT visible(bool propval)Set `visible` property. Params: propval = Whether this column is visible. Returns: Builder instance for fluent chainingFluent builder for [gtk.column_view_column.ColumnViewColumn]
Methods