From 5c253dd02804c6e5c3552b84d3825836b9ac6195 Mon Sep 17 00:00:00 2001 From: mertz Date: Tue, 2 Jul 2002 08:45:17 +0000 Subject: - ajout de la doc sous forme de POD - correction de bugs mineurs (utiliation de == au lieu de eq) --- Perl/ZincText.pm | 117 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 115 insertions(+), 2 deletions(-) diff --git a/Perl/ZincText.pm b/Perl/ZincText.pm index 0cf04b5..26ff038 100644 --- a/Perl/ZincText.pm +++ b/Perl/ZincText.pm @@ -60,7 +60,7 @@ sub insertChar { } if ((scalar(@selit) == scalar(@it)) && - ($selit[0] == $it[0]) && ($selit[1] == $it[1])) { + ($selit[0] eq $it[0]) && ($selit[1] eq $it[1])) { $w->dchars(@it, 'sel.first', 'sel.last'); } $w->insert(@it, 'insert', $c); @@ -135,7 +135,7 @@ sub textDel { } if ((scalar(@selit) == scalar(@it)) && - ($selit[0] == $it[0]) && ($selit[1] == $it[1])) { + ($selit[0] eq $it[0]) && ($selit[1] eq $it[1])) { $w->dchars(@it, 'sel.first', 'sel.last'); } else { @@ -145,3 +145,116 @@ sub textDel { } 1; +__END__ + +=head1 NAME + +ZincText - Zinc extension for easing text input on text item or on fields + +=head1 SYNOPSIS + + use ZincText; + + $zinc = $mw->Zinc(); + new ZincText ($zinc); + .... + $zinc->addtag('text', 'withtag', $a_text); + $zinc->addtag('text', 'withtag', $a_track); + $zinc->addtag('text', 'withtag', $a_waypoint); + $zinc->addtag('text', 'withtag', $a_tabular); + +=head1 DESCRIPTION + +This module implements text input with the mouse and keyboard 'a la emacs'. +Text items must have the 'text' tag and must of course be sensitive. +Track, waypoint and tabular items have fields and these fields can +be edited the same way. Only sensitive fields can be edited. the following +interactions are supported: + +=over 2 + +=item B + +To set the cursor position + +=item B + +To paste the current selection + +=item B + +To make a selection + +=item B + +To extend the current selection + +=item B + +To extend the current selection + +=item B, B + +To move the cursor to the left or to the right + +=item B, B + +To move the cursor up or down a line + +=item B, B + +To move the cursor at the begining of the line + +=item B, B + +To move the cursor at the end of the line + +=item B, B> + +To move the cursor at the beginning / end of the text + +=item B, B + +To delete the char just before the cursor + +=item B + +To delete the char just after the cursor + +=item B + +To insert a return char. This does not validate the input! + +=back + +=head1 BUGS + +No known bugs at this time. If you find one, please report them to the authors. + +=head1 SEE ALSO + +perl(1), Tk(1), Tk::Zinc(3), zinc-demos(1) + +=head1 AUTHORS + +Patrick Lecoanet +(and some documentation by Christophe Mertz ) + +=head1 COPYRIGHT + +CENA (C) 2002 + +ZincText is part of Zinc and has been developed by the CENA (Centres d'Etudes de la Navigation Aérienne) +for its own needs in advanced HMI (Human Machine Interfaces or Interactions). Because we are confident +in the benefit of free software, the CENA delivered this toolkit under the GNU +Library General Public License. + +This code is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even +the implied warranty of MER­CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library +General Public License for more details. + +=head1 HISTORY + +June 2002 : initial release with Zinc-perl 3.2.6 + +=cut -- cgit v1.1