gtkmm: Gtk::TreeRow Class Reference
Typedefed as TreeModel::Row. More...


Public Types | |
| typedef const void* | BoolExpr |
| This typedef is just to make it more obvious that our operator const void* should be used like operator bool(). | |
Public Member Functions | |
| template<class ColumnType > | |
| TreeValueProxy< ColumnType > | operator[] (const TreeModelColumn< ColumnType >& column) const |
| Use this to set and get the value of this column of this row. | |
| template<class ColumnType > | |
| void | set_value (const TreeModelColumn< ColumnType >& column, const ColumnType& data) const |
| Sets the value of this column of this row. | |
| template<class ColumnType > | |
| void | 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. | |
| template<class ColumnType > | |
| ColumnType | get_value (const TreeModelColumn< ColumnType >& column) const |
| Gets the value of this column of this row. | |
| template<class ColumnType > | |
| void | get_value (int column, ColumnType& data) const |
| Use get_value(const TreeModelColumn<>& column) unless you do not know the column type at compile-time. | |
| const TreeNodeChildren& | children () const |
| This returns an STL-like container API, for iterating over the rows. | |
| TreeIter | parent () const |
| Gets an iterator to the parent row of this row. | |
| operator BoolExpr () const | |
| Discover whether this is a valid row. | |
| GtkTreeIter* | gobj () |
| Provides access to the underlying C GObject. | |
| const GtkTreeIter* | gobj () const |
| Provides access to the underlying C 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&.
Member Typedef Documentation
| typedef const void* Gtk::TreeRow::BoolExpr |
This typedef is just to make it more obvious that our operator const void* should be used like operator bool().
Reimplemented from Gtk::TreeIter.
Member Function Documentation
| 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.
| 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:
-
column The number of the column whose value you want to change.
- Returns:
- data An output argument which will contain the value of this column of this row.
| 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:
-
column The model column.
- Returns:
- The new value to use for this column of this row.
| GtkTreeIter* Gtk::TreeRow::gobj | ( | ) | [inline] |
Provides access to the underlying C GObject.
Reimplemented from Gtk::TreeIterBase.
| const GtkTreeIter* Gtk::TreeRow::gobj | ( | ) | const [inline] |
Provides access to the underlying C GObject.
Reimplemented from Gtk::TreeIterBase.
| Gtk::TreeRow::operator BoolExpr | ( | ) | const |
Discover whether this is a valid row.
For instance,
if(treeiter)
do_something()
Reimplemented from Gtk::TreeIter.
| 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:
-
column The model column..
| TreeIter Gtk::TreeRow::parent | ( | ) | const |
Gets an iterator to the parent row of this row.
- Returns:
- An iterator to the parent row.
| 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:
-
column The model column. data The new value to use for this column of this row.
| 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:
-
column The number of the column whose value you want to change. data The new value to use for this column of this row.
The documentation for this class was generated from the following file:
- gtkmm/treeiter.h
