Class ListBoxRow

All Implemented Interfaces:
PointerInterface
Direct Known Subclasses:
PreferencesRow

public class ListBoxRow extends Widget
`GtkListBoxRow` is the kind of widget that can be added to a `GtkListBox`.

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

  • Field Details

  • Constructor Details

    • ListBoxRow

      public ListBoxRow(PointerContainer pointer)
    • ListBoxRow

      public ListBoxRow()
      Creates a new `GtkListBoxRow`.
  • Method Details

    • getClassHandler

      public static ClassHandler getClassHandler()
    • changed

      public void changed()
      Marks @row as changed, causing any state that depends on this
      to be updated.

      This affects sorting, filtering and headers.

      Note that calls to this method must be in sync with the data
      used for the row functions. For instance, if the list is
      mirroring some external data set, and *two* rows changed in the
      external data set then when you call gtk_list_box_row_changed()
      on the first row the sort function must only read the new data
      for the first of the two changed rows, otherwise the resorting
      of the rows will be wrong.

      This generally means that if you don’t fully control the data
      model you have to duplicate the data that affects the listbox
      row functions into the row widgets themselves. Another alternative
      is to call [method@Gtk.ListBox.invalidate_sort] on any model change,
      but that is more expensive.
    • getActivatable

      public boolean getActivatable()
      Gets whether the row is activatable.
      Returns:
      %TRUE if the row is activatable
    • getChild

      public Widget getChild()
      Gets the child widget of @row.
      Returns:
      the child widget of @row
    • getHeader

      public Widget getHeader()
      Returns the current header of the @row.

      This can be used
      in a [callback@Gtk.ListBoxUpdateHeaderFunc] to see if
      there is a header set already, and if so to update
      the state of it.
      Returns:
      the current header
    • getIndex

      public int getIndex()
      Gets the current index of the @row in its `GtkListBox` container.
      Returns:
      the index of the @row, or -1 if the @row is not in a listbox
    • getSelectable

      public boolean getSelectable()
      Gets whether the row can be selected.
      Returns:
      %TRUE if the row is selectable
    • isSelected

      public boolean isSelected()
      Returns whether the child is currently selected in its
      `GtkListBox` container.
      Returns:
      %TRUE if @row is selected
    • setActivatable

      public void setActivatable(boolean activatable)
      Set whether the row is activatable.
      Parameters:
      activatable - %TRUE to mark the row as activatable
    • setChild

      public void setChild(@Nullable Widget child)
      Sets the child widget of @self.
      Parameters:
      child - the child widget
    • setHeader

      public void setHeader(@Nullable Widget header)
      Sets the current header of the @row.

      This is only allowed to be called
      from a [callback@Gtk.ListBoxUpdateHeaderFunc].
      It will replace any existing header in the row,
      and be shown in front of the row in the listbox.
      Parameters:
      header - the header
    • setSelectable

      public void setSelectable(boolean selectable)
      Set whether the row can be selected.
      Parameters:
      selectable - %TRUE to mark the row as selectable
    • onActivate

      public SignalHandler onActivate(ListBoxRow.OnActivate signal)
      Connect to signal "activate".
      See ListBoxRow.OnActivate.onActivate() for signal description.
      Field SIGNAL_ON_ACTIVATE 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.
    • asAccessible

      public Accessible asAccessible()
      Implements interface Accessible. Call this to get access to interface functions.
      Overrides:
      asAccessible in class Widget
      Returns:
      Accessible
    • asActionable

      public Actionable asActionable()
      Implements interface Actionable. Call this to get access to interface functions.
      Returns:
      Actionable
    • asBuildable

      public Buildable asBuildable()
      Implements interface Buildable. Call this to get access to interface functions.
      Overrides:
      asBuildable in class Widget
      Returns:
      Buildable
    • asConstraintTarget

      public ConstraintTarget asConstraintTarget()
      Implements interface ConstraintTarget. Call this to get access to interface functions.
      Overrides:
      asConstraintTarget in class Widget
      Returns:
      ConstraintTarget
    • 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()