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
False
is returned and there are no other effects.If successful,
out_link
andvalue
are set to the name andMenuModel
of 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_link
remains valid for as long as the iterator remains at the current position. The value returned invalue
must be unreffed usingunref()
when it is no longer in use.Added in version 2.32.
- get_value() → MenuModel#
Gets the linked
MenuModel
at 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.
True
is returned on success, orFalse
if 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
False
is returned and there are no other effects.If successful,
out_link
andvalue
are set to the name andMenuModel
of 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_link
remains valid for as long as the iterator remains at the current position. The value returned invalue
must be unreffed usingunref()
when it is no longer in use.Added in version 2.32.