gtk.cell_view
Module for [CellView] class
Types 3
A #GtkCellView displays a single row of a #GtkTreeModel using a #GtkCellArea and #GtkCellAreaContext. A #GtkCellAreaContext can be provided to the #GtkCellView at construction time in order to keep the cellview in context of a group of cell views, this ensures that the renderers displayed will be properly aligned with eachother (like the aligned cells in the menus of #GtkComboBox).
#GtkCellView is #GtkOrientable in order to decide in which orientation the underlying #GtkCellAreaContext should be allocated. Taking the #GtkComboBox menu as an example, cellviews should be oriented horizontally if the menus are listed top-to-bottom and thus all share the same width but may have separate individual heights (left-to-right menus should be allocated vertically since they all share the same height but may have variable widths).
CSS nodes
GtkCellView has a single CSS node with name cellview.
CellViewGidBuilder builder()Get builder for [gtk.cell_view.CellView] Returns: New builder objectvoid background(string propval) @propertygdk.color.Color backgroundGdk() @propertyGet `backgroundGdk` property. Returns: The background color as a #GdkColorvoid backgroundGdk(gdk.color.Color propval) @propertySet `backgroundGdk` property. Params: propval = The background color as a #GdkColorgdk.rgba.RGBA backgroundRgba() @propertyGet `backgroundRgba` property. Returns: The background color as a #GdkRGBAvoid backgroundRgba(gdk.rgba.RGBA propval) @propertySet `backgroundRgba` property. Params: propval = The background color as a #GdkRGBAbool backgroundSet() @propertyvoid backgroundSet(bool propval) @propertygtk.cell_area.CellArea cellArea() @propertyGet `cellArea` property. Returns: The #GtkCellArea rendering cellsgtk.cell_area_context.CellAreaContext cellAreaContext() @propertyGet `cellAreaContext` property. Returns: The #GtkCellAreaContext used to compute the geometry of the cell view.bool drawSensitive() @propertyGet `drawSensitive` property. Returns: Whether all cells should be draw as sensitive for this view regardless of the actual cell properties (used to make menus with submenus appear sensitive when t...void drawSensitive(bool propval) @propertySet `drawSensitive` property. Params: propval = Whether all cells should be draw as sensitive for this view regardless of the actual cell properties (used to make menus with submenus appear sensiti...bool fitModel() @propertyGet `fitModel` property. Returns: Whether the view should request enough space to always fit the size of every row in the model (used by the combo box to ensure the combo box size doesnt change whe...void fitModel(bool propval) @propertySet `fitModel` property. Params: propval = Whether the view should request enough space to always fit the size of every row in the model (used by the combo box to ensure the combo box size doesnt c...void model(gtk.tree_model.TreeModel propval) @propertySet `model` property. Params: propval = The model for cell viewgtk.cell_view.CellView newWithContext(gtk.cell_area.CellArea area, gtk.cell_area_context.CellAreaContext context)Creates a new #GtkCellView widget with a specific #GtkCellArea to layout cells and a specific #GtkCellAreaContext.gtk.cell_view.CellView newWithMarkup(string markup)Creates a new #GtkCellView widget, adds a #GtkCellRendererText to it, and makes it show markup. The text can be marked up with the [Pango text markup language][PangoMarkupFormat].gtk.cell_view.CellView newWithPixbuf(gdkpixbuf.pixbuf.Pixbuf pixbuf)Creates a new #GtkCellView widget, adds a #GtkCellRendererPixbuf to it, and makes it show pixbuf.gtk.cell_view.CellView newWithText(string text)Creates a new #GtkCellView widget, adds a #GtkCellRendererText to it, and makes it show text.gtk.tree_path.TreePath getDisplayedRow()Returns a #GtkTreePath referring to the currently displayed row. If no row is currently displayed, null is returned. Returns: the currently displayed row or nullbool getDrawSensitive()Gets whether cellview is configured to draw all of its cells in a sensitive state. Returns: whether cellview draws all of its cells in a sensitive statebool getFitModel()Gets whether cellview is configured to request space to fit the entire #GtkTreeModel. Returns: whether cellview requests space to fit the entire #GtkTreeModel.gtk.tree_model.TreeModel getModel()Returns the model for cell_view. If no model is used null is returned. Returns: a #GtkTreeModel used or nullbool getSizeOfRow(gtk.tree_path.TreePath path, out gtk.requisition.Requisition requisition)Sets requisition to the size needed by cell_view to display the model row pointed to by path.void setBackgroundColor(gdk.color.Color color)Sets the background color of view.void setBackgroundRgba(gdk.rgba.RGBA rgba)Sets the background color of cell_view.void setDisplayedRow(gtk.tree_path.TreePath path = null)Sets the row of the model that is currently displayed by the #GtkCellView. If the path is unset, then the contents of the cellview “stick” at their last value; this is not normally a desired re...void setDrawSensitive(bool drawSensitive)Sets whether cell_view should draw all of its cells in a sensitive state, this is used by #GtkComboBox menus to ensure that rows with insensitive cells that contain children appear sensitive in the...void setFitModel(bool fitModel)Sets whether cell_view should request space to fit the entire #GtkTreeModel.void setModel(gtk.tree_model.TreeModel model = null)Sets the model for cellview. If cellview already has a model set, it will remove it before setting the new model. If model is null, then it will unset the old model.T background(string propval)T backgroundGdk(gdk.color.Color propval)Set `backgroundGdk` property. Params: propval = The background color as a #GdkColor Returns: Builder instance for fluent chainingT backgroundRgba(gdk.rgba.RGBA propval)Set `backgroundRgba` property. Params: propval = The background color as a #GdkRGBA Returns: Builder instance for fluent chainingT backgroundSet(bool propval)T cellArea(gtk.cell_area.CellArea propval)Set `cellArea` property. Params: propval = The #GtkCellArea rendering cellsT cellAreaContext(gtk.cell_area_context.CellAreaContext propval)Set `cellAreaContext` property. Params: propval = The #GtkCellAreaContext used to compute the geometry of the cell view.T drawSensitive(bool propval)Set `drawSensitive` property. Params: propval = Whether all cells should be draw as sensitive for this view regardless of the actual cell properties (used to make menus with submenus appear sensiti...T fitModel(bool propval)Set `fitModel` property. Params: propval = Whether the view should request enough space to always fit the size of every row in the model (used by the combo box to ensure the combo box size doesnt c...T model(gtk.tree_model.TreeModel propval)Set `model` property. Params: propval = The model for cell view