Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (inaki@blueleaf.cc) |
Safe Haskell | None |
Language | Haskell2010 |
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
- newtype TreeRowReference = TreeRowReference (ManagedPtr TreeRowReference)
- noTreeRowReference :: Maybe TreeRowReference
- treeRowReferenceCopy :: (HasCallStack, MonadIO m) => TreeRowReference -> m TreeRowReference
- treeRowReferenceDeleted :: (HasCallStack, MonadIO m, IsObject a) => a -> TreePath -> m ()
- treeRowReferenceFree :: (HasCallStack, MonadIO m) => TreeRowReference -> m ()
- treeRowReferenceGetModel :: (HasCallStack, MonadIO m) => TreeRowReference -> m TreeModel
- treeRowReferenceGetPath :: (HasCallStack, MonadIO m) => TreeRowReference -> m (Maybe TreePath)
- treeRowReferenceInserted :: (HasCallStack, MonadIO m, IsObject a) => a -> TreePath -> m ()
- treeRowReferenceNew :: (HasCallStack, MonadIO m, IsTreeModel a) => a -> TreePath -> m TreeRowReference
- treeRowReferenceNewProxy :: (HasCallStack, MonadIO m, IsObject a, IsTreeModel b) => a -> b -> TreePath -> m TreeRowReference
- treeRowReferenceValid :: (HasCallStack, MonadIO m) => TreeRowReference -> m Bool
Exported types
newtype TreeRowReference Source #
Memory-managed wrapper type.
Instances
BoxedObject TreeRowReference Source # | |
Defined in GI.Gtk.Structs.TreeRowReference boxedType :: TreeRowReference -> IO GType # |
noTreeRowReference :: Maybe TreeRowReference Source #
A convenience alias for Nothing
:: Maybe
TreeRowReference
.
Methods
copy
:: (HasCallStack, MonadIO m) | |
=> TreeRowReference |
|
-> m TreeRowReference | Returns: a copy of |
Copies a TreeRowReference
.
Since: 2.2
deleted
treeRowReferenceDeleted Source #
:: (HasCallStack, MonadIO m, IsObject a) | |
=> a |
|
-> TreePath |
|
-> m () |
Lets a set of row reference created by
treeRowReferenceNewProxy
know that the
model emitted the TreeModel
::row-deleted
signal.
free
:: (HasCallStack, MonadIO m) | |
=> TreeRowReference |
|
-> m () |
Free’s reference
. reference
may be Nothing
getModel
treeRowReferenceGetModel Source #
:: (HasCallStack, MonadIO m) | |
=> TreeRowReference |
|
-> m TreeModel | Returns: the model |
Returns the model that the row reference is monitoring.
Since: 2.8
getPath
treeRowReferenceGetPath Source #
:: (HasCallStack, MonadIO m) | |
=> TreeRowReference |
|
-> m (Maybe TreePath) | Returns: a current path, or |
Returns a path that the row reference currently points to,
or Nothing
if the path pointed to is no longer valid.
inserted
treeRowReferenceInserted Source #
:: (HasCallStack, MonadIO m, IsObject a) | |
=> a |
|
-> TreePath |
|
-> m () |
Lets a set of row reference created by
treeRowReferenceNewProxy
know that the
model emitted the TreeModel
::row-inserted
signal.
new
:: (HasCallStack, MonadIO m, IsTreeModel a) | |
=> a |
|
-> TreePath |
|
-> m TreeRowReference | Returns: a newly allocated |
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 #
:: (HasCallStack, MonadIO m, IsObject a, IsTreeModel b) | |
=> a |
|
-> b |
|
-> TreePath |
|
-> m TreeRowReference | Returns: a newly allocated |
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 #
:: (HasCallStack, MonadIO m) | |
=> TreeRowReference |
|
-> m Bool | Returns: |