Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: CellViewCtors

[320:14] static extends: object

Alternate constructors for CellView. Usage: CellViewCtors.<name>(...). The primary constructor lives directly on CellView.

Methods

  • newWithContext (object area, object context)

    Creates a new GtkCellView widget with a specific GtkCellArea to layout cells and a specific GtkCellAreaContext. Specifying the same context for a handful of cells lets the underlying area synchronize the geometry for those cells, in this way alignments with cellviews for other rows are possible.

    • @p area is the GtkCellArea to layout cells.
    • @p context is the GtkCellAreaContext in which to calculate cell geometry.
    • @r A new CellView.
  • newWithText (string text)

    Creates a new GtkCellView widget, adds a GtkCellRendererText to it, and makes it show @text.

    • @p text is the text to display in the cell view.
    • @r A new CellView.
  • newWithTexture (object texture)

    Creates a new GtkCellView widget, adds a GtkCellRendererPixbuf to it, and makes it show @texture.

    • @p texture is the image to display in the cell view.
    • @r A new CellView.

class: CellViewMeta

[369:14] static extends: object

Generated metadata helpers for CellView class surfaces.

Methods

  • properties ()

    Returns property metadata for CellView.

    • @r A list.

class: CellView

[25:7] extends: object

A widget displaying a single row of a GtkTreeModel 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 each other (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.

Members

  • handleObj
  • lib
  • retainedCallbacks
  • signalHandlerNames
  • signalSetterHandlers

Methods

  • CellView (markup = null)

    Creates a new GtkCellView widget.

    • @p markup is the text to display in the cell view.
  • toNativeHandle (Source)

    Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from fn.call(...), another generated wrapper exposing handle(), or null. Returns null when the argument carries no pointer.

    • @p Source is the raw handle, raw buffer, wrapper, or null.
    • @r A raw pointer carrier or null when no pointer is present.
  • getLib ()

    Returns the opened native library for this generated wrapper.

    • @r The opened native library.
  • handle ()

    Returns the wrapped NativeHandle.

    • @r The wrapped NativeHandle.
  • isNull ()

    Returns true when the wrapped handle is null.

    • @r A bool.
  • describe ()

    Returns a small string for debugging generated wrappers.

    • @r A string.
  • asWidget ()

    Wraps this handle as Widget.

    • @r A Widget object.
  • asAccessible ()

    Wraps this handle as Accessible.

    • @r A Accessible object.
  • asBuildable ()

    Wraps this handle as Buildable.

    • @r A Buildable object.
  • asCellLayout ()

    Wraps this handle as CellLayout.

    • @r A CellLayout object.
  • asConstraintTarget ()

    Wraps this handle as ConstraintTarget.

    • @r A ConstraintTarget object.
  • asOrientable ()

    Wraps this handle as Orientable.

    • @r A Orientable object.
  • getProperty (string Name)

    Reads one generated property by name.

  • setProperty (string Name, Value)

    Writes one generated property by name.

  • setDrawsensitive (bool Value)

    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 the items in submenus might be insensitive). since 3.0

    • @p Value is the new property value.
    • @r None.
  • setFitmodel (bool Value)

    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 doesn't change when different items are selected). since 3.0

    • @p Value is the new property value.
    • @r None.
  • setModel (object Value)

    The model for cell view since 2.10

    • @p Value is the new property value.
    • @r None.
  • get_displayed_row ()

    Returns a GtkTreePath referring to the currently displayed row. If no row is currently displayed, %NULL is returned.

  • get_draw_sensitive ()

    Gets whether @cell_view is configured to draw all of its cells in a sensitive state.

  • get_fit_model ()

    Gets whether @cell_view is configured to request space to fit the entire GtkTreeModel.

  • get_model ()

    Returns the model for @cell_view. If no model is used %NULL is returned.

  • set_displayed_row (object path)

    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 result, but may be a needed intermediate state if say, the model for the GtkCellView becomes temporarily empty.

    • @p path is a GtkTreePath or %NULL to unset..
    • @r None.
  • set_draw_sensitive (bool draw_sensitive)

    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 parent menu item.

    • @p draw_sensitive is whether to draw all cells in a sensitive state..
    • @r None.
  • set_fit_model (bool fit_model)

    Sets whether @cell_view should request space to fit the entire GtkTreeModel. This is used by GtkComboBox to ensure that the cell view displayed on the combo box’s button always gets enough space and does not resize when selection changes.

    • @p fit_model is whether @cell_view should request space for the whole model..
    • @r None.
  • set_model (object model)

    Sets the model for @cell_view. If @cell_view 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.

    • @p model is a GtkTreeModel.
    • @r None.