gi-gtk-hs-0.3.18: A wrapper for gi-gtk, adding a few more idiomatic API parts on top

Stability | provisional
Portability | portable (depends on GHC)
Safe Haskell | None
Language | Haskell2010

Data.GI.Gtk.ModelView.Types

Description

Common types and classes for the ModelView modules.

Synopsis

- newtype TypedTreeModel row = TypedTreeModel (ManagedPtr (TypedTreeModel row))
- class IsTypedTreeModel (model :: Type -> Type)
- toTypedTreeModel :: IsTypedTreeModel model => model row -> TypedTreeModel row
- unsafeTreeModelToGeneric :: TreeModel -> model row
- newtype TypedTreeModelSort row = TypedTreeModelSort (ManagedPtr (TypedTreeModelSort row))
- unsafeTreeModelSortToGeneric :: TreeModelSort -> TypedTreeModelSort row
- newtype TypedTreeModelFilter row = TypedTreeModelFilter (ManagedPtr (TypedTreeModelFilter row))
- unsafeTreeModelFilterToGeneric :: TreeModelFilter -> TypedTreeModelFilter row
- treePathNewFromIndices' :: MonadIO m => [Int32] -> m TreePath
- treePathGetIndices' :: MonadIO m => TreePath -> m [Int32]
- withTreePath :: MonadIO m => [Int32] -> (TreePath -> m a) -> m a
- stringToTreePath :: Text -> [Int32]
- treeSelectionGetSelectedRows' :: (MonadIO m, IsTreeSelection sel) => sel -> m [TreePath]
- data ColumnAccess row where
  - CAInvalid :: forall row. ColumnAccess row
  - CAInt :: forall row. (row -> Int32) -> ColumnAccess row
  - CABool :: forall row. (row -> Bool) -> ColumnAccess row
  - CAString :: forall row. (row -> Text) -> ColumnAccess row
  - CAPixbuf :: forall row. (row -> Pixbuf) -> ColumnAccess row
- data ColumnId row ty = ColumnId (GValue -> IO ty) ((row -> ty) -> ColumnAccess row) Int32
- comboQuark :: Word32
- equalManagedPtr :: ManagedPtrNewtype a => a -> a -> Bool

# Documentation

newtype TypedTreeModel row Source #

Constructors

TypedTreeModel (ManagedPtr (TypedTreeModel row)) |

#### Instances

Instances details

IsTypedTreeModel TypedTreeModel Source # |
Instance details Defined in Data.GI.Gtk.ModelView.Types Methods dummy :: TypedTreeModel a -> a

class IsTypedTreeModel (model :: Type -> Type) Source #

#### Instances

Instances details

IsTypedTreeModel ForestStore Source # |
Instance details Defined in Data.GI.Gtk.ModelView.ForestStore Methods dummy :: ForestStore a -> a
IsTypedTreeModel SeqStore Source # |
Instance details Defined in Data.GI.Gtk.ModelView.SeqStore Methods dummy :: SeqStore a -> a
IsTypedTreeModel TypedTreeModel Source # |
Instance details Defined in Data.GI.Gtk.ModelView.Types Methods dummy :: TypedTreeModel a -> a
IsTypedTreeModel TypedTreeModelFilter Source # |
Instance details Defined in Data.GI.Gtk.ModelView.Types Methods dummy :: TypedTreeModelFilter a -> a
IsTypedTreeModel TypedTreeModelSort Source # |
Instance details Defined in Data.GI.Gtk.ModelView.Types Methods dummy :: TypedTreeModelSort a -> a

toTypedTreeModel :: IsTypedTreeModel model => model row -> TypedTreeModel row Source #

unsafeTreeModelToGeneric :: TreeModel -> model row Source #

newtype TypedTreeModelSort row Source #

Constructors

TypedTreeModelSort (ManagedPtr (TypedTreeModelSort row)) |

#### Instances

Instances details

IsTypedTreeModel TypedTreeModelSort Source # |
Instance details Defined in Data.GI.Gtk.ModelView.Types Methods dummy :: TypedTreeModelSort a -> a
GObject (TypedTreeModelSort row) Source # |
Instance details Defined in Data.GI.Gtk.ModelView.Types
TypedObject (TypedTreeModelSort row) Source # |
Instance details Defined in Data.GI.Gtk.ModelView.Types Methods glibType :: IO GType Source #
HasParentTypes (TypedTreeModelSort row) Source # |
Instance details Defined in Data.GI.Gtk.ModelView.Types
type ParentTypes (TypedTreeModelSort row) Source # |
Instance details Defined in Data.GI.Gtk.ModelView.Types type ParentTypes (TypedTreeModelSort row) = '[TreeSortable, TreeModel, TreeModelSort]

unsafeTreeModelSortToGeneric :: TreeModelSort -> TypedTreeModelSort row Source #

newtype TypedTreeModelFilter row Source #

Constructors

TypedTreeModelFilter (ManagedPtr (TypedTreeModelFilter row)) |

#### Instances

Instances details

IsTypedTreeModel TypedTreeModelFilter Source # |
Instance details Defined in Data.GI.Gtk.ModelView.Types Methods dummy :: TypedTreeModelFilter a -> a

unsafeTreeModelFilterToGeneric :: TreeModelFilter -> TypedTreeModelFilter row Source #

treePathNewFromIndices' :: MonadIO m => [Int32] -> m TreePath Source #

TreePath is a list of indices to specify a subtree or node in a `TreeModel`. The node that correspond to a given `TreePath` might change if nodes are removed or added and a `TreePath` may refer to a different or even non-existent node after a modification of the model. In contrast, a `TreeIter` is a more compact representation of a `TreePath` which becomes invalid after each modification of the underlying model. An intelligent index that is adjusted with each update of the model to point to the same node (whenever possible) is `TreeRowReference`.

treePathGetIndices' :: MonadIO m => TreePath -> m [Int32] Source #

withTreePath :: MonadIO m => [Int32] -> (TreePath -> m a) -> m a Source #

stringToTreePath :: Text -> [Int32] Source #

Convert a comma or colon separated string into a `TreePath`. Any non-digit characters are assumed to separate indices, thus, the function always is always successful.

treeSelectionGetSelectedRows' :: (MonadIO m, IsTreeSelection sel) => sel -> m [TreePath] Source #

data ColumnAccess row where Source #

Accessing a row for a specific value. Used for `ColumnMap`.

Constructors

CAInvalid :: forall row. ColumnAccess row |
CAInt :: forall row. (row -> Int32) -> ColumnAccess row |
CABool :: forall row. (row -> Bool) -> ColumnAccess row |
CAString :: forall row. (row -> Text) -> ColumnAccess row |
CAPixbuf :: forall row. (row -> Pixbuf) -> ColumnAccess row |

data ColumnId row ty Source #

The type of a tree column.

Constructors

ColumnId (GValue -> IO ty) ((row -> ty) -> ColumnAccess row) Int32 |

#### Instances

Instances details

Show (ColumnId row ty) Source # |
Instance details Defined in Data.GI.Gtk.ModelView.TreeModel Methods showsPrec :: Int -> ColumnId row ty -> ShowS Source # show :: ColumnId row ty -> String Source # showList :: [ColumnId row ty] -> ShowS Source #
Eq (ColumnId row ty) Source # |
Instance details Defined in Data.GI.Gtk.ModelView.TreeModel Methods (==) :: ColumnId row ty -> ColumnId row ty -> Bool Source # (/=) :: ColumnId row ty -> ColumnId row ty -> Bool Source #

comboQuark :: Word32 Source #

equalManagedPtr :: ManagedPtrNewtype a => a -> a -> Bool Source #