Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | None |
Language | Haskell2010 |
GI.Gtk.Structs.TreePath
Description
An opaque structure representing a path to a row in a model.
Synopsis
- newtype TreePath = TreePath (ManagedPtr TreePath)
- treePathAppendIndex :: (HasCallStack, MonadIO m) => TreePath -> Int32 -> m ()
- treePathCompare :: (HasCallStack, MonadIO m) => TreePath -> TreePath -> m Int32
- treePathCopy :: (HasCallStack, MonadIO m) => TreePath -> m TreePath
- treePathDown :: (HasCallStack, MonadIO m) => TreePath -> m ()
- treePathFree :: (HasCallStack, MonadIO m) => Maybe TreePath -> m ()
- treePathGetDepth :: (HasCallStack, MonadIO m) => TreePath -> m Int32
- treePathGetIndices :: (HasCallStack, MonadIO m) => TreePath -> m (Maybe [Int32])
- treePathIsAncestor :: (HasCallStack, MonadIO m) => TreePath -> TreePath -> m Bool
- treePathIsDescendant :: (HasCallStack, MonadIO m) => TreePath -> TreePath -> m Bool
- treePathNew :: (HasCallStack, MonadIO m) => m TreePath
- treePathNewFirst :: (HasCallStack, MonadIO m) => m TreePath
- treePathNewFromIndices :: (HasCallStack, MonadIO m) => [Int32] -> m TreePath
- treePathNewFromString :: (HasCallStack, MonadIO m) => Text -> m (Maybe TreePath)
- treePathNext :: (HasCallStack, MonadIO m) => TreePath -> m ()
- treePathPrependIndex :: (HasCallStack, MonadIO m) => TreePath -> Int32 -> m ()
- treePathPrev :: (HasCallStack, MonadIO m) => TreePath -> m Bool
- treePathToString :: (HasCallStack, MonadIO m) => TreePath -> m (Maybe Text)
- treePathUp :: (HasCallStack, MonadIO m) => TreePath -> m Bool
Exported types
Memory-managed wrapper type.
Constructors
TreePath (ManagedPtr TreePath) |
Instances
Eq TreePath Source # | |
GBoxed TreePath Source # | |
Defined in GI.Gtk.Structs.TreePath | |
ManagedPtrNewtype TreePath Source # | |
Defined in GI.Gtk.Structs.TreePath Methods toManagedPtr :: TreePath -> ManagedPtr TreePath # | |
TypedObject TreePath Source # | |
Defined in GI.Gtk.Structs.TreePath | |
HasParentTypes TreePath Source # | |
Defined in GI.Gtk.Structs.TreePath | |
IsGValue (Maybe TreePath) Source # | Convert |
Defined in GI.Gtk.Structs.TreePath | |
type ParentTypes TreePath Source # | |
Defined in GI.Gtk.Structs.TreePath |
Methods
Click to display all available methods, including inherited ones
Methods
appendIndex, compare, copy, down, free, isAncestor, isDescendant, next, prependIndex, prev, toString, up.
Getters
Setters
None.
appendIndex
Arguments
:: (HasCallStack, MonadIO m) | |
=> TreePath |
|
-> Int32 |
|
-> m () |
Deprecated: (Since version 4.10)
Appends a new index to a path.
As a result, the depth of the path is increased.
compare
Arguments
:: (HasCallStack, MonadIO m) | |
=> TreePath |
|
-> TreePath |
|
-> m Int32 | Returns: the relative positions of |
Deprecated: (Since version 4.10)
Compares two paths.
If a
appears before b
in a tree, then -1 is returned.
If b
appears before a
, then 1 is returned.
If the two nodes are equal, then 0 is returned.
copy
Arguments
:: (HasCallStack, MonadIO m) | |
=> TreePath |
|
-> m TreePath | Returns: a new |
Deprecated: (Since version 4.10)
Creates a new GtkTreePath
as a copy of path
.
down
Arguments
:: (HasCallStack, MonadIO m) | |
=> TreePath |
|
-> m () |
Deprecated: (Since version 4.10)
Moves path
to point to the first child of the current path.
free
Arguments
:: (HasCallStack, MonadIO m) | |
=> Maybe TreePath |
|
-> m () |
Deprecated: (Since version 4.10)
Frees path
. If path
is Nothing
, it simply returns.
getDepth
Arguments
:: (HasCallStack, MonadIO m) | |
=> TreePath |
|
-> m Int32 | Returns: The depth of |
Deprecated: (Since version 4.10)
Returns the current depth of path
.
getIndices
Arguments
:: (HasCallStack, MonadIO m) | |
=> TreePath |
|
-> m (Maybe [Int32]) | Returns: The current indices |
Deprecated: (Since version 4.10)
Returns the current indices of path
.
This is an array of integers, each representing a node in a tree. It also returns the number of elements in the array. The array should not be freed.
isAncestor
Arguments
:: (HasCallStack, MonadIO m) | |
=> TreePath |
|
-> TreePath |
|
-> m Bool | Returns: |
Deprecated: (Since version 4.10)
Returns True
if descendant
is a descendant of path
.
isDescendant
Arguments
:: (HasCallStack, MonadIO m) | |
=> TreePath |
|
-> TreePath |
|
-> m Bool | Returns: |
Deprecated: (Since version 4.10)
Returns True
if path
is a descendant of ancestor
.
new
Arguments
:: (HasCallStack, MonadIO m) | |
=> m TreePath | Returns: A newly created |
Deprecated: (Since version 4.10)
Creates a new GtkTreePath
This refers to a row.
newFirst
Arguments
:: (HasCallStack, MonadIO m) | |
=> m TreePath | Returns: A new |
Deprecated: (Since version 4.10)
Creates a new GtkTreePath
.
The string representation of this path is “0”.
newFromIndices
treePathNewFromIndices Source #
Arguments
:: (HasCallStack, MonadIO m) | |
=> [Int32] |
|
-> m TreePath | Returns: A newly created |
Deprecated: (Since version 4.10)
Creates a new path with the given indices
array of length
.
newFromString
treePathNewFromString Source #
Arguments
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> m (Maybe TreePath) | Returns: A newly-created |
Deprecated: (Since version 4.10)
Creates a new GtkTreePath
initialized to path
.
path
is expected to be a colon separated list of numbers.
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.
If an invalid path string is passed in, Nothing
is returned.
next
Arguments
:: (HasCallStack, MonadIO m) | |
=> TreePath |
|
-> m () |
Deprecated: (Since version 4.10)
Moves the path
to point to the next node at the current depth.
prependIndex
Arguments
:: (HasCallStack, MonadIO m) | |
=> TreePath |
|
-> Int32 |
|
-> m () |
Deprecated: (Since version 4.10)
Prepends a new index to a path.
As a result, the depth of the path is increased.
prev
Arguments
:: (HasCallStack, MonadIO m) | |
=> TreePath |
|
-> m Bool | Returns: |
Deprecated: (Since version 4.10)
Moves the path
to point to the previous node at the
current depth, if it exists.
toString
Arguments
:: (HasCallStack, MonadIO m) | |
=> TreePath |
|
-> m (Maybe Text) | Returns: A newly-allocated string |
Deprecated: (Since version 4.10)
Generates a string representation of the path.
This string is a “:” separated list of numbers.
For example, “4:10:0:3” would be an acceptable
return value for this string. If the path has
depth 0, Nothing
is returned.
up
Arguments
:: (HasCallStack, MonadIO m) | |
=> TreePath |
|
-> m Bool | Returns: |
Deprecated: (Since version 4.10)
Moves the path
to point to its parent node, if it has a parent.