![]() |

Public Member Functions | ||||
| void | clear_cache () | |||
| This function should almost never be called. | ||||
| iterator | convert_child_iter_to_iter (const iterator& child_iter) const | |||
| Gets an iterator that points to the sorted row that corresponds to the child row pointed at by child_iter. | ||||
| Path | convert_child_path_to_path (const Path& child_path) const | |||
| Converts child_path to a path relative to tree_model_sort . | ||||
| iterator | convert_iter_to_child_iter (const iterator& sorted_iter) const | |||
| Gets an iterator that points to the child row that corresponds to the sorted row pointed at by sorted_iter. | ||||
| Path | convert_path_to_child_path (const Path& sorted_path) const | |||
| Converts sorted_path to a path on the child model of tree_model_sort . | ||||
| Glib::RefPtr<const TreeModel> | get_model () const | |||
| Returns the model the Gtk::TreeModelSort is sorting. | ||||
| Glib::RefPtr<TreeModel> | get_model () | |||
| Returns the model the Gtk::TreeModelSort is sorting. | ||||
| const GtkTreeModelSort* | gobj () const | |||
| Provides access to the underlying C GObject. | ||||
| GtkTreeModelSort* | gobj () | |||
| Provides access to the underlying C GObject. | ||||
| GtkTreeModelSort* | gobj_copy () | |||
| Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. | ||||
| bool | iter_is_valid (const iterator& iter) const | |||
| <warning> This function is slow. | ||||
| void | reset_default_sort_func () | |||
| This resets the default sort function to be in the 'unsorted' state. | ||||
| virtual | ~TreeModelSort () | |||
Static Public Member Functions | ||||
| static Glib::RefPtr<TreeModelSort> | create (const Glib::RefPtr<TreeModel>& model) | |||
Protected Member Functions | ||||
| virtual void | set_value_impl (const iterator& row, int column, const Glib::ValueBase& value) | |||
| Override and implement this in a derived TreeModel class, so that Row::operator() and Row::set_value() work. | ||||
| TreeModelSort (const Glib::RefPtr<TreeModel>& model) | ||||
Related Functions | ||||
| (Note that these are not member functions.) | ||||
| Glib::RefPtr<Gtk::TreeModelSort> | wrap (GtkTreeModelSort* object, bool take_copy=false) | |||
| ||||
| virtual Gtk::TreeModelSort::~TreeModelSort | ( | ) | [virtual] |
| Gtk::TreeModelSort::TreeModelSort | ( | const Glib::RefPtr<TreeModel>& | model | ) | [explicit, protected] |
| void Gtk::TreeModelSort::clear_cache | ( | ) |
This function should almost never be called.
It clears the tree_model_sort of any cached iterators that haven't been reffed with ref_node(). This might be useful if the child model being sorted is static (and doesn't change often) and there has been a lot of unreffed access to nodes. As a side effect of this function, all unreffed iters will be invalid.
Gets an iterator that points to the sorted row that corresponds to the child row pointed at by child_iter.
| child_iter | A valid iterator pointing to a row on the child model. |
Converts child_path to a path relative to tree_model_sort .
That is, child_path points to a path in the child model. The returned path will point to the same row in the sorted model. If child_path isn't a valid path on the child model, then 0 is returned.
| child_path | A Gtk::TreePath to convert. |
0. Gets an iterator that points to the child row that corresponds to the sorted row pointed at by sorted_iter.
| sorted_iter | A valid iterator pointing to a row on the sorted model. |
Converts sorted_path to a path on the child model of tree_model_sort .
That is, sorted_path points to a location in tree_model_sort . The returned path will point to the same location in the model not being sorted. If sorted_path does not point to a location in the child model, 0 is returned.
| sorted_path | A Gtk::TreePath to convert. |
0. | static Glib::RefPtr<TreeModelSort> Gtk::TreeModelSort::create | ( | const Glib::RefPtr<TreeModel>& | model | ) | [static] |
| Glib::RefPtr<const TreeModel> Gtk::TreeModelSort::get_model | ( | ) | const |
| Glib::RefPtr<TreeModel> Gtk::TreeModelSort::get_model | ( | ) |
| const GtkTreeModelSort* Gtk::TreeModelSort::gobj | ( | ) | const [inline] |
| GtkTreeModelSort* Gtk::TreeModelSort::gobj | ( | ) | [inline] |
| GtkTreeModelSort* Gtk::TreeModelSort::gobj_copy | ( | ) |
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
| bool Gtk::TreeModelSort::iter_is_valid | ( | const iterator& | iter | ) | const [virtual] |
<warning> This function is slow.
Only use it for debugging and/or testing purposes. </warning>
Checks if the given iter is a valid iter for this Gtk::TreeModelSort.
| iter | A Gtk::TreeIter. |
true if the iter is valid, false if the iter is invalid.Reimplemented from Gtk::TreeModel.
| void Gtk::TreeModelSort::reset_default_sort_func | ( | ) |
This resets the default sort function to be in the 'unsorted' state.
That is, it is in the same order as the child model. It will re-sort the model to be in the same order as the child model only if the Gtk::TreeModelSort is in 'unsorted' state.
| virtual void Gtk::TreeModelSort::set_value_impl | ( | const iterator& | row, | |
| int | column, | |||
| const Glib::ValueBase & | value | |||
| ) | [protected, virtual] |
Override and implement this in a derived TreeModel class, so that Row::operator() and Row::set_value() work.
You can probably just implement this by calling set_value_vfunc(). Your implementation of set_value_impl() should also call set_row_changed() after changing the value.
Reimplemented from Gtk::TreeModel.
| Glib::RefPtr<Gtk::TreeModelSort> wrap | ( | GtkTreeModelSort * | object, | |
| bool | take_copy = false | |||
| ) | [related] |
| 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. |