:right-sidebar: True BitsetIter =================================================================== .. currentmodule:: gi.repository.Gtk .. class:: BitsetIter(*args, **kwargs) :no-contents-entry: :Constructors: :: BitsetIter() Methods ------- .. rst-class:: interim-class .. class:: BitsetIter :no-index: .. method:: get_value() -> int Gets the current value that ``iter`` points to. If ``iter`` is not valid and :obj:`~gi.repository.Gtk.BitsetIter.is_valid` returns :const:`False`, this function returns 0. .. method:: init_at(set: ~gi.repository.Gtk.Bitset, target: int) -> tuple[bool, ~gi.repository.Gtk.BitsetIter, int] Initializes ``iter`` to point to ``target``. If ``target`` is not found, finds the next value after it. If no value >= ``target`` exists in ``set``, this function returns :const:`False`. :param set: a ``GtkBitset`` :param target: target value to start iterating at .. method:: init_first(set: ~gi.repository.Gtk.Bitset) -> tuple[bool, ~gi.repository.Gtk.BitsetIter, int] Initializes an iterator for ``set`` and points it to the first value in ``set``. If ``set`` is empty, :const:`False` is returned and ``value`` is set to ``%G_MAXUINT``. :param set: a ``GtkBitset`` .. method:: init_last(set: ~gi.repository.Gtk.Bitset) -> tuple[bool, ~gi.repository.Gtk.BitsetIter, int] Initializes an iterator for ``set`` and points it to the last value in ``set``. If ``set`` is empty, :const:`False` is returned. :param set: a ``GtkBitset`` .. method:: is_valid() -> bool Checks if ``iter`` points to a valid value. .. method:: next() -> tuple[bool, int] Moves ``iter`` to the next value in the set. If it was already pointing to the last value in the set, :const:`False` is returned and ``iter`` is invalidated. .. method:: previous() -> tuple[bool, int] Moves ``iter`` to the previous value in the set. If it was already pointing to the first value in the set, :const:`False` is returned and ``iter`` is invalidated. Fields ------ .. rst-class:: interim-class .. class:: BitsetIter :no-index: .. attribute:: private_data