Class TreeListRowSorter

All Implemented Interfaces:
PointerInterface

public class TreeListRowSorter extends Sorter
`GtkTreeListRowSorter` is a special-purpose sorter that will apply a given
sorter to the levels in a tree.

Here is an example for setting up a column view with a tree model and
a `GtkTreeListSorter`:

```c
column_sorter = gtk_column_view_get_sorter (view);
sorter = gtk_tree_list_row_sorter_new (g_object_ref (column_sorter));
sort_model = gtk_sort_list_model_new (tree_model, sorter);
selection = gtk_single_selection_new (sort_model);
gtk_column_view_set_model (view, G_LIST_MODEL (selection));
```

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

  • Constructor Details

    • TreeListRowSorter

      public TreeListRowSorter(PointerContainer pointer)
    • TreeListRowSorter

      public TreeListRowSorter(@Nullable Sorter sorter)
      Create a special-purpose sorter that applies the sorting
      of @sorter to the levels of a `GtkTreeListModel`.

      Note that this sorter relies on [property@Gtk.TreeListModel:passthrough]
      being %FALSE as it can only sort [class@Gtk.TreeListRow]s.
      Parameters:
      sorter - a `GtkSorter`
  • Method Details

    • getClassHandler

      public static ClassHandler getClassHandler()
    • getSorter

      public Sorter getSorter()
      Returns the sorter used by @self.
      Returns:
      the sorter used
    • setSorter

      public void setSorter(@Nullable Sorter sorter)
      Sets the sorter to use for items with the same parent.

      This sorter will be passed the [property@Gtk.TreeListRow:item] of
      the tree list rows passed to @self.
      Parameters:
      sorter - The sorter to use
    • 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()