| gtkmm
    2.24.4
    | 
A path is essentially a potential node. More...
| Public Types | |
| typedef unsigned int | size_type | 
| typedef int | difference_type | 
| typedef int | value_type | 
| typedef int& | reference | 
| typedef const int& | const_reference | 
| typedef int* | iterator | 
| typedef const int* | const_iterator | 
| typedef std::reverse_iterator< iterator > | reverse_iterator | 
| typedef std::reverse_iterator< const_iterator > | const_reverse_iterator | 
| Public Member Functions | |
| TreePath () | |
| TreePath (GtkTreePath* gobject, bool make_a_copy=true) | |
| TreePath (const TreePath& other) | |
| TreePath& | operator= (const TreePath& other) | 
| TreePath (TreePath&& other) noexcept | |
| TreePath& | operator= (TreePath&& other) noexcept | 
| ~TreePath () noexcept | |
| void | swap (TreePath& other) noexcept | 
| GtkTreePath* | gobj () | 
| Provides access to the underlying C instance.  More... | |
| const GtkTreePath* | gobj () const | 
| Provides access to the underlying C instance.  More... | |
| 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.  More... | |
| TreePath (size_type n, value_type value=0) | |
| TreePath (const Glib::ustring& path) | |
| TreePath (const TreeModel::iterator& iter) | |
| template<class In > | |
| TreePath (In pbegin, In pend) | |
| void | clear () | 
| TreePath& | operator= (const TreeModel::iterator& iter) | 
| operator bool () const | |
| Checks that the path is not empty, by calling empty().  More... | |
| template<class In > | |
| void | assign (In pbegin, In pend) | 
| template<class In > | |
| void | append (In pbegin, In pend) | 
| void | push_back (int index) | 
| Appends a new index to a path.  More... | |
| void | push_front (int index) | 
| Prepends a new index to a path.  More... | |
| size_type | size () const | 
| bool | empty () const | 
| reference | operator[] (size_type i) | 
| const_reference | operator[] (size_type i) const | 
| iterator | begin () | 
| iterator | end () | 
| const_iterator | begin () const | 
| const_iterator | end () const | 
| reverse_iterator | rbegin () | 
| reverse_iterator | rend () | 
| const_reverse_iterator | rbegin () const | 
| const_reverse_iterator | rend () const | 
| reference | front () | 
| const_reference | front () const | 
| reference | back () | 
| const_reference | back () const | 
| void | next () | 
| Moves the path to point to the next node at the current depth.  More... | |
| bool | prev () | 
| Moves the path to point to the previous node at the current depth, if it exists.  More... | |
| bool | up () | 
| Moves the path to point to its parent node, if it has a parent.  More... | |
| void | down () | 
| Moves path to point to the first child of the current path.  More... | |
| bool | is_ancestor (const TreePath& descendant) const | 
| Returns trueif descendant is a descendant of path.  More... | |
| bool | is_descendant (const TreePath& ancestor) const | 
| Returns trueif path is a descendant of ancestor.  More... | |
| Glib::ustring | to_string () const | 
| Generates a string representation of the path.  More... | |
| void | append_index (int index) | 
| Appends a new index to a path.  More... | |
| void | prepend_index (int index) | 
| Prepends a new index to a path.  More... | |
| int | get_depth () const | 
| Returns the current depth of path.  More... | |
| Glib::ArrayHandle< int > | get_indices () const | 
| 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".  More... | |
| Static Public Member Functions | |
| static GType | get_type () | 
| Get the GType for this class, for use with the underlying GObject type system.  More... | |
| 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".  More... | |
| static bool | get_from_selection_data (const SelectionData& selection_data, TreePath& path) | 
| See description in the other overload.  More... | |
| 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) noexcept | 
| Gtk::TreePath | wrap (GtkTreePath* object, bool take_copy=false) | 
| A Glib::wrap() method for this object.  More... | |
A 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.
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.
Typedefed as Gtk::TreeModel::Path.
| typedef const int* Gtk::TreePath::const_iterator | 
| typedef const int& Gtk::TreePath::const_reference | 
| typedef int Gtk::TreePath::difference_type | 
| typedef int* Gtk::TreePath::iterator | 
| typedef int& Gtk::TreePath::reference | 
| typedef unsigned int Gtk::TreePath::size_type | 
| typedef int Gtk::TreePath::value_type | 
| Gtk::TreePath::TreePath | ( | ) | 
| 
 | explicit | 
| Gtk::TreePath::TreePath | ( | const TreePath& | other | ) | 
| 
 | noexcept | 
| 
 | noexcept | 
| 
 | explicit | 
| 
 | explicit | 
| 
 | explicit | 
| 
 | inline | 
| void Gtk::TreePath::append | ( | In | pbegin, | 
| In | pend | ||
| ) | 
| void Gtk::TreePath::append_index | ( | int | index | ) | 
Appends a new index to a path.
As a result, the depth of the path is increased.
| index | The index. | 
| 
 | inline | 
| 
 | inline | 
| 
 | inline | 
| iterator Gtk::TreePath::begin | ( | ) | 
| const_iterator Gtk::TreePath::begin | ( | ) | const | 
| void Gtk::TreePath::clear | ( | ) | 
| void Gtk::TreePath::down | ( | ) | 
Moves path to point to the first child of the current path.
| bool Gtk::TreePath::empty | ( | ) | const | 
| iterator Gtk::TreePath::end | ( | ) | 
| const_iterator Gtk::TreePath::end | ( | ) | const | 
| 
 | inline | 
| 
 | inline | 
| int Gtk::TreePath::get_depth | ( | ) | const | 
| 
 | static | 
Obtains a Gtk::TreeModel and Gtk::TreeModel::Path from selection data of target type "GTK_TREE_MODEL_ROW".
Normally called from a drag_data_received handler. This function can only be used if selection_data originates from the same process that's calling this function, because a pointer to the tree model is being passed around. If you aren't in the same process, then you'll get memory corruption. In the Gtk::TreeDragDest drag_data_received signal handler, you can assume that selection data of type "GTK_TREE_MODEL_ROW" is from the current process.
| selection_data | a #SelectionData | 
| model | a Gtk::TreeModel | 
| path | a row in model | 
| 
 | static | 
See description in the other overload.
| Glib::ArrayHandle<int> Gtk::TreePath::get_indices | ( | ) | const | 
| 
 | static | 
Get the GType for this class, for use with the underlying GObject type system.
| 
 | inline | 
Provides access to the underlying C instance.
| 
 | inline | 
Provides access to the underlying C instance.
| GtkTreePath* Gtk::TreePath::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 Gtk::TreePath::is_ancestor | ( | const TreePath& | descendant | ) | const | 
Returns true if descendant is a descendant of path. 
| descendant | Another Gtk::TreePath. | 
true if descendant is contained inside path. | bool Gtk::TreePath::is_descendant | ( | const TreePath& | ancestor | ) | const | 
Returns true if path is a descendant of ancestor. 
| ancestor | Another Gtk::TreePath. | 
true if ancestor contains path somewhere below it. | void Gtk::TreePath::next | ( | ) | 
Moves the path to point to the next node at the current depth.
| Gtk::TreePath::operator bool | ( | ) | const | 
Checks that the path is not empty, by calling empty().
| TreePath& Gtk::TreePath::operator= | ( | const TreeModel::iterator& | iter | ) | 
| const_reference Gtk::TreePath::operator[] | ( | size_type | i | ) | const | 
| void Gtk::TreePath::prepend_index | ( | int | index | ) | 
Prepends a new index to a path.
As a result, the depth of the path is increased.
| index | The index. | 
| bool Gtk::TreePath::prev | ( | ) | 
Moves the path to point to the previous node at the current depth, if it exists.
true if path has a previous node, and the move was made. | void Gtk::TreePath::push_back | ( | int | index | ) | 
Appends a new index to a path.
As a result, the depth of the path is increased.
| index | The index. | 
| void Gtk::TreePath::push_front | ( | int | index | ) | 
Prepends a new index to a path.
As a result, the depth of the path is increased.
| index | The index. | 
| 
 | inline | 
| 
 | inline | 
| 
 | inline | 
| 
 | inline | 
| bool Gtk::TreePath::set_in_selection_data | ( | SelectionData& | selection_data, | 
| const Glib::RefPtr< const TreeModel >& | model | ||
| ) | const | 
Sets selection data of target type "GTK_TREE_MODEL_ROW".
Normally used in a drag_data_get signal handler.
| selection_data | some #SelectionData | 
| model | a Gtk::TreeModel | 
| size_type Gtk::TreePath::size | ( | ) | const | 
| 
 | noexcept | 
| Glib::ustring Gtk::TreePath::to_string | ( | ) | const | 
Generates a string representation of the path.
This string is a ':' separated list of numbers. For example, "4:10:0:3" would be an acceptable return value for this string.
| bool Gtk::TreePath::up | ( | ) | 
Moves the path to point to its parent node, if it has a parent.
true if path has a parent, and the move was made. | lhs | The left-hand side | 
| rhs | The right-hand side | 
| lhs | The left-hand side | 
| rhs | The right-hand side | 
| lhs | The left-hand side | 
| rhs | The right-hand side | 
| lhs | The left-hand side | 
| rhs | The right-hand side | 
| lhs | The left-hand side | 
| rhs | The right-hand side | 
| lhs | The left-hand side | 
| rhs | The right-hand side | 
| lhs | The left-hand side | 
| rhs | The right-hand side | 
| 
 | 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. | 
| 
 | protected | 
 1.8.11
 1.8.11