TreeStore —
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 () |
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
Create a new TreeStore database.
| newTreeStore | :: TreeSkel | :: IO TreeStore |
| (TreeSkel statusRef) |
This method throws an exception if the skeleton has been used before.
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.
Insert a child node behind other siblings.
| treeStoreAppend | :: ts | :: Maybe TreeIter | :: IO TreeIter |
| ts | parent |
This is equivalent to treeStoreInsert parent (-1) .
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 |
| ts | parent | pos |
Insert a node behind the sibling node on the same level.
| treeStoreInsertAfter | :: ts | :: TreeIter | :: IO TreeIter |
| ts | sibling |
Insert a node in front of the sibling node on the same level.
| treeStoreInsertBefore | :: ts | :: TreeIter | :: IO TreeIter |
| ts | sibling |
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 |
| ts | parent | child |
Calculate the level of a node. Returns 1 for a root node.
| treeStoreIterDepth | :: ts | :: TreeIter | :: IO Int |
| ts | iter |
Insert a child node in front of every other sibling.
| treeStorePrepend | :: ts | :: Maybe TreeIter | :: IO TreeIter |
| ts | parent |
This is equivalent to treeStoreInsert parent 0 .
Remove a specific node.
| treeStoreRemove | :: ts | :: TreeIter | :: IO Bool |
| ts | ti |
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>