Toc Gallery Index Tree Gtk.Tree_Sortable

Implemented by

Description

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

Types

Subprograms

  • function Get_Type return Glib.GType;
    Returns the internal type used for a Gtk_Tree_Sortable
  • procedure Set_Sort_Column_Id (Sortable : Gtk_Tree_Sortable; Sort_Column_Id : Gint; Order : Gtk.Enums.Gtk_Sort_Type);
    procedure Get_Sort_Column_Id (Sortable : Gtk_Tree_Sortable; Sort_Column_Id : out Gint; Order : out Gtk.Enums.Gtk_Sort_Type);
    Sets the current sort column to be Sort_Column_Id. The Sortable will resort itself to reflect this change, after emitting sort_column_changed signal. If Sort_Column_Id is Default_Sort_Column_Id, then the default sort function will be used, if it is set.
  • procedure Set_Default_Sort_Func (Sortable : Gtk_Tree_Sortable; Sort_Func : Gtk_Tree_Iter_Compare_Func);
    function Has_Default_Sort_Func (Sortable : Gtk_Tree_Sortable) return Boolean;
    Sets the default comparison function used when sorting to be Sort_Func. If the current sort column id of Sortable is Default_Sort_Column_Id, then the model will sort using this function. If Sort_Func 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 Sortable is Default_Sort_Column_Id, the model will be unsorted.
  • procedure Set_Sort_Func (Sortable : Gtk_Tree_Sortable; Sort_Column_Id : Gint; Sort_Func : Gtk_Tree_Iter_Compare_Func);
    Sets the comparison function used when sorting to be Sort_Func. If the current sort column id of Sortable is the same as Sort_Column_Id, then the model will sort using this function.
  • procedure Set_Default_Sort_Func (Sortable : Gtk_Tree_Sortable; Sort_Func : Gtk_Tree_Iter_Compare_Func; User_Data : Data_Type; Destroy : Destroy_Notify := null);
    procedure Set_Sort_Func (Sortable : Gtk_Tree_Sortable; Sort_Column_Id : Gint; Sort_Func : Gtk_Tree_Iter_Compare_Func; User_Data : Data_Type; Destroy : Destroy_Notify := null);
    Same as above, but an additional user data can be passed to the sort function.
  • Signals

    The following new signals are defined for this widget:
  • procedure Sort_Column_Changed (Sortable : Gtk_Tree_Sortable);
    Emits sort_column_changed signal

Signals

  • sort_column_changed
    procedure Handler (Sortable : Gtk_Tree_Sortable);
    Emitted when the sort column is changed through Set_Sort_Column_Id

Alphabetical Index