Interface TreeSortable

All Superinterfaces:
Proxy, TreeModel
All Known Implementing Classes:
ListStore, TreeModelSort, TreeSortable.TreeSortable$Impl, TreeStore

@Generated("org.javagi.JavaGI") @Deprecated public interface TreeSortable extends Proxy, TreeModel
Deprecated.
There is no replacement for this interface. You should use SortListModel to wrap your list model instead

The interface for sortable models used by GtkTreeView

GtkTreeSortable is an interface to be implemented by tree models which support sorting. The GtkTreeView uses the methods provided by this interface to sort the model.

  • Method Details

    • getType

      static @Nullable Type getType()
      Deprecated.
      Get the GType of the TreeSortable class.
      Returns:
      the GType
    • getSortColumnId

      @Deprecated default boolean getSortColumnId(Out<Integer> sortColumnId, Out<SortType> order)
      Deprecated.
      Fills in sortColumnId and order with the current sort column and the order. It returns true unless the sortColumnId is GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID or GTK_TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID.
      Parameters:
      sortColumnId - The sort column id to be filled in
      order - The GtkSortType to be filled in
      Returns:
      true if the sort column is not one of the special sort column ids.
    • hasDefaultSortFunc

      @Deprecated default boolean hasDefaultSortFunc()
      Deprecated.
      Returns true if the model has a default sort function. This is used primarily by GtkTreeViewColumns in order to determine if a model can go back to the default state, or not.
      Returns:
      true, if the model has a default sort function
    • setDefaultSortFunc

      @Deprecated default void setDefaultSortFunc(@Nullable TreeIterCompareFunc sortFunc)
      Deprecated.

      Sets the default comparison function used when sorting to be sortFunc. If the current sort column id of this TreeSortable is GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID, then the model will sort using this function.

      If sortFunc is null, then there will be no default comparison function. This means that once the model has been sorted, it can’t go back to the default state. In this case, when the current sort column id of this TreeSortable is GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID, the model will be unsorted.

      Parameters:
      sortFunc - The comparison function
    • setSortColumnId

      @Deprecated default void setSortColumnId(int sortColumnId, SortType order)
      Deprecated.

      Sets the current sort column to be sortColumnId. The this TreeSortable will resort itself to reflect this change, after emitting a GtkTreeSortable::sort-column-changed signal. sortColumnId may either be a regular column id, or one of the following special values:

      • GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID: the default sort function will be used, if it is set

      • GTK_TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID: no sorting will occur

      Parameters:
      sortColumnId - the sort column id to set
      order - The sort order of the column
    • setSortFunc

      @Deprecated default void setSortFunc(int sortColumnId, @Nullable TreeIterCompareFunc sortFunc)
      Deprecated.
      Sets the comparison function used when sorting to be sortFunc. If the current sort column id of this TreeSortable is the same as sortColumnId, then the model will sort using this function.
      Parameters:
      sortColumnId - the sort column id to set the function for
      sortFunc - The comparison function
    • sortColumnChanged

      @Deprecated default void sortColumnChanged()
      Deprecated.
      Emits a GtkTreeSortable::sort-column-changed signal on sortable.
    • onSortColumnChanged

      Deprecated.
      The ::sort-column-changed signal is emitted when the sort column or sort order of sortable is changed. The signal is emitted before the contents of sortable are resorted.
      Parameters:
      handler - the signal handler
      Returns:
      a signal handler ID to keep track of the signal connection
      See Also:
    • emitSortColumnChanged

      default void emitSortColumnChanged()
      Deprecated.
      Emits the "sort-column-changed" signal. See onSortColumnChanged(TreeSortable.SortColumnChangedCallback).