Logo Search packages:      
Sourcecode: ardour version File versions

Gtk::TreeIter Class Reference
[TreeView Classes]

#include <treeiter.h>

Inheritance diagram for Gtk::TreeIter:

Gtk::TreeNodeChildren Gtk::TreeRow

List of all members.


Detailed Description

A Gtk::TreeModel::iterator is a reference to a specific node on a specific model.

It is a generic structure with an integer and three generic pointers. These are filled in by the model in a model-specific way.

One can convert a path to an iterator by calling Gtk::TreeModel::get_iter().

These iterators are the primary way of accessing a model and are similar to the iterators used by Gtk::TextBuffer. The model interface defines a set of operations using them for navigating the model.

The lifecycle of an iterator can be a little confusing at first. Iterators are expected to always be valid for as long as the model is unchanged (and doesn't emit a signal). Additionally, some models guarantee that an iterator is valid for as long as the node it refers to is valid (most notably the Gtk::TreeStore and Gtk::ListStore).

Although generally uninteresting, as one always has to allow for the case where iterators do not persist beyond a signal, some very important performance enhancements were made in the sort model. As a result, the Gtk::TREE_MODEL_ITERS_PERSIST flag was added to indicate this behaviour - see Gtk::TreeModel::get_flags().

Typedefed as Gtk::TreeModel::iterator. The Gtk::TreeModel iterator.

Definition at line 127 of file treeiter.h.


Public Types

typedef GtkTreeIter BaseObjectType
typedef TreeIterBase CppObjectType
typedef int difference_type
typedef
std::bidirectional_iterator_tag 
iterator_category
typedef const Gtk::TreeRowpointer
typedef const Gtk::TreeRowreference
typedef Gtk::TreeRow value_type

Public Member Functions

bool equal (const TreeIter &other) const
const GtkTreeIter * get_gobject_if_not_end () const
GtkTreeModel * get_model_gobject () const
const GtkTreeIter * get_parent_gobject_if_end () const
int get_stamp () const
const GtkTreeIter * gobj () const
 Provides access to the underlying C instance.
GtkTreeIter * gobj ()
 Provides access to the underlying C instance.
 operator bool () const
reference operator* () const
const TreeIter operator++ (int)
TreeIteroperator++ ()
const TreeIter operator-- (int)
TreeIteroperator-- ()
pointer operator-> () const
void set_model_gobject (GtkTreeModel *model)
void set_model_refptr (const Glib::RefPtr< TreeModel > &model)
void set_stamp (int stamp)
void setup_end_iterator (const TreeIter &last_valid)
 TreeIter (GtkTreeModel *model, const GtkTreeIter *iter)
 TreeIter (TreeModel *model)

Static Public Member Functions

static GType get_type () G_GNUC_CONST

Protected Attributes

GtkTreeIter gobject_
bool is_end_
TreeModelmodel_

Friends

class Gtk::TreeModel
class Gtk::TreeNodeChildren
class Gtk::TreeRow

Related Functions

(Note that these are not member functions.)

bool operator!= (const TreeIter &lhs, const TreeIter &rhs)
bool operator== (const TreeIter &lhs, const TreeIter &rhs)

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index