Ardour  9.0-pre0-582-g084a23a80d
Gtk::TreeRow Class Reference

#include <treeiter.h>

Inheritance diagram for Gtk::TreeRow:
[legend]

Public Member Functions

template<class ColumnType >
TreeValueProxy< ColumnType > operator[] (const TreeModelColumn< ColumnType > &column) const
 
template<class ColumnType >
void set_value (const TreeModelColumn< ColumnType > &column, const ColumnType &data) const
 
template<class ColumnType >
void set_value (int column, const ColumnType &data) const
 
template<class ColumnType >
ColumnType get_value (const TreeModelColumn< ColumnType > &column) const
 
template<class ColumnType >
void get_value (int column, ColumnType &data) const
 
const TreeNodeChildrenchildren () const
 
TreeIter parent () const
 
 operator bool () const
 
GtkTreeItergobj ()
 Provides access to the underlying C GObject.
More...
 
const GtkTreeItergobj () const
 Provides access to the underlying C GObject.
More...
 
- Public Member Functions inherited from Gtk::TreeIter
 TreeIter ()
 
TreeIteroperator++ ()
 
const TreeIter operator++ (int)
 
TreeIteroperator-- ()
 
const TreeIter operator-- (int)
 
reference operator* () const
 
pointer operator-> () const
 
bool equal (const TreeIter &other) const
 
 operator bool () const
 
int get_stamp () const
 
void set_stamp (int stamp)
 
- Public Member Functions inherited from Gtk::TreeIterBase
 TreeIterBase ()
 
 TreeIterBase (const GtkTreeIter *gobject)
 
GtkTreeItergobj ()
 Provides access to the underlying C instance. More...
 
const GtkTreeItergobj () const
 Provides access to the underlying C instance. More...
 

Private Member Functions

void set_value_impl (int column, const Glib::ValueBase &value) const
 
void get_value_impl (int column, Glib::ValueBase &value) const
 

Additional Inherited Members

- Public Types inherited from Gtk::TreeIter
typedef std::bidirectional_iterator_tag iterator_category
 
typedef Gtk::TreeRow value_type
 
typedef int difference_type
 
typedef const Gtk::TreeRowreference
 
typedef const Gtk::TreeRowpointer
 
- Static Public Member Functions inherited from Gtk::TreeIterBase
static GType get_type () G_GNUC_CONST
 
- Protected Attributes inherited from Gtk::TreeIterBase
GtkTreeIter gobject_
 

Detailed Description

Typedefed as TreeModel::Row.

Dereference a TreeModel::iterator to get the Row. Use operator[] or set_value() and get_value() to access the values in the columns of this row.

If the model contains a hierarchy of rows (such as Gtk::TreeStore), then you can access the child rows with children().

You can use a const TreeModel::Row& for any parameter that takes a const TreeModel::iterator&.

Definition at line 257 of file treeiter.h.

Member Function Documentation

◆ children()

const TreeNodeChildren& Gtk::TreeRow::children ( ) const

This returns an STL-like container API, for iterating over the rows. See also Gtk::TreeModel::children() for the top-level children.

◆ get_value() [1/2]

template<class ColumnType >
ColumnType Gtk::TreeRow::get_value ( const TreeModelColumn< ColumnType > &  column) const

Gets the value of this column of this row. This is a templated method, so the compiler will not allow you to provide an inappropriate type of data for the model column.

See also operator[].

Parameters
columnThe model column.
Returns
The new value to use for this column of this row.

◆ get_value() [2/2]

template<class ColumnType >
void Gtk::TreeRow::get_value ( int  column,
ColumnType &  data 
) const

Use get_value(const TreeModelColumn<>& column) unless you do not know the column type at compile-time.

If the data output argument is of an inappropriate C++ type then this might fail at runtime.

Parameters
columnThe number of the column whose value you want to change.
dataThe column type of the given colomn.
Returns
data An output argument which will contain the value of this column of this row.

◆ get_value_impl()

void Gtk::TreeRow::get_value_impl ( int  column,
Glib::ValueBase &  value 
) const
private

◆ gobj() [1/2]

GtkTreeIter* Gtk::TreeRow::gobj ( )
inline

Provides access to the underlying C GObject.

Definition at line 332 of file treeiter.h.

◆ gobj() [2/2]

const GtkTreeIter* Gtk::TreeRow::gobj ( ) const
inline

Provides access to the underlying C GObject.

Definition at line 335 of file treeiter.h.

◆ operator bool()

Gtk::TreeRow::operator bool ( ) const

Discover whether this is a valid row.

◆ operator[]()

template<class ColumnType >
TreeValueProxy<ColumnType> Gtk::TreeRow::operator[] ( const TreeModelColumn< ColumnType > &  column) const
inline

Use this to set and get the value of this column of this row. This is a templated method, so the compiler will not allow you to provide an inappropriate type of data for the model column.

This is just a more convient syntax that does the same thing as set_value() and get_value().

Parameters
columnThe model column..

◆ parent()

TreeIter Gtk::TreeRow::parent ( ) const

Gets an iterator to the parent row of this row.

Returns
An iterator to the parent row.

◆ set_value() [1/2]

template<class ColumnType >
void Gtk::TreeRow::set_value ( const TreeModelColumn< ColumnType > &  column,
const ColumnType &  data 
) const

Sets the value of this column of this row. This is a templated method, so the compiler will not allow you to provide an inappropriate type of data for the model column.

See also operator[].

Parameters
columnThe model column.
dataThe new value to use for this column of this row.

◆ set_value() [2/2]

template<class ColumnType >
void Gtk::TreeRow::set_value ( int  column,
const ColumnType &  data 
) const

Use set_value(const TreeModelColumn<>& column, const ColumnType& data) unless you do not know the column type at compile-time. If the data is of an inappropriate C++ type then this might fail at runtime.

Parameters
columnThe number of the column whose value you want to change.
dataThe new value to use for this column of this row.

◆ set_value_impl()

void Gtk::TreeRow::set_value_impl ( int  column,
const Glib::ValueBase &  value 
) const
private

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