It is a location on a model that may or may not actually correspond to a node on a specific model.
A Path can be converted into either an array of unsigned integers or a string. The string form is a list of numbers separated by a colon. Each number refers to the offset at that level. Thus, the path "0" refers to the root node and the path "2:4" refers to the fifth child of the third node.
|
Public Types |
| typedef const int* | const_iterator |
| typedef const int& | const_reference |
typedef std::reverse_iterator<
const_iterator > | const_reverse_iterator |
| typedef int | difference_type |
| typedef int* | iterator |
| typedef int& | reference |
typedef std::reverse_iterator<
iterator > | reverse_iterator |
| typedef unsigned int | size_type |
| typedef int | value_type |
Public Member Functions |
| template<class In> |
| void | append (In pbegin, In pend) |
| void | append_index (int index) |
| | Appends a new index to a path.
|
| template<class In> |
| void | assign (In pbegin, In pend) |
| const_reference | back () const |
| reference | back () |
| const_iterator | begin () const |
| iterator | begin () |
| void | clear () |
| void | down () |
| | Moves path to point to the first child of the current path.
|
| bool | empty () const |
| const_iterator | end () const |
| iterator | end () |
| const_reference | front () const |
| reference | front () |
| int | get_depth () const |
| | Returns the current depth of path .
|
| Glib::ArrayHandle<int> | get_indices () const |
| const GtkTreePath* | gobj () const |
| | Provides access to the underlying C instance.
|
| GtkTreePath* | gobj () |
| | Provides access to the underlying C instance.
|
| GtkTreePath* | gobj_copy () const |
| | Provides access to the underlying C instance. The caller is responsible for freeing it. Use when directly setting fields in structs.
|
| bool | is_ancestor (const TreePath& descendant) const |
| | Returns true if descendant is a descendant of path .
|
| bool | is_descendant (const TreePath& ancestor) const |
| | Returns true if path is a descendant of ancestor .
|
| void | next () |
| | Moves the path to point to the next node at the current depth.
|
| TreePath& | operator= (const TreeModel::iterator& iter) |
| TreePath& | operator= (const TreePath& other) |
| const_reference | operator[] (size_type i) const |
| reference | operator[] (size_type i) |
| void | prepend_index (int index) |
| | Prepends a new index to a path.
|
| bool | prev () |
| | Moves the path to point to the previous node at the current depth, if it exists.
|
| void | push_back (int index) |
| | Appends a new index to a path.
|
| void | push_front (int index) |
| | Prepends a new index to a path.
|
| const_reverse_iterator | rbegin () const |
| reverse_iterator | rbegin () |
| const_reverse_iterator | rend () const |
| reverse_iterator | rend () |
| bool | set_in_selection_data (SelectionData& selection_data, const Glib::RefPtr<const TreeModel>& model) const |
| | Sets selection data of target type "GTK_TREE_MODEL_ROW".
|
| size_type | size () const |
| void | swap (TreePath& other) |
| Glib::ustring | to_string () const |
| | Generates a string representation of the path.
|
| template<class In> |
| | TreePath (In pbegin, In pend) |
| | TreePath (const TreeModel::iterator& iter) |
| | TreePath (const Glib::ustring& path) |
| | TreePath (size_type n, value_type value=0) |
| | TreePath (const TreePath& other) |
| | TreePath (GtkTreePath* gobject, bool make_a_copy=true) |
| | TreePath () |
| bool | up () |
| | Moves the path to point to its parent node, if it has a parent.
|
| | ~TreePath () |
Static Public Member Functions |
| static bool | get_from_selection_data (const SelectionData& selection_data, TreePath& path) |
| | See description in the other overload.
|
| static bool | get_from_selection_data (const SelectionData& selection_data, Glib::RefPtr<TreeModel>& model, TreePath& path) |
| | Obtains a Gtk::TreeModel and Gtk::TreeModel::Path from selection data of target type "GTK_TREE_MODEL_ROW".
|
Protected Attributes |
| GtkTreePath* | gobject_ |
Related Functions |
(Note that these are not member functions.)
|
| bool | operator!= (const TreePath& lhs, const TreePath& rhs) |
| bool | operator< (const TreePath& lhs, const TreePath& rhs) |
| bool | operator<= (const TreePath& lhs, const TreePath& rhs) |
| bool | operator== (const TreePath& lhs, const TreePath& rhs) |
| bool | operator> (const TreePath& lhs, const TreePath& rhs) |
| bool | operator>= (const TreePath& lhs, const TreePath& rhs) |
| void | swap (TreePath& lhs, TreePath& rhs) |
| Gtk::TreePath | wrap (GtkTreePath* object, bool take_copy=false) |