Xfce Foundation Classes
Main Page  | IndexNamespace List  |  Alphabetical List  |  Class List  |  File List


Public Member Functions | Static Public Member Functions
Xfc::Gtk::TreeRowReference Class Reference

A GtkTreeRowReference C++ wrapper class. More...

#include <xfc/gtk/treemodel.hh>

Inheritance diagram for Xfc::Gtk::TreeRowReference:
Xfc::G::Boxed Xfc::Object Xfc::Trackable

List of all members.

Public Member Functions

Constructors

Static Public Member Functions


Detailed Description

A GtkTreeRowReference C++ wrapper class.

A TreeRowReference can be used to point to a node in a model, so long as it exists. The row reference will monitor all signals emitted by the model and update the node path appropriately.

Note: dynamically allocated objects must either be unreferenced or assigned to a smart pointer. Stack objects are automatically unreferenced when they go out of scope.


Constructor & Destructor Documentation

Constructs a row reference based on path.

Parameters:
modelA TreeModel.
pathA valid TreePath to monitor.

This reference will keep pointing to the node pointed to by path, so long as it exists. It listens to all signals emitted by model, and updates it's path appropriately. The TreeRowReference is created with a reference count of 1 that the caller owns.

Xfc::Gtk::TreeRowReference::TreeRowReference ( G::Object proxy,
TreeModel model,
const TreePath path 
)

Constructs a row reference based on path.

You do not need to use this constructor..

Parameters:
proxyA proxy G::Object.
modelA TreeModel.
pathA valid TreePath to monitor.

You do not need to use this constructor. The row reference will keep pointing to the node pointed to by path, so long as it exists. However, unlike references created with the other constructors, it does not listen to the model for changes. The creator of the row reference must do this explicitly using inserted(), deleted() and reordered(). This must be called once per signal per proxy. This type of row reference is primarily meant for use when you need to carefully monitor exactly when a row reference updates itself. It is not generally needed by most applications. The TreeRowReference is created with a reference count of 1 that the caller owns.

Xfc::Gtk::TreeRowReference::TreeRowReference ( GtkTreeRowReference *  reference) [explicit]

Constructs a row reference from an existing GtkTreeRowReference.

Parameters:
referenceA pointer to a GtkTreeRowReference.

The reference can be a newly created GtkTreeRowReference or an existing GtkTreeRowReference. The TreeRowReference object created is a temporary object. It doesn't take over the ownership of GtkTreeRowReference and GtkTreeRowReference is not freed by the destructor. The TreeRowReference is created with a reference count of 1 that the caller owns.

Xfc::Gtk::TreeRowReference::TreeRowReference ( GtkTreeRowReference *  reference,
bool  copy 
)

Constructs a row reference from an existing GtkTreeRowReference.

Parameters:
referenceA pointer to a GtkTreeRowReference.
copyWhether the TreePath object should make a copy of GtkTreePath or not.

The reference can be a newly created GtkTreeRowReference or an existing GtkTreeRowReference. If copy is true TreeRowReference will make a copy of GtkTreeRowReference. If copy is false TreeRowReference wont make a copy but instead takes over the ownership of GtkTreeRowReference. Either way, the destructor will free GtkTreeRowReference when the TreeRowReference object is destroyed. This constructor is used by G::Boxed::wrap() to wrap GtkTreeRowReference objects in a C++ wrapper. The TreeRowReference is created with a reference count of 1 that the caller owns.

Copy constructor.

Parameters:
srcThe source tree row reference.

Member Function Documentation

static void Xfc::Gtk::TreeRowReference::deleted ( const G::Object proxy,
const TreePath path 
) [static]

Lets a row reference created by the proxy object constructor know that the model emitted the "row_deleted" signal.

Parameters:
proxyA G::Object.
pathThe path position that was deleted.

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

Returns:
A current path, or null.
static void Xfc::Gtk::TreeRowReference::inserted ( const G::Object proxy,
const TreePath path 
) [static]

Lets a row reference created by the proxy object constructor know that the model emitted the "row_inserted" signal.

Parameters:
proxyA G::Object.
pathThe row position that was inserted.
TreeRowReference& Xfc::Gtk::TreeRowReference::operator= ( const TreeRowReference src)

Assignment operator.

Parameters:
srcThe source tree row reference.
static void Xfc::Gtk::TreeRowReference::reordered ( const G::Object proxy,
const TreePath path,
const TreeIter iter,
int *  new_order 
) [static]

Lets a row reference created by the proxy object constructor know that the model emitted the "rows_reordered" signal.

Parameters:
proxyA G::Object.
pathThe parent path of the reordered signal.
iterThe iter pointing to the parent of the reordered row.
new_orderThe new order of rows.

Returns true if the reference is non-null and refers to a current valid path.

Returns:
true if reference points to a valid path.

The documentation for this class was generated from the following file:
Xfce Foundation Classes
Copyright © 2004-2005 The XFC Development Team XFC