gi-gtk-4.0.5: Gtk bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Gtk.Objects.TreeListRowSorter

Description

GtkTreeListRowSorter is a special-purpose sorter that will apply a given sorter to the levels in a tree.

Here is an example for setting up a column view with a tree model and a GtkTreeListSorter:

c code

column_sorter = gtk_column_view_get_sorter (view);
sorter = gtk_tree_list_row_sorter_new (g_object_ref (column_sorter));
sort_model = gtk_sort_list_model_new (tree_model, sorter);
selection = gtk_single_selection_new (sort_model);
gtk_column_view_set_model (view, G_LIST_MODEL (selection));
Synopsis

Exported types

class (GObject o, IsDescendantOf TreeListRowSorter o) => IsTreeListRowSorter o Source #

Type class for types which can be safely cast to TreeListRowSorter, for instance with toTreeListRowSorter.

Instances

Instances details
(GObject o, IsDescendantOf TreeListRowSorter o) => IsTreeListRowSorter o Source # 
Instance details

Defined in GI.Gtk.Objects.TreeListRowSorter

toTreeListRowSorter :: (MonadIO m, IsTreeListRowSorter o) => o -> m TreeListRowSorter Source #

Cast to TreeListRowSorter, for types for which this is known to be safe. For general casts, use castTo.

Methods

getSorter

treeListRowSorterGetSorter Source #

Arguments

:: (HasCallStack, MonadIO m, IsTreeListRowSorter a) 
=> a

self: a GtkTreeListRowSorter

-> m (Maybe Sorter)

Returns: the sorter used

Returns the sorter used by self.

new

treeListRowSorterNew Source #

Arguments

:: (HasCallStack, MonadIO m, IsSorter a) 
=> Maybe a

sorter: a GtkSorter

-> m TreeListRowSorter

Returns: a new GtkTreeListRowSorter

Create a special-purpose sorter that applies the sorting of sorter to the levels of a GtkTreeListModel.

Note that this sorter relies on TreeListModel:passthrough being False as it can only sort TreeListRows.

setSorter

treeListRowSorterSetSorter Source #

Arguments

:: (HasCallStack, MonadIO m, IsTreeListRowSorter a, IsSorter b) 
=> a

self: a GtkTreeListRowSorter

-> Maybe b

sorter: The sorter to use

-> m () 

Sets the sorter to use for items with the same parent.

This sorter will be passed the TreeListRow:item of the tree list rows passed to self.

Properties

sorter

The underlying sorter

clearTreeListRowSorterSorter :: (MonadIO m, IsTreeListRowSorter o) => o -> m () Source #

Set the value of the “sorter” property to Nothing. When overloading is enabled, this is equivalent to

clear #sorter

constructTreeListRowSorterSorter :: (IsTreeListRowSorter o, MonadIO m, IsSorter a) => a -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “sorter” property. This is rarely needed directly, but it is used by new.

getTreeListRowSorterSorter :: (MonadIO m, IsTreeListRowSorter o) => o -> m (Maybe Sorter) Source #

Get the value of the “sorter” property. When overloading is enabled, this is equivalent to

get treeListRowSorter #sorter

setTreeListRowSorterSorter :: (MonadIO m, IsTreeListRowSorter o, IsSorter a) => o -> a -> m () Source #

Set the value of the “sorter” property. When overloading is enabled, this is equivalent to

set treeListRowSorter [ #sorter := value ]