Gtk.Tree_Row_Reference

Entities

Tagged Types

Constants

Subprograms

Description

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

Copy

function Copy
   (Reference : Gtk_Tree_Row_Reference) return Gtk_Tree_Row_Reference

Copies a Gtk.Tree_Row_Reference.Gtk_Tree_Row_Reference. Since: gtk+ 2.2

Parameters
Reference
Return Value

a copy of Reference

Deleted

procedure Deleted
   (Proxy : not null access Glib.Object.GObject_Record'Class;
    Path  : Gtk.Tree_Model.Gtk_Tree_Path)

Lets a set of row reference created by gtk_tree_row_reference_new_proxy know that the model emitted the Gtk.Tree_Model.Gtk_Tree_Model::row-deleted signal.

Parameters
Proxy

a Glib.Object.GObject

Path

the path position that was deleted

Free

procedure Free (Reference : Gtk_Tree_Row_Reference)

Free's Reference. Reference may be null

Parameters
Reference

From_Object

function From_Object (Object : System.Address) return Gtk_Tree_Row_Reference
Parameters
Object
Return Value

From_Object_Free

function From_Object_Free (B : access Gtk_Tree_Row_Reference'Class) return Gtk_Tree_Row_Reference
Parameters
B
Return Value

Get_Model

function Get_Model
   (Reference : Gtk_Tree_Row_Reference)
    return Gtk.Tree_Model.Gtk_Tree_Model

Returns the model that the row reference is monitoring. Since: gtk+ 2.8

Parameters
Reference
Return Value

the model

Get_Path

function Get_Path
   (Reference : Gtk_Tree_Row_Reference)
    return Gtk.Tree_Model.Gtk_Tree_Path

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

Parameters
Reference
Return Value

a current path, or null

Get_Type

function Get_Type return Glib.GType
Return Value

Gtk_New

procedure Gtk_New
   (Reference : out Gtk_Tree_Row_Reference;
    Model     : Gtk.Tree_Model.Gtk_Tree_Model;
    Path      : Gtk.Tree_Model.Gtk_Tree_Path)

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 null is returned.

Parameters
Reference
Model

a Gtk.Tree_Model.Gtk_Tree_Model

Path

a valid Gtk.Tree_Model.Gtk_Tree_Path-struct to monitor

Gtk_New_Proxy

procedure Gtk_New_Proxy
   (Reference : out Gtk_Tree_Row_Reference;
    Proxy     : not null access Glib.Object.GObject_Record'Class;
    Model     : Gtk.Tree_Model.Gtk_Tree_Model;
    Path      : Gtk.Tree_Model.Gtk_Tree_Path)

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 null 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 Gtk.Tree_View.Gtk_Tree_View 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.

Parameters
Reference
Proxy

a proxy Glib.Object.GObject

Model

a Gtk.Tree_Model.Gtk_Tree_Model

Path

a valid Gtk.Tree_Model.Gtk_Tree_Path-struct to monitor

Gtk_Tree_Row_Reference

type Gtk_Tree_Row_Reference is new Glib.C_Boxed with null record;

Gtk_Tree_Row_Reference_New

function Gtk_Tree_Row_Reference_New
   (Model : Gtk.Tree_Model.Gtk_Tree_Model;
    Path  : Gtk.Tree_Model.Gtk_Tree_Path) return Gtk_Tree_Row_Reference

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 null is returned.

Parameters
Model

a Gtk.Tree_Model.Gtk_Tree_Model

Path

a valid Gtk.Tree_Model.Gtk_Tree_Path-struct to monitor

Return Value

Gtk_Tree_Row_Reference_New_Proxy

function Gtk_Tree_Row_Reference_New_Proxy
   (Proxy : not null access Glib.Object.GObject_Record'Class;
    Model : Gtk.Tree_Model.Gtk_Tree_Model;
    Path  : Gtk.Tree_Model.Gtk_Tree_Path) return Gtk_Tree_Row_Reference

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 null 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 Gtk.Tree_View.Gtk_Tree_View 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.

Parameters
Proxy

a proxy Glib.Object.GObject

Model

a Gtk.Tree_Model.Gtk_Tree_Model

Path

a valid Gtk.Tree_Model.Gtk_Tree_Path-struct to monitor

Return Value

Inserted

procedure Inserted
   (Proxy : not null access Glib.Object.GObject_Record'Class;
    Path  : Gtk.Tree_Model.Gtk_Tree_Path)

Lets a set of row reference created by gtk_tree_row_reference_new_proxy know that the model emitted the Gtk.Tree_Model.Gtk_Tree_Model::row-inserted signal.

Parameters
Proxy

a Glib.Object.GObject

Path

the row position that was inserted

Null_Gtk_Tree_Row_Reference

Null_Gtk_Tree_Row_Reference : constant Gtk_Tree_Row_Reference;

Reordered

procedure Reordered
   (Proxy     : not null access Glib.Object.GObject_Record'Class;
    Path      : Gtk.Tree_Model.Gtk_Tree_Path;
    Iter      : Gtk.Tree_Model.Gtk_Tree_Iter;
    New_Order : Gint_Array)

Lets a set of row reference created by gtk_tree_row_reference_new_proxy know that the model emitted the Gtk.Tree_Model.Gtk_Tree_Model::rows-reordered signal.

Parameters
Proxy

a Glib.Object.GObject

Path

the parent path of the reordered signal

Iter

the iter pointing to the parent of the reordered

New_Order

the new order of rows

Valid

function Valid (Reference : Gtk_Tree_Row_Reference) return Boolean

Returns True if the Reference is non-null and refers to a current valid path.

Parameters
Reference
Return Value

True if Reference points to a valid path