gtk3-0.15.10: Binding to the Gtk+ 3 graphical user interface library

Maintainer | gtk2hs-users@lists.sourceforge.net
Stability | provisional
Portability | portable (depends on GHC)
Safe Haskell | None
Language | Haskell98

Graphics.UI.Gtk.ModelView.TreeModelSort

Contents

- Detail
- Class Hierarchy
- Types
- Constructors
- Methods
- Orphan instances

Description

A `TreeModel` which makes an underlying tree model sortable

Synopsis

- data TreeModelSort
- class GObjectClass o => TreeModelSortClass o
- castToTreeModelSort :: GObjectClass obj => obj -> TreeModelSort
- gTypeTreeModelSort :: GType
- toTreeModelSort :: TreeModelSortClass o => o -> TreeModelSort
- data TypedTreeModelSort row
- treeModelSortNewWithModel :: (TreeModelClass (childModel row), TypedTreeModelClass childModel) => childModel row -> IO (TypedTreeModelSort row)
- treeModelSortGetModel :: TreeModelSortClass self => self -> IO TreeModel
- treeModelSortConvertChildPathToPath :: TreeModelSortClass self => self -> TreePath -> IO TreePath
- treeModelSortConvertPathToChildPath :: TreeModelSortClass self => self -> TreePath -> IO TreePath
- treeModelSortConvertChildIterToIter :: TreeModelSortClass self => self -> TreeIter -> IO TreeIter
- treeModelSortConvertIterToChildIter :: TreeModelSortClass self => self -> TreeIter -> IO TreeIter
- treeModelSortResetDefaultSortFunc :: TreeModelSortClass self => self -> IO ()
- treeModelSortClearCache :: TreeModelSortClass self => self -> IO ()
- treeModelSortIterIsValid :: TreeModelSortClass self => self -> TreeIter -> IO Bool

# Detail

The `TreeModelSort` is a model which implements the `TreeSortable` interface. It does not hold any data itself, but rather is created with a child model and proxies its data. It has identical rows to its child model, and the changes in the child are propagated. The primary purpose of this model is to provide a way to sort a model without modifying it.

# Class Hierarchy

    | GObject
    | +----TreeModelSort

# Types

data TreeModelSort Source #

#### Instances

Instances details

Eq TreeModelSort Source # |
Instance details Defined in Graphics.UI.Gtk.Types Methods (==) :: TreeModelSort -> TreeModelSort -> Bool Source # (/=) :: TreeModelSort -> TreeModelSort -> Bool Source #
Ord TreeModelSort Source # |

Instance details

Defined in Graphics.UI.Gtk.Types

Methods

compare :: TreeModelSort -> TreeModelSort -> Ordering Source #

(<) :: TreeModelSort -> TreeModelSort -> Bool Source #

(<=) :: TreeModelSort -> TreeModelSort -> Bool Source #

(>) :: TreeModelSort -> TreeModelSort -> Bool Source #

(>=) :: TreeModelSort -> TreeModelSort -> Bool Source #

max :: TreeModelSort -> TreeModelSort -> TreeModelSort Source #

min :: TreeModelSort -> TreeModelSort -> TreeModelSort Source #

GObjectClass TreeModelSort Source # |
Instance details Defined in Graphics.UI.Gtk.Types Methods toGObject :: TreeModelSort -> GObject Source # unsafeCastGObject :: GObject -> TreeModelSort Source #
TreeModelSortClass TreeModelSort Source # |
Instance details Defined in Graphics.UI.Gtk.Types
TreeSortableClass TreeModelSort Source # |
Instance details Defined in Graphics.UI.Gtk.ModelView.TreeModelSort

class GObjectClass o => TreeModelSortClass o Source #

#### Instances

Instances details

TreeModelSortClass TreeModelSort Source # |
Instance details Defined in Graphics.UI.Gtk.Types
TreeModelSortClass (TypedTreeModelSort a) Source # |
Instance details Defined in Graphics.UI.Gtk.ModelView.TreeModelSort

castToTreeModelSort :: GObjectClass obj => obj -> TreeModelSort Source #

gTypeTreeModelSort :: GType Source #

toTreeModelSort :: TreeModelSortClass o => o -> TreeModelSort Source #

data TypedTreeModelSort row Source #

#### Instances

Instances details

TypedTreeModelClass TypedTreeModelSort Source # |
Instance details Defined in Graphics.UI.Gtk.ModelView.Types Methods dummy :: TypedTreeModelSort a -> a
GObjectClass (TypedTreeModelSort a) Source # |
Instance details Defined in Graphics.UI.Gtk.ModelView.TreeModelSort Methods toGObject :: TypedTreeModelSort a -> GObject Source # unsafeCastGObject :: GObject -> TypedTreeModelSort a Source #
TreeModelClass (TypedTreeModelSort a) Source # |
Instance details Defined in Graphics.UI.Gtk.ModelView.TreeModelSort
TreeModelSortClass (TypedTreeModelSort a) Source # |
Instance details Defined in Graphics.UI.Gtk.ModelView.TreeModelSort
TreeSortableClass (TypedTreeModelSort row) Source # |
Instance details Defined in Graphics.UI.Gtk.ModelView.TreeModelSort

# Constructors

treeModelSortNewWithModel :: (TreeModelClass (childModel row), TypedTreeModelClass childModel) => childModel row -> IO (TypedTreeModelSort row) Source #

Creates a new `TreeModelSort`, that will be a sorted view of the given model.

# Methods

treeModelSortGetModel :: TreeModelSortClass self => self -> IO TreeModel Source #

Returns the underlying model the `TreeModelSort` is sorting.

treeModelSortConvertChildPathToPath :: TreeModelSortClass self => self -> TreePath -> IO TreePath Source #

Converts the given path to a path relative to the given sorted model.

- The given path points to a row in the child model. The returned path will point to the same row in the sorted model.

treeModelSortConvertPathToChildPath :: TreeModelSortClass self => self -> TreePath -> IO TreePath Source #

Converts path in the sorted model to a path on the unsorted model on which the given `TreeModelSort` is based. That is, the given path points to a location in the given `TreeModelSort`. The returned path will point to the same location in the underlying unsorted model.

treeModelSortConvertChildIterToIter :: TreeModelSortClass self => self -> TreeIter -> IO TreeIter Source #

Return an iterator in the sorted model that points to the row pointed to by the given iter from the unsorted model.

treeModelSortConvertIterToChildIter :: TreeModelSortClass self => self -> TreeIter -> IO TreeIter Source #

Return an iterator in the unsorted model that points to the row pointed to by the given iter from the sorted model.

treeModelSortResetDefaultSortFunc :: TreeModelSortClass self => self -> IO () Source #

This resets the default sort function. As a consequence, the order of this model will be the same order as that of the child model.

treeModelSortClearCache :: TreeModelSortClass self => self -> IO () Source #

Clear the cache of unref'd iterators.

- This function should almost never be called. It clears the `TreeModelSort` of any cached iterators that haven't been reffed with `treeModelRefNode`. This might be useful if the child model being sorted is static (and doesn't change often) and there has been a lot of unreffed access to nodes. As a side effect of this function, all unreffed iters will be invalid.

treeModelSortIterIsValid Source #

Arguments

:: TreeModelSortClass self |
=> self |
-> TreeIter | `iter` - A `TreeIter`.
-> IO Bool | returns `True` if the iter is valid, `False` if the iter is invalid.

Checks if the given iter is a valid iter for this `TreeModelSort`.

- WARNING: This function is slow. Only use it for debugging and/or testing purposes.
- Available since Gtk+ version 2.2

# Orphan instances

TreeSortableClass TreeModelSort Source # |
Instance details
GObjectClass (TypedTreeModelSort a) Source # |
Instance details Methods toGObject :: TypedTreeModelSort a -> GObject Source # unsafeCastGObject :: GObject -> TypedTreeModelSort a Source #
TreeModelClass (TypedTreeModelSort a) Source # |
Instance details
TreeModelSortClass (TypedTreeModelSort a) Source # |
Instance details
TreeSortableClass (TypedTreeModelSort row) Source # |
Instance details