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/MWritable.pm | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'src/MTools/Comp/MWritable.pm') diff --git a/src/MTools/Comp/MWritable.pm b/src/MTools/Comp/MWritable.pm index ec7fbd8..f4826b3 100644 --- a/src/MTools/Comp/MWritable.pm +++ b/src/MTools/Comp/MWritable.pm @@ -76,6 +76,8 @@ sub new { binding ($src, "", [\&__beginWrite, $self, Ev('x'), Ev('y'), Ev('t')]); binding ($src, "", [\&__writing, $self, Ev('x'), Ev('y'), Ev('t')]); binding ($src, "", [\&__endWrite, $self, Ev('x'), Ev('y'), Ev('t')]); + $self -> {__button} = $button; + $self -> {__source} = $src; $self -> {__curves} = (); $self -> {__points} = (); $self -> {__current_curves} = (); @@ -322,5 +324,24 @@ sub addCurves { push( @{$self -> {__curves}} , $clone ); } } +sub reinitBindings +{ + my ($self) = @_; + my $button = $self->{__button}; + binding ($self->{__source}, "", [\&__beginWrite, $self, Ev('x'), Ev('y'), Ev('t')]); + binding ($self->{__source}, "", [\&__writing, $self, Ev('x'), Ev('y'), Ev('t')]); + binding ($self->{__source}, "", [\&__endWrite, $self, Ev('x'), Ev('y'), Ev('t')]); + +} +sub eraseAll { + my ($self) = @_; + foreach my $curve (@{$self -> {__curves}}) + { + mdelete($curve); + } + + $self -> {__curves} = (); + $self -> {__old_coords} = (); +} 1; -- cgit v1.1