Text::Editor::Vip::Buffer::List - lines container


Text-Editor-Vip documentation  | view source Contained in the Text-Editor-Vip distribution.

Index


NAME

Top

Text::Editor::Vip::Buffer::List - lines container

SYNOPSIS

Top

  use Text::Editor::Vip::Buffer::List

DESCRIPTION

Top

Container class used by Text::Editor::Vip::Buffer to hold the buffers text. Elements aer accessed by index.

MEMBER FUNCTIONS

Top

new

Create an empty container. Takes no arguments.

GetNumberOfNodes

Returns the number of contained elements.

Push

Adds an element at the end of the the container. Returns it's index.

GetNodeData

Returns an element or undef if the element doesn't exist.

  $list = new Text::Editor::Vip::Buffer::List() ;
  $list->Push(['some_element']) ;
  my $element = $list->GetNodeData(0) ;

SetNodeData

Sets the element at the given index. The element must exist.

  my $index = 0 ;
  my $element = [] ;
  $list->SetNodeData($index, $element) ;

DeleteNode

Removes the lement at the given index. all elements after the given index are shifted up in the list. The element must exist.

  $list->DeleteNode($index) ;

InsertAfter

Creates and inserts an element in the list after the given index. The element at the given index must exist.

  $list->InsertAfter($index, $element_data) ;

InsertBefore

Creates and inserts an element in the list before the given index. The element at the given index must exist.

  $list->InsertBefore($index, $element_data) ;

AUTHOR

Top

	Khemir Nadim ibn Hamouda
	CPAN ID: NKH
	mailto:nadim@khemir.net
	http:// no web site

COPYRIGHT

Top


Text-Editor-Vip documentation  | view source Contained in the Text-Editor-Vip distribution.