|
| TreeModel (TreeModel &&src) noexcept |
|
TreeModel & | operator= (TreeModel &&src) noexcept |
|
| ~TreeModel () noexcept override |
|
GtkTreeModel * | gobj () |
| Provides access to the underlying C GObject.
|
|
const GtkTreeModel * | gobj () const |
| Provides access to the underlying C GObject.
|
|
iterator | get_iter (const Path & path) |
| Returns a valid iterator pointing to path.
|
|
const_iterator | get_iter (const Path & path) const |
| Returns a valid iterator pointing to path.
|
|
iterator | get_iter (const Glib::ustring &path_string) |
| Returns a valid iterator pointing to path_string.
|
|
const_iterator | get_iter (const Glib::ustring &path_string) const |
| Returns a valid iterator pointing to path_string.
|
|
Children | children () |
| This returns an STL-like container API, for iterating over the rows.
|
|
const ConstChildren | children () const |
| This returns an STL-like container API, for iterating over the rows.
|
|
void | foreach_iter (const SlotForeachIter & slot) |
| Calls a callback of type SlotForeachIter on each node in the model in a depth-first fashion.
|
|
void | foreach_path (const SlotForeachPath & slot) |
| Calls a callback of type SlotForeachPath on each node in the model in a depth-first fashion.
|
|
void | foreach (const SlotForeachPathAndIter & slot) |
| Calls a callback of type SlotForeachPathAndIter on each node in the model in a depth-first fashion.
|
|
Flags | get_flags () const |
| Returns a set of flags supported by this interface.
|
|
int | get_n_columns () const |
| Returns the number of columns supported by tree_model.
|
|
GType | get_column_type (int index) const |
| Returns the type of the column.
|
|
TreeModel::Path | get_path (const const_iterator &iter) const |
| Returns a Gtk::TreePath referenced by iter.
|
|
void | row_changed (const Path & path, const const_iterator &iter) |
| Emits the signal_row_changed() signal on tree_model.
|
|
void | row_inserted (const Path & path, const const_iterator &iter) |
| Emits the signal_row_inserted() signal on tree_model.
|
|
void | row_has_child_toggled (const Path & path, const const_iterator &iter) |
| Emits the signal_row_has_child_toggled() signal on tree_model.
|
|
void | row_deleted (const Path & path) |
| Emits the signal_row_deleted() signal on tree_model.
|
|
void | rows_reordered (const Path & path, const const_iterator &iter, const std::vector< int > &new_order) |
| Emits the "rows_reordered" signal on the tree model.
|
|
void | rows_reordered (const Path & path, const std::vector< int > &new_order) |
| Emits the "rows_reordered" signal on the tree model.
|
|
void | rows_reordered (const Path & path, const const_iterator &iter, int *new_order) |
| Emits the Gtk::TreeModel::signal_rows_reordered() signal on tree_model.
|
|
Glib::ustring | get_string (const const_iterator &iter) const |
| Generates a string representation of the iter.
|
|
Glib::SignalProxy< void(const TreeModel::Path &, const TreeModel::iterator &)> | signal_row_changed () |
|
Glib::SignalProxy< void(const TreeModel::Path &, const TreeModel::iterator &)> | signal_row_inserted () |
|
Glib::SignalProxy< void(const TreeModel::Path &, const TreeModel::iterator &)> | signal_row_has_child_toggled () |
|
Glib::SignalProxy< void(const TreeModel::Path &)> | signal_row_deleted () |
|
Glib::SignalProxy< void(const TreeModel::Path &, const TreeModel::iterator &, int *)> | signal_rows_reordered () |
|
| Interface () |
|
| Interface (Interface &&src) noexcept |
|
Interface & | operator= (Interface &&src) noexcept |
|
| Interface (const Glib::Interface_Class &interface_class) |
|
| Interface (GObject *castitem) |
|
| ~Interface () noexcept override |
|
| Interface (const Interface &)=delete |
|
Interface & | operator= (const Interface &)=delete |
|
GObject * | gobj () |
|
const GObject * | gobj () const |
|
| ObjectBase (const ObjectBase &)=delete |
|
ObjectBase & | operator= (const ObjectBase &)=delete |
|
void | set_property_value (const Glib::ustring &property_name, const Glib::ValueBase &value) |
|
void | get_property_value (const Glib::ustring &property_name, Glib::ValueBase &value) const |
|
void | set_property (const Glib::ustring &property_name, const PropertyType &value) |
|
void | get_property (const Glib::ustring &property_name, PropertyType &value) const |
|
PropertyType | get_property (const Glib::ustring &property_name) const |
|
sigc::connection | connect_property_changed (const Glib::ustring &property_name, const sigc::slot< void()> &slot) |
|
sigc::connection | connect_property_changed (const Glib::ustring &property_name, sigc::slot< void()> &&slot) |
|
void | freeze_notify () |
|
void | thaw_notify () |
|
virtual void | reference () const |
|
virtual void | unreference () const |
|
GObject * | gobj () |
|
const GObject * | gobj () const |
|
GObject * | gobj_copy () const |
|
| trackable () noexcept |
|
| trackable (const trackable &src) noexcept |
|
| trackable (trackable &&src) noexcept |
|
| ~trackable () |
|
void | add_destroy_notify_callback (notifiable *data, func_destroy_notify func) const |
|
void | notify_callbacks () |
|
trackable & | operator= (const trackable &src) |
|
trackable & | operator= (trackable &&src) noexcept |
|
void | remove_destroy_notify_callback (notifiable *data) const |
|
|
| TreeModel () |
| You should derive from this class to use it.
|
|
virtual Flags | get_flags_vfunc () const |
|
virtual int | get_n_columns_vfunc () const |
|
virtual GType | get_column_type_vfunc (int index) const |
|
virtual bool | iter_next_vfunc (const iterator &iter, iterator &iter_next) const |
| Override and implement this in a derived TreeModel class.
|
|
virtual bool | get_iter_vfunc (const Path & path, iterator &iter) const |
| Override and implement this in a derived TreeModel class.
|
|
virtual bool | iter_children_vfunc (const iterator & parent, iterator &iter) const |
| Override and implement this in a derived TreeModel class.
|
|
virtual bool | iter_parent_vfunc (const iterator &child, iterator &iter) const |
| Override and implement this in a derived TreeModel class.
|
|
virtual bool | iter_nth_child_vfunc (const iterator & parent, int n, iterator &iter) const |
| Override and implement this in a derived TreeModel class.
|
|
virtual bool | iter_nth_root_child_vfunc (int n, iterator &iter) const |
| Override and implement this in a derived TreeModel class.
|
|
virtual bool | iter_has_child_vfunc (const const_iterator &iter) const |
| Override and implement this in a derived TreeModel class.
|
|
virtual int | iter_n_children_vfunc (const const_iterator &iter) const |
| Override and implement this in a derived TreeModel class.
|
|
virtual int | iter_n_root_children_vfunc () const |
| Override and implement this in a derived TreeModel class.
|
|
virtual void | ref_node_vfunc (const iterator &iter) const |
| Override and implement this in a derived TreeModel class.
|
|
virtual void | unref_node_vfunc (const iterator &iter) const |
| Override and implement this in a derived TreeModel class.
|
|
virtual TreeModel::Path | get_path_vfunc (const const_iterator &iter) const |
| Override and implement this in a derived TreeModel class.
|
|
virtual void | get_value_vfunc (const const_iterator &iter, int column, Glib::ValueBase & value) const |
| Override and implement this in a derived TreeModel class.
|
|
virtual void | set_value_impl (const iterator &iter, int column, const Glib::ValueBase & value) |
| Override and implement this in a derived TreeModel class, so that Row::operator() and Row::set_value() work.
|
|
virtual void | get_value_impl (const const_iterator &iter, int column, Glib::ValueBase & value) const |
|
virtual void | on_row_changed (const TreeModel::Path & path, const TreeModel::iterator &iter) |
| This is a default handler for the signal signal_row_changed().
|
|
virtual void | on_row_inserted (const TreeModel::Path & path, const TreeModel::iterator &iter) |
| This is a default handler for the signal signal_row_inserted().
|
|
virtual void | on_row_has_child_toggled (const TreeModel::Path & path, const TreeModel::iterator &iter) |
| This is a default handler for the signal signal_row_has_child_toggled().
|
|
virtual void | on_row_deleted (const TreeModel::Path & path) |
| This is a default handler for the signal signal_row_deleted().
|
|
virtual void | on_rows_reordered (const TreeModel::Path & path, const TreeModel::iterator &iter, int *new_order) |
| This is a default handler for the signal signal_rows_reordered().
|
|
| ObjectBase () |
|
| ObjectBase (const char *custom_type_name) |
|
| ObjectBase (const std::type_info &custom_type_info) |
|
| ObjectBase (ObjectBase &&src) noexcept |
|
ObjectBase & | operator= (ObjectBase &&src) noexcept |
|
virtual | ~ObjectBase () noexcept=0 |
|
void | initialize (GObject *castitem) |
|
void | initialize_move (GObject *castitem, Glib::ObjectBase *previous_wrapper) |
|
This class defines a generic tree interface for use by the Gtk::TreeView widget.
It is is designed to be usable with any appropriate data structure. The programmer just has to implement this interface on their own data type for it to be viewable by a Gtk::TreeView widget.
The model is represented as a hierarchical tree of strongly-typed, columned data. In other words, the model can be seen as a tree where every node has different values depending on which column is being queried. The type of data found in a column is determined by TreeModel::Column<> templates. The types are homogeneous per column across all nodes. It is important to note that this interface only provides a way of examining a model and observing changes. The implementation of each individual model decides how and if changes are made.
In order to make life simpler for programmers who do not need to write their own specialized model, two generic models are provided - the Gtk::TreeStore and the Gtk::ListStore. To use these, the developer simply pushes data into these models as necessary. These models provide the data structure as well as all appropriate tree interfaces. As a result, implementing drag and drop, sorting, and storing data is trivial. For the vast majority of trees and lists, these two models are sufficient.
Models are accessed on a node/column level of granularity. One can query for the value of a model at a certain node and a certain column on that node. There are two structures used to reference a particular node in a model. They are the Path and the iterator. Most of the interface consists of operations on an iterator.
A Gtk::TreeModel::Path is essentially a potential node. It is a location on a model that may or may not actually correspond to a node on a specific model.
By contrast, an Gtk::TreeModel::iterator is a reference to a specific node on a specific model. 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 RowReference is also useful, because it remains valid as long as there is an existing row pointed to by it's path. You can convert between RowReferences and iterators and Path s.
- Deprecated:
- 4.10: Use Gio::ListModel instead.