Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
GtkNumericSorter is a Sorter
that compares numbers.
To obtain the numbers to compare, this sorter evaluates a Expression
.
Synopsis
- newtype NumericSorter = NumericSorter (ManagedPtr NumericSorter)
- class (GObject o, IsDescendantOf NumericSorter o) => IsNumericSorter o
- toNumericSorter :: (MonadIO m, IsNumericSorter o) => o -> m NumericSorter
- numericSorterGetExpression :: (HasCallStack, MonadIO m, IsNumericSorter a) => a -> m (Maybe Expression)
- numericSorterGetSortOrder :: (HasCallStack, MonadIO m, IsNumericSorter a) => a -> m SortType
- numericSorterNew :: (HasCallStack, MonadIO m, IsExpression a) => Maybe a -> m NumericSorter
- numericSorterSetExpression :: (HasCallStack, MonadIO m, IsNumericSorter a, IsExpression b) => a -> Maybe b -> m ()
- numericSorterSetSortOrder :: (HasCallStack, MonadIO m, IsNumericSorter a) => a -> SortType -> m ()
- clearNumericSorterExpression :: (MonadIO m, IsNumericSorter o) => o -> m ()
- constructNumericSorterExpression :: (IsNumericSorter o, MonadIO m, IsExpression a) => a -> m (GValueConstruct o)
- getNumericSorterExpression :: (MonadIO m, IsNumericSorter o) => o -> m (Maybe Expression)
- setNumericSorterExpression :: (MonadIO m, IsNumericSorter o, IsExpression a) => o -> a -> m ()
- constructNumericSorterSortOrder :: (IsNumericSorter o, MonadIO m) => SortType -> m (GValueConstruct o)
- getNumericSorterSortOrder :: (MonadIO m, IsNumericSorter o) => o -> m SortType
- setNumericSorterSortOrder :: (MonadIO m, IsNumericSorter o) => o -> SortType -> m ()
Exported types
newtype NumericSorter Source #
Memory-managed wrapper type.
NumericSorter (ManagedPtr NumericSorter) |
Instances
Eq NumericSorter Source # | |
Defined in GI.Gtk.Objects.NumericSorter (==) :: NumericSorter -> NumericSorter -> Bool # (/=) :: NumericSorter -> NumericSorter -> Bool # | |
GObject NumericSorter Source # | |
Defined in GI.Gtk.Objects.NumericSorter | |
ManagedPtrNewtype NumericSorter Source # | |
Defined in GI.Gtk.Objects.NumericSorter toManagedPtr :: NumericSorter -> ManagedPtr NumericSorter | |
TypedObject NumericSorter Source # | |
Defined in GI.Gtk.Objects.NumericSorter | |
HasParentTypes NumericSorter Source # | |
Defined in GI.Gtk.Objects.NumericSorter | |
IsGValue (Maybe NumericSorter) Source # | Convert |
Defined in GI.Gtk.Objects.NumericSorter gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe NumericSorter -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe NumericSorter) | |
type ParentTypes NumericSorter Source # | |
Defined in GI.Gtk.Objects.NumericSorter |
class (GObject o, IsDescendantOf NumericSorter o) => IsNumericSorter o Source #
Type class for types which can be safely cast to NumericSorter
, for instance with toNumericSorter
.
Instances
(GObject o, IsDescendantOf NumericSorter o) => IsNumericSorter o Source # | |
Defined in GI.Gtk.Objects.NumericSorter |
toNumericSorter :: (MonadIO m, IsNumericSorter o) => o -> m NumericSorter Source #
Cast to NumericSorter
, 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
bindProperty, bindPropertyFull, changed, compare, forceFloating, freezeNotify, getv, isFloating, notify, notifyByPspec, ref, refSink, runDispose, stealData, stealQdata, thawNotify, unref, watchClosure.
Getters
getData, getExpression, getOrder, getProperty, getQdata, getSortOrder.
Setters
setData, setDataFull, setExpression, setProperty, setSortOrder.
getExpression
numericSorterGetExpression Source #
:: (HasCallStack, MonadIO m, IsNumericSorter a) | |
=> a |
|
-> m (Maybe Expression) | Returns: a |
Gets the expression that is evaluated to obtain numbers from items.
getSortOrder
numericSorterGetSortOrder Source #
:: (HasCallStack, MonadIO m, IsNumericSorter a) | |
=> a |
|
-> m SortType | Returns: the order of the numbers |
Gets whether this sorter will sort smaller numbers first.
new
:: (HasCallStack, MonadIO m, IsExpression a) | |
=> Maybe a |
|
-> m NumericSorter | Returns: a new |
Creates a new numeric sorter using the given expression
.
Smaller numbers will be sorted first. You can call
numericSorterSetSortOrder
to change this.
setExpression
numericSorterSetExpression Source #
:: (HasCallStack, MonadIO m, IsNumericSorter a, IsExpression b) | |
=> a |
|
-> Maybe b |
|
-> m () |
Sets the expression that is evaluated to obtain numbers from items.
Unless an expression is set on self
, the sorter will always
compare items as invalid.
The expression must have a return type that can be compared
numerically, such as G_TYPE_INT
or G_TYPE_DOUBLE
.
setSortOrder
numericSorterSetSortOrder Source #
:: (HasCallStack, MonadIO m, IsNumericSorter a) | |
=> a |
|
-> SortType |
|
-> m () |
Sets whether to sort smaller numbers before larger ones.
Properties
expression
The expression to evaluate on items to get a number to compare with
clearNumericSorterExpression :: (MonadIO m, IsNumericSorter o) => o -> m () Source #
Set the value of the “expression
” property to Nothing
.
When overloading is enabled, this is equivalent to
clear
#expression
constructNumericSorterExpression :: (IsNumericSorter o, MonadIO m, IsExpression a) => a -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “expression
” property. This is rarely needed directly, but it is used by new
.
getNumericSorterExpression :: (MonadIO m, IsNumericSorter o) => o -> m (Maybe Expression) Source #
Get the value of the “expression
” property.
When overloading is enabled, this is equivalent to
get
numericSorter #expression
setNumericSorterExpression :: (MonadIO m, IsNumericSorter o, IsExpression a) => o -> a -> m () Source #
Set the value of the “expression
” property.
When overloading is enabled, this is equivalent to
set
numericSorter [ #expression:=
value ]
sortOrder
Whether the sorter will sort smaller numbers first
constructNumericSorterSortOrder :: (IsNumericSorter o, MonadIO m) => SortType -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “sort-order
” property. This is rarely needed directly, but it is used by new
.
getNumericSorterSortOrder :: (MonadIO m, IsNumericSorter o) => o -> m SortType Source #
Get the value of the “sort-order
” property.
When overloading is enabled, this is equivalent to
get
numericSorter #sortOrder
setNumericSorterSortOrder :: (MonadIO m, IsNumericSorter o) => o -> SortType -> m () Source #
Set the value of the “sort-order
” property.
When overloading is enabled, this is equivalent to
set
numericSorter [ #sortOrder:=
value ]