Reference Manual

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

# Inti::Gtk::TreeIter Class Reference

A GtkTreeIter C++ wrapper class. More...

`#include <inti/gtk/treemodel.h>`

Inheritance diagram for Inti::Gtk::TreeIter:

List of all members.

## Public Member Functions

Constructors

- TreeIter ()
    Construct an properly initialized tree iterator.
- TreeIter (GtkTreeIter *iter)
    Construct a new tree iterator from an existing GtkTreeIter.
- TreeIter (GtkTreeIter *iter, bool copy)
    Construct a new text iterator from an existing GtkTreeIter.
- TreeIter (const TreeIter &src)
    Copy constructor.
- ~TreeIter ()
    Destructor.
- TreeIter & operator= (const TreeIter &src)
    Assignment operator.

Accessors

- GtkTreeIter * gtk_tree_iter () const
    Get a pointer to the GtkTreeIter structure.
- operator GtkTreeIter * () const
    Conversion operator; safely converts a TreeIter to a GtkTreeIter pointer.

## Detailed Description

A GtkTreeIter C++ wrapper class.

A TreeIter is a reference to a specific node on a specific model. It is a generic class 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 TextBuffer. They are generally statically allocated on the heap and only used for a short time. The TreeModel interface defines a set of operations using them for navigating the model.

## Constructor & Destructor Documentation

Inti::Gtk::TreeIter::TreeIter | ( | GtkTreeIter * | iter | ) | `[explicit]`

Construct a new tree iterator from an existing GtkTreeIter.

Parameters:

  iter | A pointer to a GtkTreeIter.

The iter can be a newly created GtkTreeIter or an existing GtkTreeIter. The TreeIter object created is a temporary object. It doesn't take over the ownership of GtkTreeIter and GtkTreeIter is not freed by the destructor.

Inti::Gtk::TreeIter::TreeIter | ( | GtkTreeIter * | iter,
|  | bool | copy
| ) |

Construct a new text iterator from an existing GtkTreeIter.

Parameters:

  iter | A pointer to a GtkTreeIter.
  copy | Whether the TreeIter object should make a copy of GtkTreeIter or not.

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

Inti::Gtk::TreeIter::TreeIter | ( | const TreeIter & | src | ) |

Copy constructor.

Parameters:

  src | The source tree iterator.

## Member Function Documentation

TreeIter& Inti::Gtk::TreeIter::operator= | ( | const TreeIter & | src | ) |

Assignment operator.

Parameters:

  src | The source tree iterator.

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

- treemodel.h

Main Page - Footer