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


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.

Constructors

Public Member Functions

Accessors

Static Public Member Functions

Methods

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

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

Constructs a row reference based on path.

Parameters:
model A TreeModel.
path A 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:
proxy A proxy G::Object.
model A TreeModel.
path A 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:
reference A 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:
reference A pointer to a GtkTreeRowReference.
copy Whether 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.

Xfc::Gtk::TreeRowReference::TreeRowReference ( const TreeRowReference src  ) 

Copy constructor.

Parameters:
src The source tree row reference.


Member Function Documentation

TreeRowReference& Xfc::Gtk::TreeRowReference::operator= ( const TreeRowReference src  ) 

Assignment operator.

Parameters:
src The source tree row reference.

Pointer<TreePath> Xfc::Gtk::TreeRowReference::get_path (  )  const

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.

bool Xfc::Gtk::TreeRowReference::valid (  )  const

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

Returns:
true if reference points to a valid path.

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:
proxy A G::Object.
path The row position that was inserted.

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:
proxy A G::Object.
path The path position that was deleted.

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:
proxy A G::Object.
path The parent path of the reordered signal.
iter The iter pointing to the parent of the reordered row.
new_order The new order of rows.


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