|
gtkmm 4.12.0
|
A tree-like data structure that can be used with the Gtk::TreeView. More...
#include <gtkmm/treestore.h>

Public Member Functions | |
| TreeStore (TreeStore && src) noexcept | |
| TreeStore & | operator= (TreeStore && src) noexcept |
| ~TreeStore () noexcept override | |
| GtkTreeStore * | gobj () |
| Provides access to the underlying C GObject. | |
| const GtkTreeStore * | gobj () const |
| Provides access to the underlying C GObject. | |
| GtkTreeStore * | gobj_copy () |
| Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. | |
| void | set_column_types (const TreeModelColumnRecord & columns) |
| iterator | erase (const iterator & iter) |
| Removes the given row from the list store. | |
| iterator | insert (const iterator & iter) |
| Creates a new row before the position. | |
| iterator | insert_after (const iterator & iter) |
| Creates a new row after the position. | |
| iterator | prepend () |
| Creates a new row at the start of the top-level. | |
| iterator | prepend (const TreeNodeChildren & node) |
| Creates a new row at the start of the row's children. | |
| iterator | append () |
| Creates a new row at the end of the top-level. | |
| iterator | append (const TreeNodeChildren & node) |
| Creates a new row at the end of the row's children. | |
| void | iter_swap (const iterator & a, const iterator & b) |
| Swaps a and b in the same level of tree_store. | |
| void | move (const iterator & source, const iterator & destination) |
| Moves source to the position at destination. | |
| void | reorder (const TreeNodeChildren & node, const std::vector< int > & new_order) |
| Reorders the children of node to follow the order indicated by new_order. | |
| void | clear () |
| Removes all rows from tree_store. | |
| bool | is_ancestor (const const_iterator & iter, const const_iterator & descendant) const |
| Checks if iter is an ancestor of descendant. | |
| int | iter_depth (const const_iterator & iter) const |
| Returns the depth of the position pointed by the iterator. | |
| bool | iter_is_valid (const const_iterator & iter) const |
Checks if the given iter is a valid iter for this Gtk::TreeStore. | |
Public Member Functions inherited from Glib::Object | |
| Object (const Object &)=delete | |
| Object & | operator= (const Object &)=delete |
| Object (Object &&src) noexcept | |
| Object & | operator= (Object &&src) noexcept |
| void * | get_data (const QueryQuark &key) |
| void | set_data (const Quark &key, void *data) |
| void | set_data (const Quark &key, void *data, DestroyNotify notify) |
| void | remove_data (const QueryQuark &quark) |
| void * | steal_data (const QueryQuark &quark) |
| Glib::RefPtr< Glib::Object > | wrap (GObject *object, bool take_copy=false) |
Public Member Functions inherited from Glib::ObjectBase | |
| 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 |
Public Member Functions inherited from Gtk::TreeModel | |
| 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 () |
Public Member Functions inherited from Glib::Interface | |
| 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 |
Public Member Functions inherited from Gtk::TreeSortable | |
| TreeSortable (TreeSortable && src) noexcept | |
| TreeSortable & | operator= (TreeSortable && src) noexcept |
| ~TreeSortable () noexcept override | |
| GtkTreeSortable * | gobj () |
| Provides access to the underlying C GObject. | |
| const GtkTreeSortable * | gobj () const |
| Provides access to the underlying C GObject. | |
| bool | get_sort_column_id (int & sort_column_id, SortType & order) const |
| Fills in sort_column_id and order with the current sort column and the order. | |
| void | set_sort_column (const TreeModelColumnBase & sort_column_id, SortType order) |
| Sets the current sort column to be sort_column_id. | |
| void | set_sort_column (int sort_column_id, SortType order) |
| Sets the current sort column to be sort_column_id. | |
| void | set_sort_func (const TreeModelColumnBase & sort_column, const SlotCompare & slot) |
| Sets the comparison function used when sorting a certain column. | |
| void | set_sort_func (int sort_column_id, const SlotCompare & slot) |
| Sets the comparison function used when sorting a certain column. | |
| void | set_default_sort_func (const SlotCompare & slot) |
| Sets the default comparison function used when sorting. | |
| void | unset_default_sort_func () |
| Sets the default comparison function used when sorting. | |
| bool | has_default_sort_func () const |
Returns true if the model has a default sort function. | |
| void | sort_column_changed () |
Emits a GtkTreeSortable::sort-column-changed signal on sortable. | |
| Glib::SignalProxy< void()> | signal_sort_column_changed () |
Public Member Functions inherited from Gtk::TreeDragSource | |
| TreeDragSource (TreeDragSource && src) noexcept | |
| TreeDragSource & | operator= (TreeDragSource && src) noexcept |
| ~TreeDragSource () noexcept override | |
| GtkTreeDragSource * | gobj () |
| Provides access to the underlying C GObject. | |
| const GtkTreeDragSource * | gobj () const |
| Provides access to the underlying C GObject. | |
| bool | row_draggable (const TreeModel::Path & path) const |
Asks the Gtk::TreeDragSource whether a particular row can be used as the source of a DND operation. | |
| Glib::RefPtr< Gdk::ContentProvider > | drag_data_get (const TreeModel::Path & path) const |
Asks the Gtk::TreeDragSource to return a Gdk::ContentProvider representing the row at path. | |
| bool | drag_data_delete (const TreeModel::Path & path) |
Asks the Gtk::TreeDragSource to delete the row at path, because it was moved somewhere else via drag-and-drop. | |
Public Member Functions inherited from Gtk::TreeDragDest | |
| TreeDragDest (TreeDragDest && src) noexcept | |
| TreeDragDest & | operator= (TreeDragDest && src) noexcept |
| ~TreeDragDest () noexcept override | |
| GtkTreeDragDest * | gobj () |
| Provides access to the underlying C GObject. | |
| const GtkTreeDragDest * | gobj () const |
| Provides access to the underlying C GObject. | |
| bool | drag_data_received (const TreeModel::Path & dest, const Glib::ValueBase & value) |
Asks the Gtk::TreeDragDest to insert a row before the path dest, deriving the contents of the row from value. | |
| bool | row_drop_possible (const TreeModel::Path & dest_path, const Glib::ValueBase & value) const |
| Determines whether a drop is possible before the given dest_path, at the same depth as dest_path. | |
Public Member Functions inherited from Gtk::Buildable | |
| Buildable (Buildable && src) noexcept | |
| Buildable & | operator= (Buildable && src) noexcept |
| ~Buildable () noexcept override | |
| GtkBuildable * | gobj () |
| Provides access to the underlying C GObject. | |
| const GtkBuildable * | gobj () const |
| Provides access to the underlying C GObject. | |
| Glib::ustring | get_buildable_id () const |
| Gets the ID of the buildable object. | |
Static Public Member Functions | |
| static GType | get_type () |
| Get the GType for this class, for use with the underlying GObject type system. | |
| static Glib::RefPtr< TreeStore > | create (const TreeModelColumnRecord & columns) |
| Instantiate a new TreeStore. | |
Static Public Member Functions inherited from Gtk::TreeModel | |
| static void | add_interface (GType gtype_implementer) |
| static GType | get_type () |
| Get the GType for this class, for use with the underlying GObject type system. | |
Static Public Member Functions inherited from Gtk::TreeSortable | |
| static void | add_interface (GType gtype_implementer) |
| static GType | get_type () |
| Get the GType for this class, for use with the underlying GObject type system. | |
Static Public Member Functions inherited from Gtk::TreeDragSource | |
| static void | add_interface (GType gtype_implementer) |
| static GType | get_type () |
| Get the GType for this class, for use with the underlying GObject type system. | |
Static Public Member Functions inherited from Gtk::TreeDragDest | |
| static void | add_interface (GType gtype_implementer) |
| static GType | get_type () |
| Get the GType for this class, for use with the underlying GObject type system. | |
Static Public Member Functions inherited from Gtk::Buildable | |
| static void | add_interface (GType gtype_implementer) |
| static GType | get_type () |
| Get the GType for this class, for use with the underlying GObject type system. | |
Protected Member Functions | |
| TreeStore () | |
| When using this constructor, you must use set_column_types() immediately afterwards. | |
| TreeStore (const TreeModelColumnRecord & columns) | |
| void | set_value_impl (const iterator & row, int column, const Glib::ValueBase & value) override |
| Override and implement this in a derived TreeModel class, so that Row::operator() and Row::set_value() work. | |
Protected Member Functions inherited from Glib::Object | |
| Object () | |
| Object (const Glib::ConstructParams &construct_params) | |
| Object (GObject *castitem) | |
| ~Object () noexcept override | |
Protected Member Functions inherited from Glib::ObjectBase | |
| 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) |
Protected Member Functions inherited from Gtk::TreeModel | |
| 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(). | |
Protected Member Functions inherited from Gtk::TreeSortable | |
| TreeSortable () | |
| You should derive from this class to use it. | |
| virtual bool | get_sort_column_id_vfunc (int * sort_column_id, SortType * order) const |
| virtual void | set_sort_column_id_vfunc (int sort_column_id, SortType order) |
| virtual void | set_sort_func_vfunc (int sort_column_id, GtkTreeIterCompareFunc func, void *data, GDestroyNotify destroy) |
| virtual void | set_default_sort_func_vfunc (GtkTreeIterCompareFunc func, void *data, GDestroyNotify destroy) |
| virtual bool | has_default_sort_func_vfunc () const |
| virtual void | sort_column_changed_vfunc () const |
| virtual void | on_sort_column_changed () |
| This is a default handler for the signal signal_sort_column_changed(). | |
Protected Member Functions inherited from Gtk::TreeDragSource | |
| TreeDragSource () | |
| You should derive from this class to use it. | |
| virtual bool | row_draggable_vfunc (const TreeModel::Path & path) const |
| virtual Glib::RefPtr< Gdk::ContentProvider > | drag_data_get_vfunc (const TreeModel::Path & path) const |
| virtual bool | drag_data_delete_vfunc (const TreeModel::Path & path) |
Protected Member Functions inherited from Gtk::TreeDragDest | |
| TreeDragDest () | |
| You should derive from this class to use it. | |
| virtual bool | drag_data_received_vfunc (const TreeModel::Path & dest, const Glib::ValueBase & value) |
| virtual bool | row_drop_possible_vfunc (const TreeModel::Path & dest, const Glib::ValueBase & value) const |
Protected Member Functions inherited from Gtk::Buildable | |
| Buildable () | |
| You should derive from this class to use it. | |
Related Symbols | |
(Note that these are not member symbols.) | |
| Glib::RefPtr< Gtk::TreeStore > | wrap (GtkTreeStore * object, bool take_copy=false) |
| A Glib::wrap() method for this object. | |
Related Symbols inherited from Gtk::TreeModel | |
| Glib::RefPtr< Gtk::TreeModel > | wrap (GtkTreeModel * object, bool take_copy=false) |
| A Glib::wrap() method for this object. | |
Related Symbols inherited from Gtk::TreeSortable | |
| Glib::RefPtr< Gtk::TreeSortable > | wrap (GtkTreeSortable * object, bool take_copy=false) |
| A Glib::wrap() method for this object. | |
Related Symbols inherited from Gtk::TreeDragSource | |
| Glib::RefPtr< Gtk::TreeDragSource > | wrap (GtkTreeDragSource * object, bool take_copy=false) |
| A Glib::wrap() method for this object. | |
Related Symbols inherited from Gtk::TreeDragDest | |
| Glib::RefPtr< Gtk::TreeDragDest > | wrap (GtkTreeDragDest * object, bool take_copy=false) |
| A Glib::wrap() method for this object. | |
Related Symbols inherited from Gtk::Buildable | |
| Glib::RefPtr< Gtk::Buildable > | wrap (GtkBuildable * object, bool take_copy=false) |
| A Glib::wrap() method for this object. | |
Additional Inherited Members | |
Public Types inherited from Glib::Object | |
| typedef void(*)(gpointer data | DestroyNotify) |
Public Types inherited from Gtk::TreeModel | |
| enum class | Flags { ITERS_PERSIST = 1 << 0 , LIST_ONLY = 1 << 1 } |
| typedef TreeModelColumnRecord | ColumnRecord |
| typedef TreeNodeChildren | Children |
| typedef TreeNodeConstChildren | ConstChildren |
| typedef Children::iterator | iterator |
| typedef ConstChildren::const_iterator | const_iterator |
| typedef TreeConstRow | ConstRow |
| typedef TreeRow | Row |
| typedef TreePath | Path |
| typedef TreeRowReference | RowReference |
| typedef sigc::slot< bool(const TreeModel::iterator &)> | SlotForeachIter |
| The type of callback slot used by foreach_iter(). | |
| typedef sigc::slot< bool(const TreeModel::Path &)> | SlotForeachPath |
| The type of callback slot used by foreach_path(). | |
| typedef sigc::slot< bool(const TreeModel::Path &, const TreeModel::iterator &)> | SlotForeachPathAndIter |
| The type of callback slot used by foreach(). | |
Public Types inherited from Gtk::TreeSortable | |
| enum | { DEFAULT_SORT_COLUMN_ID = -1 , DEFAULT_UNSORTED_COLUMN_ID = -2 } |
| typedef sigc::slot< int(const Gtk::TreeModel::const_iterator &, const Gtk::TreeModel::const_iterator &)> | SlotCompare |
| This callback should return -1 if a compares before b, 0 if they compare equal, 1 if a compares after b. | |
A tree-like data structure that can be used with the Gtk::TreeView.
|
noexcept |
|
overridenoexcept |
|
protected |
When using this constructor, you must use set_column_types() immediately afterwards.
This can be useful when deriving from this class, with a fixed TreeModelColumnRecord that is a member of the class. There is no create() method that corresponds to this constructor, because this constructor should only be used by derived classes.
|
explicitprotected |
| iterator Gtk::TreeStore::append | ( | ) |
Creates a new row at the end of the top-level.
The row will be empty - to fill in values, you need to dereference the returned iterator and use Row::operator[] or Row::set_value(). See also insert() and prepend().
| iterator Gtk::TreeStore::append | ( | const TreeNodeChildren & | node | ) |
Creates a new row at the end of the row's children.
The row will be empty - to fill in values, you need to dereference the returned iterator and use Row::operator[] or Row::set_value(). See also insert() and prepend().
| node | The list of the parent row's children, as returned by Gtk::TreeModel::iterator::children(). |
| void Gtk::TreeStore::clear | ( | ) |
Removes all rows from tree_store.
Deprecated: 4.10: Use Gtk::TreeListModel instead
|
static |
Removes the given row from the list store.
| iter | The iterator to the row to be removed. |
|
static |
Get the GType for this class, for use with the underlying GObject type system.
|
inline |
Provides access to the underlying C GObject.
|
inline |
Provides access to the underlying C GObject.
| GtkTreeStore * Gtk::TreeStore::gobj_copy | ( | ) |
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
Creates a new row before the position.
If iter is end() then a new row will be appended to the list. The row will be empty - to fill in values, you need to dereference the returned iterator and use Row::operator[] or Row::set_value(). See also prepend() and append().
| iter | An iterator to the row before which the new row will be inserted. |
Creates a new row after the position.
If iter is end() then a new row will be prepended to the list. The row will be empty - to fill in values, you need to dereference the returned iterator and use Row::operator[] or Row::set_value(). See also prepend() and append().
| iter | An iterator to the row after which the new row will be inserted. |
| bool Gtk::TreeStore::is_ancestor | ( | const const_iterator & | iter, |
| const const_iterator & | descendant | ||
| ) | const |
Checks if iter is an ancestor of descendant.
Deprecated: 4.10: Use Gtk::TreeListModel instead
| iter | A valid Gtk::TreeIter. |
| descendant | A valid Gtk::TreeIter. |
| int Gtk::TreeStore::iter_depth | ( | const const_iterator & | iter | ) | const |
Returns the depth of the position pointed by the iterator.
The depth will be 0 for anything on the root level, 1 for anything down a level, etc.
Deprecated: 4.10: Use Gtk::TreeListModel instead
| iter | A valid Gtk::TreeIter. |
| bool Gtk::TreeStore::iter_is_valid | ( | const const_iterator & | iter | ) | const |
Checks if the given iter is a valid iter for this Gtk::TreeStore.
This function is slow. Only use it for debugging and/or testing purposes.
Deprecated: 4.10: Use Gtk::TreeListModel instead
| iter | The iterator to check. |
Swaps a and b in the same level of tree_store.
Note that this function only works with unsorted stores.
Deprecated: 4.10: Use Gtk::TreeListModel instead
| a | A Gtk::TreeIter. |
| b | Another Gtk::TreeIter. |
Moves source to the position at destination.
source and destination should be at the same level. Note that this function only works with unsorted stores.
| source | The row that should be moved. |
| destination | The position to move to. |
| iterator Gtk::TreeStore::prepend | ( | ) |
Creates a new row at the start of the top-level.
The row will be empty - to fill in values, you need to dereference the returned iterator and use Row::operator[] or Row::set_value(). See also insert() and append().
| iterator Gtk::TreeStore::prepend | ( | const TreeNodeChildren & | node | ) |
Creates a new row at the start of the row's children.
The row will be empty - to fill in values, you need to dereference the returned iterator and use Row::operator[] or Row::set_value(). See also insert() and append().
| node | The list of the parent row's children, as returned by Gtk::TreeModel::iterator::children(). |
| void Gtk::TreeStore::reorder | ( | const TreeNodeChildren & | node, |
| const std::vector< int > & | new_order | ||
| ) |
Reorders the children of node to follow the order indicated by new_order.
Note that this function only works with unsorted stores.
| void Gtk::TreeStore::set_column_types | ( | const TreeModelColumnRecord & | columns | ) |
|
overrideprotectedvirtual |
Override and implement this in a derived TreeModel class, so that Row::operator() and Row::set_value() work.
Your implementation of set_value_impl() should call row_changed() after changing the value.
Reimplemented from Gtk::TreeModel.
|
related |
A Glib::wrap() method for this object.
| object | The C instance. |
| take_copy | False if the result should take ownership of the C instance. True if it should take a new copy or ref. |