Gtk2HsContentsIndex
Graphics.UI.Gtk.ModelView.TreeStore
Portabilityportable (depends on GHC)
Stabilityprovisional
Maintainergtk2hs-users@lists.sourceforge.net
Contents
Types
Constructors
Methods
Description
Standard model to store hierarchical data.
Synopsis
data TreeStore a
treeStoreNew :: Forest a -> IO (TreeStore a)
treeStoreGetValue :: TreeStore a -> TreePath -> IO a
treeStoreGetTree :: TreeStore a -> TreePath -> IO (Tree a)
treeStoreSetValue :: TreeStore a -> TreePath -> a -> IO ()
treeStoreInsert :: TreeStore a -> TreePath -> Int -> a -> IO ()
treeStoreInsertTree :: TreeStore a -> TreePath -> Int -> Tree a -> IO ()
treeStoreRemove :: TreeStore a -> TreePath -> IO Bool
treeStoreClear :: TreeStore a -> IO ()
Types
data TreeStore a
A store for hierarchical data.
show/hide Instances
Constructors
treeStoreNew :: Forest a -> IO (TreeStore a)

Create a new list store.

  • The given rose tree determines the initial content and may be the empty list. Each Tree in the forest corresponds to one top-level node.
Methods
treeStoreGetValue :: TreeStore a -> TreePath -> IO a
Extract one node from the current model. Fails if the given TreePath refers to a non-existent node.
treeStoreGetTree :: TreeStore a -> TreePath -> IO (Tree a)
Extract a subtree from the current model. Fails if the given TreePath refers to a non-existent node.
treeStoreSetValue :: TreeStore a -> TreePath -> a -> IO ()
Set a node in the store.
treeStoreInsert
:: TreeStore athe store
-> TreePathpath - the position of the parent
-> Intpos - the index of the new tree
-> athe value to be inserted
-> IO ()

Insert a single node into the store.

  • This function inserts a single node without children into the tree. Its arguments are similar to those of treeStoreInsert.
treeStoreInsertTree
:: TreeStore athe store
-> TreePathpath - the position of the parent
-> Intpos - the index of the new tree
-> Tree athe value to be inserted
-> IO ()
Insert a node into the store.
treeStoreRemove :: TreeStore a -> TreePath -> IO Bool

Remove a node from the store.

  • The node denoted by the path is removed, along with all its children. The function returns True if the given node was found.
treeStoreClear :: TreeStore a -> IO ()
Produced by Haddock version 0.8