NAME

Wx::Perl::EntryList - dynamic list that can be displayed in various controls

SYNOPSIS

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

  # create a view to display it
  my $view = Wx::Perl::EntryList::ListBoxView->new
                 ( $list, sub { return $_[0] }, $parent );

DESCRIPTION

A dynamic list that can be observed (using Class::Publisher) for changes and can be displayed in various controls.

METHODS

new

  my $list = Wx::Perl::EntryList->new;

Creates a list object.

get_entry_at

  my $entry = $list->get_entry_at( $index );

Returns the nth entry of the list.

add_entries_at

  $list->add_entries_at( $index, [ $entry1, $entry2, ... ] );

Add some entries to the list, notifying any listeners.

delete_entry

  $list->delete_entry( $index );

Deletes a single entry from the list, notifying any listeners.

move_entry

  $list->move_entry( $from_index, $to_index );

Moves an entry of the list, notifying any listeners.

count

  my $count = $list->count;

The number of items in the list.

AUTHOR

Mattia Barbon <mbarbon@cpan.org>.

LICENSE

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

Wx::Perl::EntryList::ListBoxView, Wx::Perl::EntryList::VirtualListCtrlView, Wx::Perl::ListView, Wx::Perl::EntryList::Iterator