Wx::Perl::EntryList::Iterator - iterate over Wx::Perl::EntryList


Wx-Perl-EntryList documentation  | view source Contained in the Wx-Perl-EntryList distribution.

Index


NAME

Top

Wx::Perl::EntryList::Iterator - iterate over Wx::Perl::EntryList

SYNOPSIS

Top

  my $list = Wx::Perl::EntryList->new;
  $list->add_entries_at( 0, [ 'a', 'b', 'c', 'd', 'e' ] );
  my $it = Wx::Perl::EntryList::FwBwIterator->new;
  $it->attach( $list );

  # $it will iterate taking into accounts
  # insertions/deletions/moves on the list

DESCRIPTION

Top

Subclasses of Wx::Perl::EntryList::Iterator allow the iteration over an entry list to proceed in accord to operations on the list. For example, if the current element if moved, the iteration will continue from the element's new position.

METHODS

Top

attach

  $it->attach( $entrylist );

Associates the iterator with the given Wx::Perl::EntryList.

detach

  $it->detach;

Detaches the iterator for its associated Wx::Perl::EntryList.

at_start, at_end

at_start returns true when the iterator points to the first element of the list. at_end returns true when the iterator points to the last element of the list.


Wx-Perl-EntryList documentation  | view source Contained in the Wx-Perl-EntryList distribution.