نديم ابن ﺤﻣﻮﺪﺓ الخمير - Nadim Khemir > Text-Editor-Vip > Text::Editor::Vip::Selection

Download:
Text-Editor-Vip-0.08.1.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Module Version: 0.011   Source  

NAME ^

Text::Editor::Vip::Selection - Selection Range

SYNOPSIS ^

  use Text::Editor::Vip::Selection
  $selection = new Text::Editor::Vip::Selection()
  
  $selection->IsEmpty() ;
  ...

DESCRIPTION ^

This class handles the boundaries of a selection and provides helper sub to manipulate the selection.

MEMBER FUNCTIONS ^

new

Crete a selection object .

Setup

Setup a newly created object. This sub is private and shouldn't be used directely.

Clone

Returns a copy of the object.

IsEmpty

Returns 1 (one) if the selection boundaries are the same.

Retuns 0 (zero) if the object defined a non empty selection.

Clear

Resets, the selection boundaries. The selection will be empty after calling this sub.

Set

Sets the selection boundaries. Four arguments are expected:

SetAnchor

Sets the selection anchor. Two arguments are expected:

GetAnchor

Returns the anchor position.

SetLine

This sub set the other boundary of a selection. The other booundary being set by SetAnchor.

Two arguments are expected:

GetLine

Returns the other boundarie of a selection.

GetBoundaries

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.

GetStartLine

Gets the selection start line.

GetStartCharacter

Gets the selection start character.

GetEndLine

Gets the selection end line.

GetEndCharacter

Gets the selection end character.

IsCharacterSelected

Given a line and character indexes, this sub returns 'true' if the given character is within the selection boundaries. It otherwise returns 'false'.

IsLineSelected

Given a line index, this sub returns 'true' if the given line is completely selected. It otherwise returns 'false'.

AUTHOR ^

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

COPYRIGHT ^

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.

syntax highlighting: