MenuLinkIter#
Added in version 2.32.
Superclasses: Object
MenuLinkIter is an opaque structure type. You must access it using
the functions below.
Methods#
- class MenuLinkIter
-
- get_name() → str#
Gets the name of the link at the current iterator position.
The iterator is not advanced.
Added in version 2.32.
- get_next() → tuple[bool, str, MenuModel]#
This function combines
next()withget_name()andget_value().First the iterator is advanced to the next (possibly first) link. If that fails, then
Falseis returned and there are no other effects.If successful,
out_linkandvalueare set to the name andMenuModelof the link that has just been advanced to. At this point,get_name()andget_value()will return the same values again.The value returned in
out_linkremains valid for as long as the iterator remains at the current position. The value returned invaluemust be unreffed usingunref()when it is no longer in use.Added in version 2.32.
- get_value() → MenuModel#
Gets the linked
MenuModelat the current iterator position.The iterator is not advanced.
Added in version 2.32.
- next() → bool#
Attempts to advance the iterator to the next (possibly first) link.
Trueis returned on success, orFalseif there are no more links.You must call this function when you first acquire the iterator to advance it to the first link (and determine if the first link exists at all).
Added in version 2.32.
Virtual Methods#
- class MenuLinkIter
- do_get_next() → tuple[bool, str, MenuModel]#
This function combines
next()withget_name()andget_value().First the iterator is advanced to the next (possibly first) link. If that fails, then
Falseis returned and there are no other effects.If successful,
out_linkandvalueare set to the name andMenuModelof the link that has just been advanced to. At this point,get_name()andget_value()will return the same values again.The value returned in
out_linkremains valid for as long as the iterator remains at the current position. The value returned invaluemust be unreffed usingunref()when it is no longer in use.Added in version 2.32.