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

Description

TreeListRowSorter is a special-purpose sorter that will apply a given sorter to the levels in a tree, while respecting the tree structure.

Here is an example for setting up a column view with a tree model and a GtkTreeListSorter:

column_sorter = gtk_column_view_get_sorter (view);
sorter = gtk_tree_list_row_sorter_new (g_object_ref (column_sorter));
sort_model = gtk_sort_list_model_new (tree_model, sorter);
selection = gtk_single_selection_new (sort_model);
gtk_column_view_set_model (view, G_LIST_MODEL (selection));
Synopsis

Exported types

newtype TreeListRowSorter Source #

Memory-managed wrapper type.

Constructors

TreeListRowSorter (ManagedPtr TreeListRowSorter) 

Instances

Instances details
Eq TreeListRowSorter Source # 
Instance details

Defined in GI.Gtk.Objects.TreeListRowSorter

GObject TreeListRowSorter Source # 
Instance details

Defined in GI.Gtk.Objects.TreeListRowSorter

ManagedPtrNewtype TreeListRowSorter Source # 
Instance details

Defined in GI.Gtk.Objects.TreeListRowSorter

TypedObject TreeListRowSorter Source # 
Instance details

Defined in GI.Gtk.Objects.TreeListRowSorter

Methods

glibType :: IO GType

HasParentTypes TreeListRowSorter Source # 
Instance details

Defined in GI.Gtk.Objects.TreeListRowSorter

IsGValue (Maybe TreeListRowSorter) Source #

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

Instance details

Defined in GI.Gtk.Objects.TreeListRowSorter

Methods

gvalueGType_ :: IO GType

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

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

type ParentTypes TreeListRowSorter Source # 
Instance details

Defined in GI.Gtk.Objects.TreeListRowSorter

type ParentTypes TreeListRowSorter = '[Sorter, Object]

class (GObject o, IsDescendantOf TreeListRowSorter o) => IsTreeListRowSorter o Source #

Type class for types which can be safely cast to TreeListRowSorter, for instance with toTreeListRowSorter.

Instances

Instances details
(GObject o, IsDescendantOf TreeListRowSorter o) => IsTreeListRowSorter o Source # 
Instance details

Defined in GI.Gtk.Objects.TreeListRowSorter

toTreeListRowSorter :: (MonadIO m, IsTreeListRowSorter o) => o -> m TreeListRowSorter Source #

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

Methods

getSorter

treeListRowSorterGetSorter Source #

Arguments

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

self: a TreeListRowSorter

-> m (Maybe Sorter)

Returns: the sorter used

Returns the sorter used by self.

new

treeListRowSorterNew Source #

Arguments

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

sorter: a Sorter, or Nothing

-> m TreeListRowSorter

Returns: a new TreeListRowSorter

Create a special-purpose sorter that applies the sorting of sorter to the levels of a TreeListModel.

Note that this sorter relies on TreeListModel:passthrough being False as it can only sort GtkTreeListRows.

setSorter

treeListRowSorterSetSorter Source #

Arguments

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

self: a TreeListRowSorter

-> Maybe b

sorter: The sorter to use, or Nothing

-> m () 

Sets the sorter to use for items with the same parent.

This sorter will be passed the TreeListRow:item of the tree list rows passed to self.

Properties

sorter

The underlying sorter

clearTreeListRowSorterSorter :: (MonadIO m, IsTreeListRowSorter o) => o -> m () Source #

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

clear #sorter

constructTreeListRowSorterSorter :: (IsTreeListRowSorter o, MonadIO m, IsSorter a) => a -> m (GValueConstruct o) Source #

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

getTreeListRowSorterSorter :: (MonadIO m, IsTreeListRowSorter o) => o -> m (Maybe Sorter) Source #

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

get treeListRowSorter #sorter

setTreeListRowSorterSorter :: (MonadIO m, IsTreeListRowSorter o, IsSorter a) => o -> a -> m () Source #

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

set treeListRowSorter [ #sorter := value ]