gtk.column_view_sorter
Module for ColumnViewSorter class
Types 3
gtk.column_view_sorter.ColumnViewSorter is a sorter implementation that is geared towards the needs of gtk.column_view.ColumnView.
The sorter returned by gtk.column_view.ColumnView.getSorter is a gtk.column_view_sorter.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.column_view_sorter.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 gtk.column_view_sorter.ColumnViewSorter.primarySortColumn and gtk.column_view_sorter.ColumnViewSorter.primarySortOrder.
If you want to store the full sort configuration, including secondary sort columns that are used for tie breaking, then you can use gtk.column_view_sorter.ColumnViewSorter.getNthSortColumn. To get notified about changes, use gtk.sorter.Sorter.changed.
To restore a saved sort configuration on a gtk.column_view.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);
}ColumnViewSorter self()Returns `this`, for use in `with` statements.ColumnViewSorterGidBuilder builder()Get builder for [gtk.column_view_sorter.ColumnViewSorter] Returns: New builder objectgtk.column_view_column.ColumnViewColumn primarySortColumn() @propertyGet `primarySortColumn` property. Returns: The primary sort column.gtk.types.SortType primarySortOrder() @propertyGet `primarySortOrder` property. Returns: The primary sort order.uint getNSortColumns()Returns the number of columns by which the sorter sorts.gtk.column_view_column.ColumnViewColumn getNthSortColumn(uint position, out gtk.types.SortType sortOrder)Gets the position'th sort column and its associated sort order.gtk.column_view_column.ColumnViewColumn getPrimarySortColumn()Returns the primary sort column.gtk.types.SortType getPrimarySortOrder()Returns the primary sort order.Fluent builder implementation template for gtk.column_view_sorter.ColumnViewSorter
Fluent builder for gtk.column_view_sorter.ColumnViewSorter
ColumnViewSorter build()Create object from builder. Returns: New object