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

Description

GtkStringSorter is a Sorter that compares strings. It does the comparison in a linguistically correct way using the current locale by normalizing Unicode strings and possibly case-folding them before performing the comparison.

To obtain the strings to compare, this sorter evaluates a Expression.

Synopsis

Exported types

newtype StringSorter Source #

Memory-managed wrapper type.

Constructors

StringSorter (ManagedPtr StringSorter) 

Instances

Instances details
Eq StringSorter Source # 
Instance details

Defined in GI.Gtk.Objects.StringSorter

GObject StringSorter Source # 
Instance details

Defined in GI.Gtk.Objects.StringSorter

ManagedPtrNewtype StringSorter Source # 
Instance details

Defined in GI.Gtk.Objects.StringSorter

Methods

toManagedPtr :: StringSorter -> ManagedPtr StringSorter

TypedObject StringSorter Source # 
Instance details

Defined in GI.Gtk.Objects.StringSorter

Methods

glibType :: IO GType

HasParentTypes StringSorter Source # 
Instance details

Defined in GI.Gtk.Objects.StringSorter

IsGValue (Maybe StringSorter) Source #

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

Instance details

Defined in GI.Gtk.Objects.StringSorter

Methods

gvalueGType_ :: IO GType

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

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

type ParentTypes StringSorter Source # 
Instance details

Defined in GI.Gtk.Objects.StringSorter

type ParentTypes StringSorter = '[Sorter, Object]

class (GObject o, IsDescendantOf StringSorter o) => IsStringSorter o Source #

Type class for types which can be safely cast to StringSorter, for instance with toStringSorter.

Instances

Instances details
(GObject o, IsDescendantOf StringSorter o) => IsStringSorter o Source # 
Instance details

Defined in GI.Gtk.Objects.StringSorter

toStringSorter :: (MonadIO m, IsStringSorter o) => o -> m StringSorter Source #

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

Methods

getExpression

stringSorterGetExpression Source #

Arguments

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

self: a StringSorter

-> m (Maybe Expression)

Returns: a Expression, or Nothing

Gets the expression that is evaluated to obtain strings from items.

getIgnoreCase

stringSorterGetIgnoreCase Source #

Arguments

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

self: a StringSorter

-> m Bool

Returns: True if self is ignoring case differences

Gets whether the sorter ignores case differences.

new

stringSorterNew Source #

Arguments

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

expression: The expression to evaluate

-> m StringSorter

Returns: a new StringSorter

Creates a new string sorter that compares items using the given expression.

Unless an expression is set on it, this sorter will always compare items as invalid.

setExpression

stringSorterSetExpression Source #

Arguments

:: (HasCallStack, MonadIO m, IsStringSorter a, IsExpression b) 
=> a

self: a StringSorter

-> Maybe b

expression: a Expression, or Nothing

-> m () 

Sets the expression that is evaluated to obtain strings from items.

The expression must have the type G_TYPE_STRING.

setIgnoreCase

stringSorterSetIgnoreCase Source #

Arguments

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

self: a StringSorter

-> Bool

ignoreCase: True to ignore case differences

-> m () 

Sets whether the sorter will ignore case differences.

Properties

expression

The expression to evaluate on item to get a string to compare with

clearStringSorterExpression :: (MonadIO m, IsStringSorter o) => o -> m () Source #

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

clear #expression

constructStringSorterExpression :: (IsStringSorter 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.

getStringSorterExpression :: (MonadIO m, IsStringSorter o) => o -> m (Maybe Expression) Source #

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

get stringSorter #expression

setStringSorterExpression :: (MonadIO m, IsStringSorter o, IsExpression a) => o -> a -> m () Source #

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

set stringSorter [ #expression := value ]

ignoreCase

If matching is case sensitive

constructStringSorterIgnoreCase :: (IsStringSorter o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

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

getStringSorterIgnoreCase :: (MonadIO m, IsStringSorter o) => o -> m Bool Source #

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

get stringSorter #ignoreCase

setStringSorterIgnoreCase :: (MonadIO m, IsStringSorter o) => o -> Bool -> m () Source #

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

set stringSorter [ #ignoreCase := value ]