gi-gtk-4.0.4: Gtk bindings
CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
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

newtype MultiSorter Source #

Memory-managed wrapper type.

Constructors

MultiSorter (ManagedPtr MultiSorter) 

Instances

Instances details
Eq MultiSorter Source # 
Instance details

Defined in GI.Gtk.Objects.MultiSorter

GObject MultiSorter Source # 
Instance details

Defined in GI.Gtk.Objects.MultiSorter

ManagedPtrNewtype MultiSorter Source # 
Instance details

Defined in GI.Gtk.Objects.MultiSorter

Methods

toManagedPtr :: MultiSorter -> ManagedPtr MultiSorter

TypedObject MultiSorter Source # 
Instance details

Defined in GI.Gtk.Objects.MultiSorter

Methods

glibType :: IO GType

HasParentTypes MultiSorter Source # 
Instance details

Defined in GI.Gtk.Objects.MultiSorter

IsGValue (Maybe MultiSorter) Source #

Convert MultiSorter to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.Gtk.Objects.MultiSorter

Methods

gvalueGType_ :: IO GType

gvalueSet_ :: Ptr GValue -> Maybe MultiSorter -> IO ()

gvalueGet_ :: Ptr GValue -> IO (Maybe MultiSorter)

type ParentTypes MultiSorter Source # 
Instance details

Defined in GI.Gtk.Objects.MultiSorter

type ParentTypes MultiSorter = '[Sorter, Object, ListModel, Buildable]

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 MultiSorter

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

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 MultiSorter

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