Class CellRendererText

All Implemented Interfaces:
PointerInterface
Direct Known Subclasses:
CellRendererAccel, CellRendererCombo, CellRendererSpin

public class CellRendererText extends CellRenderer
Renders text in a cell

A `GtkCellRendererText` renders a given text in its cell, using the font, color and
style information provided by its properties. The text will be ellipsized if it is
too long and the `GtkCellRendererText:ellipsize` property allows it.

If the `GtkCellRenderer:mode` is %GTK_CELL_RENDERER_MODE_EDITABLE,
the `GtkCellRendererText` allows to edit its text using an entry.

https://docs.gtk.org/gtk4/class.CellRendererText.html

  • Field Details

  • Constructor Details

    • CellRendererText

      public CellRendererText(PointerContainer pointer)
    • CellRendererText

      public CellRendererText()
      Creates a new `GtkCellRendererText`. Adjust how text is drawn using
      object properties. Object properties can be
      set globally (with g_object_set()). Also, with `GtkTreeViewColumn`,
      you can bind a property to a value in a `GtkTreeModel`. For example,
      you can bind the “text” property on the cell renderer to a string
      value in the model, thus rendering a different string in each row
      of the `GtkTreeView`.
  • Method Details

    • getClassHandler

      public static ClassHandler getClassHandler()
    • setFixedHeightFromFont

      public void setFixedHeightFromFont(int number_of_rows)
      Sets the height of a renderer to explicitly be determined by the “font” and
      “y_pad” property set on it. Further changes in these properties do not
      affect the height, so they must be accompanied by a subsequent call to this
      function. Using this function is inflexible, and should really only be used
      if calculating the size of a cell is too slow (ie, a massive number of cells
      displayed). If @number_of_rows is -1, then the fixed height is unset, and
      the height is determined by the properties again.
      Parameters:
      number_of_rows - Number of rows of text each cell renderer is allocated, or -1
    • onEdited

      public SignalHandler onEdited(CellRendererText.OnEdited signal)
      Connect to signal "edited".
      See CellRendererText.OnEdited.onEdited(ch.bailu.gtk.type.Str, ch.bailu.gtk.type.Str) for signal description.
      Field SIGNAL_ON_EDITED contains original signal name and can be used as resource reference.
      Parameters:
      signal - callback function (lambda).
      Returns:
      SignalHandler. Can be used to disconnect signal and to release callback function.
    • getTypeID

      public static long getTypeID()
    • getParentTypeID

      public static long getParentTypeID()
    • getTypeSize

      public static TypeSystem.TypeSize getTypeSize()
    • getParentTypeSize

      public static TypeSystem.TypeSize getParentTypeSize()
    • getInstanceSize

      public static int getInstanceSize()