gtkmm: Gtk::TreeConstRow Class Reference
Typedefed as TreeModel::ConstRow. More...
#include <gtkmm/treeiter.h>
Public Member Functions | |
template<typename ColumnType > | |
const TreeValueProxy< TreeConstRow, ColumnType > | operator[] (const TreeModelColumn< ColumnType >& column) const |
Use this to get the value of this column of this row. More... | |
template<typename ColumnType > | |
ColumnType | get_value (const TreeModelColumn< ColumnType >& column) const |
Gets the value of this column of this row. More... | |
template<typename 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. More... | |
const TreeNodeConstChildren& | children () const |
This returns an STL-like container API, for iterating over the rows. More... | |
TreeIter< TreeConstRow > | parent () const |
Gets a const_iterator to the parent row of this row. More... | |
TreeIter< TreeConstRow > | get_iter () const |
Gets a const_iterator to this row. More... | |
operator bool () const | |
Discover whether this is a valid row. More... | |
Public Member Functions inherited from Gtk::TreeIterBase | |
TreeIterBase (const TreeIterBase& other) noexcept | |
TreeIterBase& | operator= (const TreeIterBase& other) noexcept |
TreeIterBase (TreeIterBase&& other) noexcept | |
TreeIterBase& | operator= (TreeIterBase&& other) noexcept |
TreeIterBase () | |
TreeIterBase (const GtkTreeIter* gobject) | |
GtkTreeIter* | gobj () |
Provides access to the underlying C instance. More... | |
const GtkTreeIter* | gobj () const |
Provides access to the underlying C instance. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from Gtk::TreeIterBase | |
static GType | get_type () |
Get the GType for this class, for use with the underlying GObject type system. More... | |
Protected Attributes inherited from Gtk::TreeIterBase | |
GtkTreeIter | gobject_ |
Detailed Description
Typedefed as TreeModel::ConstRow.
TreeConstRow is a const version of TreeRow. TreeConstRow does not contain methods for modifying the underlying TreeModel.
- See also
- TreeRow
Member Function Documentation
const TreeNodeConstChildren& Gtk::TreeConstRow::children | ( | ) | const |
This returns an STL-like container API, for iterating over the rows.
See also Gtk::TreeModel::children() for the top-level children.
TreeIter<TreeConstRow> Gtk::TreeConstRow::get_iter | ( | ) | const |
Gets a const_iterator to this row.
- Returns
- A const_iterator to this row.
ColumnType Gtk::TreeConstRow::get_value | ( | const TreeModelColumn< ColumnType >& | column | ) | const |
Gets the value of this column of this row.
See also operator[]().
- Parameters
-
column The model column.
- Returns
- The value of this column of this row.
void Gtk::TreeConstRow::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 query. [out] data An output argument which will contain the value of this column of this row.
|
explicit |
|
inline |
Use this to 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 convenient syntax that does the same thing as get_value().
- Parameters
-
column The model column.
TreeIter<TreeConstRow> Gtk::TreeConstRow::parent | ( | ) | const |
Gets a const_iterator to the parent row of this row.
- Returns
- A const_iterator to the parent row.