Text::Editor::Vip::Selection - Selection Range
use Text::Editor::Vip::Selection $selection = new Text::Editor::Vip::Selection() $selection->IsEmpty() ; ...
This class handles the boundaries of a selection and provides helper sub to manipulate the selection.
Crete a selection object .
Setup a newly created object. This sub is private and shouldn't be used directely.
Returns a copy of the object.
Returns 1 (one) if the selection boundaries are the same.
Retuns 0 (zero) if the object defined a non empty selection.
Resets, the selection boundaries. The selection will be empty after calling this sub.
Sets the selection boundaries. Four arguments are expected:
A start line
A start character
An end line
An end character
Sets the selection anchor. Two arguments are expected:
An anchor line
An anchor character
Returns the anchor position.
This sub set the other boundary of a selection. The other booundary being set by SetAnchor.
Two arguments are expected:
A line
A character
Returns the other boundarie of a selection.
Returns the boundaries of a selection as a list consisting of
selection start line
selection start character
selection end line
selection end character
the selection start line will always be lower or equal to the selection end line. The selection anchoring is handled automatically.
Gets the selection start line.
Gets the selection start character.
Gets the selection end line.
Gets the selection end character.
Given a line and character indexes, this sub returns 'true' if the given character is within the selection boundaries. It otherwise returns 'false'.
Given a line index, this sub returns 'true' if the given line is completely selected. It otherwise returns 'false'.
Khemir Nadim ibn Hamouda CPAN ID: NKH mailto:nadim@khemir.net http:// no web site
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.
To install Text::Editor::Vip, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Text::Editor::Vip
CPAN shell
perl -MCPAN -e shell install Text::Editor::Vip
For more information on module installation, please visit the detailed CPAN module installation guide.