Module: Gtk::TreeSortable
- Defined in:
- lib/gtk4/tree-sortable.rb
Overview
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.
Instance Method Summary collapse
-
#get_sort_column_id(sortable, sort_column_id, order) ⇒ Boolean
True if the sort column is not one of the special sort column ids.
-
#has_default_sort_func(sortable) ⇒ Boolean
True, if the model has a default sort function.
- #set_default_sort_func(sortable, sort_func, user_data, destroy) ⇒ nil
- #set_sort_column_id(sortable, sort_column_id, order) ⇒ nil
- #set_sort_func(sort_column_id) ⇒ nil
- #set_sort_func_raw ⇒ nil
- #sort_column_changed(sortable) ⇒ nil
Instance Method Details
#get_sort_column_id(sortable, sort_column_id, order) ⇒ Boolean
Returns true if the sort column is not one of the special sort column ids.
#has_default_sort_func(sortable) ⇒ Boolean
Returns true, if the model has a default sort function.
#set_default_sort_func(sortable, sort_func, user_data, destroy) ⇒ nil
#set_sort_column_id(sortable, sort_column_id, order) ⇒ nil
#set_sort_func(sort_column_id) ⇒ nil
20 21 22 23 24 25 26 |
# File 'lib/gtk4/tree-sortable.rb', line 20 def set_sort_func(sort_column_id) set_sort_func_raw(sort_column_id) do |model, iter1, iter2| iter1.model = model iter2.model = model yield(model, iter1, iter2) end end |
#set_sort_func_raw ⇒ nil
|
|
# File 'lib/gtk4/tree-sortable.rb', line 19
|