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:
Sets the selection anchor. Two arguments are expected:
Returns the anchor position.
This sub set the other boundary of a selection. The other booundary being set by SetAnchor.
Two arguments are expected:
Returns the other boundarie of a selection.
Returns the boundaries of a selection as a list consisting of
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:firstname.lastname@example.org 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.