gi-gtk-3.0.24: Gtk bindings

CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (garetxe@gmail.com)
Safe HaskellNone
LanguageHaskell2010

GI.Gtk.Structs.TreeRowReference

Contents

Description

A GtkTreeRowReference tracks model changes so that it always refers to the same row (a TreePath refers to a position, not a fixed row). Create a new GtkTreeRowReference with treeRowReferenceNew.

Synopsis

Exported types

newtype TreeRowReference Source #

Memory-managed wrapper type.

Methods

copy

treeRowReferenceCopy Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> TreeRowReference

reference: a TreeRowReference

-> m TreeRowReference

Returns: a copy of reference

Copies a TreeRowReference.

Since: 2.2

deleted

treeRowReferenceDeleted Source #

Arguments

:: (HasCallStack, MonadIO m, IsObject a) 
=> a

proxy: a Object

-> TreePath

path: the path position that was deleted

-> m () 

Lets a set of row reference created by treeRowReferenceNewProxy know that the model emitted the TreeModel::row-deleted signal.

free

treeRowReferenceFree Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> TreeRowReference

reference: a TreeRowReference, or Nothing

-> m () 

Free’s reference. reference may be Nothing

getModel

treeRowReferenceGetModel Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> TreeRowReference

reference: a TreeRowReference

-> m TreeModel

Returns: the model

Returns the model that the row reference is monitoring.

Since: 2.8

getPath

treeRowReferenceGetPath Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> TreeRowReference

reference: a TreeRowReference

-> m (Maybe TreePath)

Returns: a current path, or Nothing

Returns a path that the row reference currently points to, or Nothing if the path pointed to is no longer valid.

inserted

treeRowReferenceInserted Source #

Arguments

:: (HasCallStack, MonadIO m, IsObject a) 
=> a

proxy: a Object

-> TreePath

path: the row position that was inserted

-> m () 

Lets a set of row reference created by treeRowReferenceNewProxy know that the model emitted the TreeModel::row-inserted signal.

new

treeRowReferenceNew Source #

Arguments

:: (HasCallStack, MonadIO m, IsTreeModel a) 
=> a

model: a TreeModel

-> TreePath

path: a valid TreePath-struct to monitor

-> m TreeRowReference

Returns: a newly allocated TreeRowReference, or Nothing

Creates a row reference based on path.

This reference will keep pointing to the node pointed to by path, so long as it exists. Any changes that occur on model are propagated, and the path is updated appropriately. If path isn’t a valid path in model, then Nothing is returned.

newProxy

treeRowReferenceNewProxy Source #

Arguments

:: (HasCallStack, MonadIO m, IsObject a, IsTreeModel b) 
=> a

proxy: a proxy Object

-> b

model: a TreeModel

-> TreePath

path: a valid TreePath-struct to monitor

-> m TreeRowReference

Returns: a newly allocated TreeRowReference, or Nothing

You do not need to use this function.

Creates a row reference based on path.

This reference will keep pointing to the node pointed to by path, so long as it exists. If path isn’t a valid path in model, then Nothing is returned. However, unlike references created with treeRowReferenceNew, it does not listen to the model for changes. The creator of the row reference must do this explicitly using treeRowReferenceInserted, treeRowReferenceDeleted, gtk_tree_row_reference_reordered().

These functions must be called exactly once per proxy when the corresponding signal on the model is emitted. This single call updates all row references for that proxy. Since built-in GTK+ objects like TreeView already use this mechanism internally, using them as the proxy object will produce unpredictable results. Further more, passing the same object as model and proxy doesn’t work for reasons of internal implementation.

This type of row reference is primarily meant by structures that need to carefully monitor exactly when a row reference updates itself, and is not generally needed by most applications.

valid

treeRowReferenceValid Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> TreeRowReference

reference: a TreeRowReference, or Nothing

-> m Bool

Returns: True if reference points to a valid path

Returns True if the reference is non-Nothing and refers to a current valid path.