Class ListBase

All Implemented Interfaces:
Accessible, Buildable, ConstraintTarget, Orientable, Scrollable, Proxy
Direct Known Subclasses:
GridView, ListBase.ListBase$Impl, ListView

@Generated("org.javagi.JavaGI") public abstract class ListBase extends Widget implements Accessible, Buildable, ConstraintTarget, Orientable, Scrollable

The abstract base class for GTK's list widgets.

Shortcuts and Gestures

GtkListBase supports the following keyboard shortcuts:

  • Ctrl+A or Ctrl+/ selects all items.
  • Ctrl+Shift+A or Ctrl+\ unselects all items.

The focused item is controlled by the navigation keys below, combined with the Ctrl modifier to prevent moving the selection, and the Shift modifier to extend the current selection.

  • , , , move the focus on the next item in the designed direction.
  • Home and End focus the first or last item.
  • PgUp and PgDn move the focus one page up or down.

List item widgets support the following keyboard shortcuts:

  • Enter activates the item.
  • selects the item, with the same Ctrl and Shift modifiers combinations as the navigation keys.

Actions

GtkListBase defines a set of built-in actions:

  • list.scroll-to-item moves the visible area to the item at given position with the minimum amount of scrolling required. If the item is already visible, nothing happens.
  • list.select-item changes the selection.
  • list.select-all selects all items in the model, if the selection model supports it.
  • list.unselect-all unselects all items in the model, if the selection model supports it.

List item widgets install the following actions:

  • listitem.select changes selection if the item is selectable.
  • listitem.scroll-to moves the visible area of the list to this item with the minimum amount of scrolling required.
  • Constructor Details

    • ListBase

      public ListBase(MemorySegment address)
      Create a ListBase instance for the provided memory address.
      Parameters:
      address - the memory address of the native object
    • ListBase

      public ListBase()
      Create a new ListBase.
  • Method Details

    • getType

      public static @Nullable Type getType()
      Get the GType of the ListBase class.
      Returns:
      the GType
    • getMemoryLayout

      public static MemoryLayout getMemoryLayout()
      The memory layout of the native struct.
      Returns:
      the memory layout
    • asParent

      protected ListBase asParent()
      Return this instance as if it were its parent type. Comparable to the Java super keyword, but ensures the parent typeclass is also used in native code.
      Overrides:
      asParent in class Widget
      Returns:
      the instance as if it were its parent type