|
Graphics.UI.Gtk.TreeList.TreeModel |
|
|
|
|
Description |
A TreeModel is the abstract base class for
TreeStore and ListStore.
- Most functions are defined in the latter two classes. This module
provides the TreeIter and TreePath objects.
|
|
Synopsis |
|
|
|
Documentation |
|
data TreeModel |
|
|
class GObjectClass o => TreeModelClass o |
|
|
castToTreeModel :: GObjectClass obj => obj -> TreeModel |
|
treeModelGetNColumns :: TreeModelClass tm => tm -> IO Int |
Read the number of columns this TreeModel currently stores.
|
|
treeModelGetColumnType :: TreeModelClass tm => tm -> Int -> IO TMType |
Retrieves the type of a specific column.
|
|
treeModelGetValue :: TreeModelClass tm => tm -> TreeIter -> Int -> IO GenericValue |
Read the value of at a specific column and Iterator.
|
|
data TreeModelFlags |
These flags indicate various properties of a TreeModel. These are
probably not terribly interesting for app developers. See the C documentation
for details.
| Constructors | TreeModelItersPersist | | TreeModelListOnly | |
| Instances | |
|
|
treeModelGetFlags :: TreeModelClass tm => tm -> IO [TreeModelFlags] |
Returns a set of flags supported by this interface. The flags supported
should not change during the lifecycle of the model.
|
|
newtype TreePath |
TreePath : a list of indices to specify a subtree or node in the
hierarchical TreeStore database.
| Constructors | |
|
|
createTreePath :: Ptr TreePath -> IO TreePath |
|
tree_path_copy :: Ptr TreePath -> IO (Ptr TreePath) |
|
tree_path_free :: Ptr TreePath -> FinalizerPtr TreePath |
|
treePathNew :: IO TreePath |
Create a new TreePath.
|
|
treePathNewFromString :: String -> IO TreePath |
Turn a String into a TreePath.
- For example, the string "10:4:0" would create a path of depth 3 pointing
to the 11th child of the root node, the 5th child of that 11th child, and the
1st child of that 5th child.
|
|
treePathNewFromIndicies :: [Int] -> IO TreePath |
Turn a list of indicies into a TreePath. See treePathNewFromString for
the meaning of these indicies.
|
|
treePathToString :: TreePath -> IO String |
Turn a TreePath into a String.
|
|
treePathNewFirst :: IO TreePath |
Create a TreePath.
- The returned TreePath is an index to the first element.
|
|
treePathAppendIndex :: TreePath -> Int -> IO () |
Add an index on the next level. |
|
treePathPrependIndex :: TreePath -> Int -> IO () |
|
treePathGetDepth :: TreePath -> IO Int |
|
treePathGetIndices :: TreePath -> IO [Int] |
|
treePathCopy :: TreePath -> IO TreePath |
|
treePathCompare :: TreePath -> TreePath -> IO Ordering |
|
treePathNext :: TreePath -> IO () |
|
treePathPrev :: TreePath -> IO Bool |
|
treePathUp :: TreePath -> IO Bool |
|
treePathDown :: TreePath -> IO () |
|
treePathIsAncestor |
:: TreePath | A TreePath | -> TreePath | A possible descendant | -> IO Bool | | Returns True if the second path is a descendant of the first.
|
|
|
treePathIsDescendant |
:: TreePath | A possible descendant | -> TreePath | A TreePath | -> IO Bool | | Returns True if the first path is a descendant of the second.
|
|
|
newtype TreeRowReference |
Tree Row Reference : like a TreePath it points to a subtree or node, but
it is persistent. It identifies the same node (so long as it exists) even
when items are added, removed, or reordered.
| Constructors | |
|
|
treeRowReferenceNew :: TreeModelClass tm => tm -> TreePath -> IO TreeRowReference |
Creates a row reference based on a path. This reference will keep pointing
to the node pointed to by the given path, so long as it exists.
|
|
treeRowReferenceGetPath :: TreeRowReference -> IO (Maybe TreePath) |
Returns a path that the row reference currently points to, or Nothing if
the path pointed to is no longer valid.
|
|
treeRowReferenceValid :: TreeRowReference -> IO Bool |
Returns True if the reference refers to a current valid path.
|
|
newtype TreeIter |
|
|
createTreeIter :: Ptr TreeIter -> IO TreeIter |
|
treeModelGetIter :: TreeModelClass tm => tm -> TreePath -> IO (Maybe TreeIter) |
Turn a TreePath into a
TreeIter.
- Returns Nothing if the tp is invalid.
|
|
treeModelGetIterFromString :: TreeModelClass tm => tm -> String -> IO (Maybe TreeIter) |
Turn a String into a
TreeIter.
- Returns Nothing if the table is empty.
|
|
gtk_tree_model_get_iter_from_string :: Ptr TreeModel -> Ptr TreeIter -> Ptr CChar -> IO CInt |
|
treeModelGetIterFirst :: TreeModelClass tm => tm -> IO (Maybe TreeIter) |
Retrieves an TreeIter to the
first entry.
- Returns Nothing if the table is empty.
|
|
treeModelGetPath :: TreeModelClass tm => tm -> TreeIter -> IO TreePath |
|
treeModelIterNext :: TreeModelClass tm => tm -> TreeIter -> IO Bool |
Advance the iterator to the next element.
- If there is no other element on this hierarchy level, return
False.
|
|
treeModelIterChildren :: TreeModelClass tm => tm -> TreeIter -> IO (Maybe TreeIter) |
Retrieve an iterator to the first child.
|
|
treeModelIterHasChild :: TreeModelClass tm => tm -> TreeIter -> IO Bool |
Test if this is the last hierarchy level. |
|
treeModelIterNChildren :: TreeModelClass tm => tm -> Maybe TreeIter -> IO Int |
Return the number of children.
- If Nothing is specified for the tm argument, the
function will work on toplevel elements.
|
|
treeModelIterNthChild :: TreeModelClass tm => tm -> Maybe TreeIter -> Int -> IO (Maybe TreeIter) |
Retrieve the nth child.
- If Nothing is specified for the tm argument, the
function will work on toplevel elements.
|
|
treeModelIterParent :: TreeModelClass tm => tm -> TreeIter -> IO (Maybe TreeIter) |
Retrieve the parent of this iterator.
|
|
treeModelRefNode :: TreeModelClass tm => tm -> TreeIter -> IO () |
No clue.
|
|
treeModelUnrefNode :: TreeModelClass tm => tm -> TreeIter -> IO () |
No clue either.
|
|
Produced by Haddock version 0.6 |