Wx::Perl::EntryList::FwBwIterator - iterate over Wx::Perl::EntryList sequentially


Wx-Perl-EntryList documentation Contained in the Wx-Perl-EntryList distribution.

Index


Code Index:

NAME

Top

Wx::Perl::EntryList::FwBwIterator - iterate over Wx::Perl::EntryList sequentially

SYNOPSIS

Top

See Wx::Perl::EntryList::Iterator.

DESCRIPTION

Top

A Wx::Perl::EntryList::Iterator subclass that allows sequential iteration over an entry list.

METHODS

Top

next_entry

  $it->next_entry;

Moves the iterator to the next entry of the list. Does nothing if the iterator points at the end of the list.

previous_entry

  $it->previous_entry;

Moves the iterator to the previous entry of the list. Does nothing if the iterator points at the beginning of the list.


Wx-Perl-EntryList documentation Contained in the Wx-Perl-EntryList distribution.
package Wx::Perl::EntryList::FwBwIterator;

use strict;
use base qw(Wx::Perl::EntryList::Iterator);

sub next_entry {
    my( $self ) = @_;
    return if $self->at_end;

    $self->current( $self->current + 1 );
}

sub previous_entry {
    my( $self ) = @_;
    return if $self->at_start;

    $self->current( $self->current - 1 );
}

1;