Returns the primary sort column.
The primary sort column is the one that displays the triangle in a column view header.
Sorts Gtk::ColumnView
columns.
The sorter returned by Gtk::ColumnView#sorter
is
a Gtk::ColumnViewSorter
.
In column views, sorting can be configured by associating
sorters with columns, and users can invert sort order by clicking
on column headers. The API of Gtk::ColumnViewSorter
is designed
to allow saving and restoring this configuration.
If you are only interested in the primary sort column (i.e. the column where a sort indicator is shown in the header), then you can just look at [property@Gtk.ColumnViewSorter:primary-sort-column] and [property@Gtk.ColumnViewSorter:primary-sort-order].
If you want to store the full sort configuration, including
secondary sort columns that are used for tie breaking, then
you can use Gtk::ColumnViewSorter#nth_sort_column
.
To get notified about changes, use Gtk::Sorter::#changed
.
To restore a saved sort configuration on a Gtk::ColumnView
,
use code like:
sorter = gtk_column_view_get_sorter (view);
for (i = gtk_column_view_sorter_get_n_sort_columns (sorter) - 1; i >= 0; i--)
{
column = gtk_column_view_sorter_get_nth_sort_column (sorter, i, &order);
gtk_column_view_sort_by_column (view, column, order);
}
Initialize a new ColumnViewSorter
.
Returns the type id (GType) registered in GLib type system.
Returns true
if this reference is the same as other.
See Object#hash(hasher)
Returns the number of columns by which the sorter sorts.
Gets the position'th sort column and its associated sort order.
Returns the primary sort column.
Returns the primary sort order.
Gtk::Sorter
Gtk::Sorter
Gtk::Sorter
GObject::Object
GObject::Object
GObject::Object
GObject::Object
Returns true
if this reference is the same as other. Invokes same?
.
Returns the number of columns by which the sorter sorts.
If the sorter of the primary sort column does not determine a total order, then the secondary sorters are consulted to break the ties.
Use the Gtk::Sorter::#changed
signal to get notified
when the number of sort columns changes.
Gets the position'th sort column and its associated sort order.
Use the Gtk::Sorter::#changed
signal to get notified
when sort columns change.
Returns the primary sort column.
The primary sort column is the one that displays the triangle in a column view header.
Returns the primary sort order.
The primary sort order determines whether the triangle displayed in the column view header of the primary sort column points upwards or downwards.
If there is no primary sort column, then this function returns
GTK_SORT_ASCENDING
.