gi-gtk-3.0.31: Gtk bindings

CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (inaki@blueleaf.cc)
Safe HaskellNone
LanguageHaskell2010

GI.Gtk.Structs.TreePath

Contents

Description

No description available in the introspection data.

Synopsis

Exported types

newtype TreePath Source #

Memory-managed wrapper type.

Constructors

TreePath (ManagedPtr TreePath) 
Instances
BoxedObject TreePath Source # 
Instance details

Defined in GI.Gtk.Structs.TreePath

Methods

boxedType :: TreePath -> IO GType #

noTreePath :: Maybe TreePath Source #

A convenience alias for Nothing :: Maybe TreePath.

Methods

appendIndex

treePathAppendIndex Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> TreePath

path: a TreePath-struct

-> Int32

index_: the index

-> m () 

Appends a new index to a path.

As a result, the depth of the path is increased.

compare

treePathCompare Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> TreePath

a: a TreePath-struct

-> TreePath

b: a TreePath-struct to compare with

-> m Int32

Returns: the relative positions of a and b

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

treePathCopy Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> TreePath

path: a TreePath-struct

-> m TreePath

Returns: a new TreePath-struct

Creates a new TreePath-struct as a copy of path.

down

treePathDown Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> TreePath

path: a TreePath-struct

-> m () 

Moves path to point to the first child of the current path.

free

treePathFree Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> TreePath

path: a TreePath-struct

-> m () 

Frees path. If path is Nothing, it simply returns.

getDepth

treePathGetDepth Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> TreePath

path: a TreePath-struct

-> m Int32

Returns: The depth of path

Returns the current depth of path.

getIndices

treePathGetIndices Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> TreePath

path: a TreePath-struct

-> m (Maybe [Int32])

Returns: The current indices, or Nothing

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.

Since: 3.0

isAncestor

treePathIsAncestor Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> TreePath

path: a TreePath-struct

-> TreePath

descendant: another TreePath-struct

-> m Bool

Returns: True if descendant is contained inside path

Returns True if descendant is a descendant of path.

isDescendant

treePathIsDescendant Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> TreePath

path: a TreePath-struct

-> TreePath

ancestor: another TreePath-struct

-> m Bool

Returns: True if ancestor contains path somewhere below it

Returns True if path is a descendant of ancestor.

new

treePathNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m TreePath

Returns: A newly created TreePath-struct.

Creates a new TreePath-struct. This refers to a row.

newFirst

treePathNewFirst Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m TreePath

Returns: A new TreePath-struct

Creates a new TreePath-struct.

The string representation of this path is “0”.

newFromIndices

treePathNewFromIndices Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> [Int32]

indices: array of indices

-> m TreePath

Returns: A newly created TreePath-struct

Creates a new path with the given indices array of length.

Since: 3.12

newFromString

treePathNewFromString Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

path: The string representation of a path

-> m TreePath

Returns: A newly-created TreePath-struct, or Nothing

Creates a new TreePath-struct 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

treePathNext Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> TreePath

path: a TreePath-struct

-> m () 

Moves the path to point to the next node at the current depth.

prependIndex

treePathPrependIndex Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> TreePath

path: a TreePath-struct

-> Int32

index_: the index

-> m () 

Prepends a new index to a path.

As a result, the depth of the path is increased.

prev

treePathPrev Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> TreePath

path: a TreePath-struct

-> m Bool

Returns: True if path has a previous node, and the move was made

Moves the path to point to the previous node at the current depth, if it exists.

toString

treePathToString Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> TreePath

path: A TreePath-struct

-> m Text

Returns: A newly-allocated string. Must be freed with free.

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.

up

treePathUp Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> TreePath

path: a TreePath-struct

-> m Bool

Returns: True if path has a parent, and the move was made

Moves the path to point to its parent node, if it has a parent.