
Gnome::Gtk3::TreeRowReference
Description
A class that keeps a reference to a row in a list or tree. When set, this reference will keep pointing to the node, as long as it exists. Any changes that occur on the list or tree model are propagated, and the path is updated appropriately.
Synopsis
Declaration
unit class Gnome::Gtk3::TreeRowReference; also is Gnome::GObject::Boxed;
Types
class N-GtkTreeRowReference
Methods
new
Create an object taking the native object from elsewhere.
multi method new ( N-GtkTreeRowReference :tree-row-reference! )
[gtk_] tree_row_reference_new_proxy
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 Any
is returned. However, unlike references created with gtk_tree_row_reference_new()
, it does not listen to the model for changes. The creator of the row reference must do this explicitly using gtk_tree_row_reference_inserted()
, gtk_tree_row_reference_deleted()
, 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 Gnome::Gtk3::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.
Returns: a newly allocated Gnome::Gtk3::TreeRowReference, or Any
method gtk_tree_row_reference_new_proxy ( N-GObject $proxy, N-GObject $model, N-GtkTreePath $path --> N-GtkTreeRowReference )
N-GObject $proxy; a proxy GObject
N-GObject $model; a Gnome::Gtk3::TreeModel
N-GtkTreePath $path; a valid Gnome::Gtk3::TreePath-struct to monitor
[gtk_] tree_row_reference_get_path
Returns a path that the row reference currently points to, or Any
if the path pointed to is no longer valid.
method gtk_tree_row_reference_get_path ( --> Gnome::Gtk3::TreePath )
[gtk_] tree_row_reference_get_model
Returns the model that the row reference is monitoring.
Since: 2.8
method gtk_tree_row_reference_get_model ( --> N-GObject )
[gtk_] tree_row_reference_valid
Returns 1
if the reference is defined and refers to a current valid path.
method gtk_tree_row_reference_valid ( --> Int )
[gtk_] tree_row_reference_copy
Copies a Gnome::Gtk3::TreeRowReference.
Since: 2.2
method gtk_tree_row_reference_copy ( --> N-GtkTreeRowReference )
[gtk_] tree_row_reference_free
Free’s reference. reference may be Any
method gtk_tree_row_reference_free ( )
[gtk_] tree_row_reference_inserted
Lets a set of row reference created by gtk_tree_row_reference_new_proxy()
know that the model emitted the row-inserted signal.
method gtk_tree_row_reference_inserted ( N-GObject $proxy, N-GtkTreePath $path )
N-GObject $proxy; a GObject
N-GtkTreePath $path; the row position that was inserted
[gtk_] tree_row_reference_deleted
Lets a set of row reference created by gtk_tree_row_reference_new_proxy()
know that the model emitted the row-deleted signal.
method gtk_tree_row_reference_deleted ( N-GObject $proxy, N-GtkTreePath $path )
N-GObject $proxy; a GObject
N-GtkTreePath $path; the path position that was deleted
[gtk_] tree_row_reference_reordered
Lets a set of row reference created by gtk_tree_row_reference_new_proxy()
know that the model emitted the rows-reordered signal.
method gtk_tree_row_reference_reordered ( N-GObject $proxy, N-GtkTreePath $path, N-GtkTreeIter $iter, Int $new_order )
N-GObject $proxy; a GObject
N-GtkTreePath $path; the parent path of the reordered signal
N-GtkTreeIter $iter; the iter pointing to the parent of the reordered
Int $new_order; (array): the new order of rows