Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
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
- newtype MultiSorter = MultiSorter (ManagedPtr MultiSorter)
- class (GObject o, IsDescendantOf MultiSorter o) => IsMultiSorter o
- toMultiSorter :: (MonadIO m, IsMultiSorter o) => o -> m MultiSorter
- multiSorterAppend :: (HasCallStack, MonadIO m, IsMultiSorter a, IsSorter b) => a -> b -> m ()
- multiSorterNew :: (HasCallStack, MonadIO m) => m MultiSorter
- multiSorterRemove :: (HasCallStack, MonadIO m, IsMultiSorter a) => a -> Word32 -> m ()
- getMultiSorterItemType :: (MonadIO m, IsMultiSorter o) => o -> m GType
- getMultiSorterNItems :: (MonadIO m, IsMultiSorter o) => o -> m Word32
Exported types
newtype MultiSorter Source #
Memory-managed wrapper type.
MultiSorter (ManagedPtr MultiSorter) |
Instances
Eq MultiSorter Source # | |
Defined in GI.Gtk.Objects.MultiSorter (==) :: MultiSorter -> MultiSorter -> Bool # (/=) :: MultiSorter -> MultiSorter -> Bool # | |
GObject MultiSorter Source # | |
Defined in GI.Gtk.Objects.MultiSorter | |
ManagedPtrNewtype MultiSorter Source # | |
Defined in GI.Gtk.Objects.MultiSorter toManagedPtr :: MultiSorter -> ManagedPtr MultiSorter | |
TypedObject MultiSorter Source # | |
Defined in GI.Gtk.Objects.MultiSorter | |
HasParentTypes MultiSorter Source # | |
Defined in GI.Gtk.Objects.MultiSorter | |
IsGValue (Maybe MultiSorter) Source # | Convert |
Defined in GI.Gtk.Objects.MultiSorter gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe MultiSorter -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe MultiSorter) | |
type ParentTypes MultiSorter Source # | |
Defined in GI.Gtk.Objects.MultiSorter |
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
(GObject o, IsDescendantOf MultiSorter o) => IsMultiSorter o Source # | |
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
Click to display all available methods, including inherited ones
Methods
append, bindProperty, bindPropertyFull, changed, compare, forceFloating, freezeNotify, getv, isFloating, itemsChanged, notify, notifyByPspec, ref, refSink, remove, runDispose, stealData, stealQdata, thawNotify, unref, watchClosure.
Getters
getBuildableId, getData, getItem, getItemType, getNItems, getOrder, getProperty, getQdata.
Setters
append
:: (HasCallStack, MonadIO m, IsMultiSorter a, IsSorter b) | |
=> a |
|
-> b |
|
-> 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
:: (HasCallStack, MonadIO m) | |
=> m MultiSorter | Returns: a new |
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
:: (HasCallStack, MonadIO m, IsMultiSorter a) | |
=> a |
|
-> Word32 |
|
-> 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.
Properties
itemType
The type of items. See listModelGetItemType
.
Since: 4.8
getMultiSorterItemType :: (MonadIO m, IsMultiSorter o) => o -> m GType Source #
Get the value of the “item-type
” property.
When overloading is enabled, this is equivalent to
get
multiSorter #itemType
nItems
The number of items. See listModelGetNItems
.
Since: 4.8
getMultiSorterNItems :: (MonadIO m, IsMultiSorter o) => o -> m Word32 Source #
Get the value of the “n-items
” property.
When overloading is enabled, this is equivalent to
get
multiSorter #nItems