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.MultiSorter

Description

GtkMultiSorter combines multiple sorters by trying them in turn.

If the first sorter compares two items as equal, the second is tried next, and so on.

Synopsis

Exported types

class (GObject o, IsDescendantOf MultiSorter o) => IsMultiSorter o Source #

Type class for types which can be safely cast to MultiSorter, for instance with toMultiSorter.

Instances

Instances details
(GObject o, IsDescendantOf MultiSorter o) => IsMultiSorter o Source # 
Instance details

Defined in GI.Gtk.Objects.MultiSorter

toMultiSorter :: (MonadIO m, IsMultiSorter o) => o -> m MultiSorter Source #

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

Methods

append

multiSorterAppend Source #

Arguments

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

self: a GtkMultiSorter

-> b

sorter: a sorter to add

-> m () 

Add sorter to self to use for sorting at the end.

self will consult all existing sorters before it will sort with the given sorter.

new

multiSorterNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m MultiSorter

Returns: a new GtkMultiSorter

Creates a new multi sorter.

This sorter compares items by trying each of the sorters in turn, until one returns non-zero. In particular, if no sorter has been added to it, it will always compare items as equal.

remove

multiSorterRemove Source #

Arguments

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

self: a GtkMultiSorter

-> Word32

position: position of sorter to remove

-> m () 

Removes the sorter at the given position from the list of sorter used by self.

If position is larger than the number of sorters, nothing happens.