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.

Methods
GType _gType() @property
CellView self()Returns `this`, for use in `with` statements.
CellViewGidBuilder builder()Get builder for [gtk.cell_view.CellView] Returns: New builder object
void background(string propval) @property
gdk.color.Color backgroundGdk() @propertyGet `backgroundGdk` property. Returns: The background color as a #GdkColor
void backgroundGdk(gdk.color.Color propval) @propertySet `backgroundGdk` property. Params: propval = The background color as a #GdkColor
gdk.rgba.RGBA backgroundRgba() @propertyGet `backgroundRgba` property. Returns: The background color as a #GdkRGBA
void backgroundRgba(gdk.rgba.RGBA propval) @propertySet `backgroundRgba` property. Params: propval = The background color as a #GdkRGBA
bool backgroundSet() @property
void backgroundSet(bool propval) @property
gtk.cell_area.CellArea cellArea() @propertyGet `cellArea` property. Returns: The #GtkCellArea rendering cells
gtk.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...
gtk.tree_model.TreeModel model() @propertyGet `model` property. Returns: The model for cell view
void model(gtk.tree_model.TreeModel propval) @propertySet `model` property. Params: propval = The model for cell view
gtk.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 null
bool 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 state
bool 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 null
bool 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.
Constructors
this(void * ptr, Flag!"Take" take)
this()Creates a new #GtkCellView widget. Returns: A newly created #GtkCellView widget.
Methods
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 chaining
T backgroundRgba(gdk.rgba.RGBA propval)Set `backgroundRgba` property. Params: propval = The background color as a #GdkRGBA Returns: Builder instance for fluent chaining
T backgroundSet(bool propval)
T cellArea(gtk.cell_area.CellArea propval)Set `cellArea` property. Params: propval = The #GtkCellArea rendering cells
T 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

Fluent builder for [gtk.cell_view.CellView]

Methods