From fc06e0835731ec39d2a0c53bd7720b2b40ccc97a Mon Sep 17 00:00:00 2001 From: didier Date: Fri, 23 Nov 2007 16:58:58 +0000 Subject: Reinitialisation des bindings(MWritable MReconizer) ->Effacement de toutes les curves (MWritable) ->Variables Position fleche pour la MMultiselection --- src/MTools/Comp/MReconizer.pm | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) (limited to 'src/MTools/Comp/MReconizer.pm') diff --git a/src/MTools/Comp/MReconizer.pm b/src/MTools/Comp/MReconizer.pm index b3238d4..f30ec20 100644 --- a/src/MTools/Comp/MReconizer.pm +++ b/src/MTools/Comp/MReconizer.pm @@ -60,7 +60,6 @@ sub new { $self -> recordProperty ('callback', undef); $self -> mconfigure (%options); - binding ($src, "", [\&__pressed, $self, Ev('x'), Ev('y')]); binding ($src, "", [\&__moved, $self, Ev('x'), Ev('y')]); binding ($src, "", [\&__released, $self, Ev('x'), Ev('y')]); @@ -72,6 +71,8 @@ sub new { executer ($methode, @_); } }); + $self -> {__button} = $button; + $self -> {__source} = $src; $self -> {__dessin} = undef; $self -> {__dessin} = my $dessin = new MTools::GUI::MGroup (1); @@ -141,6 +142,27 @@ sub __released { $self -> {__anim__disparition} -> start (); } } - +sub getpoints { + my ($self) = @_; + return $self -> {__points}; +} +sub stopanim +{ + my ($self) = @_; + if ($self -> {__anim__disparition}) + { + + $self -> {__anim__disparition}->stop(); + } +} +sub reinitBindings +{ + my ($self) = @_; + my $button = $self->{__button}; + binding ($self->{__source}, "", [\&__pressed, $self, Ev('x'), Ev('y')]); + binding ($self->{__source}, "", [\&__moved, $self, Ev('x'), Ev('y')]); + binding ($self->{__source}, "", [\&__released, $self, Ev('x'), Ev('y')]); + +} 1; -- cgit v1.1