Name

TreeStore —

Synopsis

newtype
        TreeSkel
data
        TreeSkelState
newTreeStore:: TreeSkel -> IO TreeStore
treeStoreNew:: [TMType] -> IO TreeStore
emptyTreeSkel:: IO TreeSkel
treeSkelAddAttribute:: CellRendererClass r => TreeSkel -> Attribute r argTy -> IO (Association r,TreeIter -> IO argTy,TreeIter -> argTy -> IO ())
treeStoreAppend:: TreeStoreClass ts => ts -> Maybe TreeIter -> IO TreeIter
treeStoreInsert:: TreeStoreClass ts => ts -> Maybe TreeIter -> Int -> IO TreeIter
treeStoreInsertAfter:: TreeStoreClass ts => ts -> TreeIter -> IO TreeIter
treeStoreInsertBefore:: TreeStoreClass ts => ts -> TreeIter -> IO TreeIter
treeStoreIsAncestor:: TreeStoreClass ts => ts -> TreeIter -> TreeIter -> IO Bool
treeStoreIterDepth:: TreeStoreClass ts => ts -> TreeIter -> IO Int
treeStorePrepend:: TreeStoreClass ts => ts -> Maybe TreeIter -> IO TreeIter
treeStoreRemove:: TreeStoreClass ts => ts -> TreeIter -> IO Bool
treeStoreSetValue:: TreeStoreClass ts => ts -> TreeIter -> Int -> GenericValue -> IO ()

Datatypes

newtype TreeSkel

A skeleton of a TreeStore database.

newtype TreeSkel =TreeSkel (IORef TreeSkelState)

This datastructure describes what columns the database will have when it is finally created by newTreeStore A skeleton of a TreeStore database.

This datastructure describes what columns the database will have when it is finally created by newTreeStore

data TreeSkelState

data TreeSkelState =TSSActive TreeStore
| TSSPrepare [TMType]

Constructors

newTreeStore

Create a new TreeStore database.

newTreeStore:: TreeSkel:: IO TreeStore
(TreeSkel statusRef)

This method throws an exception if the skeleton has been used before.

treeStoreNew

Generate a new entity to store tree information.

treeStoreNew:: [TMType]:: IO TreeStore
cols

Methods

emptyTreeSkel

Returns an empty TreeSkel.

emptyTreeSkel

treeSkelAddAttribute

Reserve a new column in TreeSkel to hold values for the given attribute.

treeSkelAddAttribute:: TreeSkel:: Attribute r argTy:: IO (Association r,TreeIter -> IO argTy,TreeIter -> argTy -> IO ())
(TreeSkel statusRef)(Attribute prop ty toGen fromGen)

The type of the column is determined by the given Attribute of the ViewColumn which should be stored here. It is possible to associate this column with several ViewColumns.

treeStoreAppend

Insert a child node behind other siblings.

treeStoreAppend:: ts:: Maybe TreeIter:: IO TreeIter
tsparent

This is equivalent to treeStoreInsert parent (-1) .

treeStoreInsert

Insert a child node into the tree. If the parent is Nothing the insert at the root of the tree. The pos parameter determines the position with respect to other siblings. Set this to -1 to insert the node as last node.

treeStoreInsert:: ts:: Maybe TreeIter:: Int:: IO TreeIter
tsparentpos

treeStoreInsertAfter

Insert a node behind the sibling node on the same level.

treeStoreInsertAfter:: ts:: TreeIter:: IO TreeIter
tssibling

treeStoreInsertBefore

Insert a node in front of the sibling node on the same level.

treeStoreInsertBefore:: ts:: TreeIter:: IO TreeIter
tssibling

treeStoreIsAncestor

Check if a node is in a parental relationship with another node. Returns True even if parent is grandparent,... of child.

treeStoreIsAncestor:: ts:: TreeIter:: TreeIter:: IO Bool
tsparentchild

treeStoreIterDepth

Calculate the level of a node. Returns 1 for a root node.

treeStoreIterDepth:: ts:: TreeIter:: IO Int
tsiter

treeStorePrepend

Insert a child node in front of every other sibling.

treeStorePrepend:: ts:: Maybe TreeIter:: IO TreeIter
tsparent

This is equivalent to treeStoreInsert parent 0 .

treeStoreRemove

Remove a specific node.

treeStoreRemove:: ts:: TreeIter:: IO Bool
tsti

The TreeIter will point to the entry following the one which was just removed. The function returns False if the tiTreeIter does not point to a valid element (i.e. the function just removed the bottom entry from the tree).

<warning><para>This function returned () in Gtk version 2.0.X</warning><para>

treeStoreSetValue

Set the data of a specific node. The supplied value must match the type that was set for the column.

treeStoreSetValue:: ts:: TreeIter:: Int:: GenericValue:: IO ()
tsticolval