diff options
author | didier | 2007-11-23 16:58:58 +0000 |
---|---|---|
committer | didier | 2007-11-23 16:58:58 +0000 |
commit | fc06e0835731ec39d2a0c53bd7720b2b40ccc97a (patch) | |
tree | 9a30fc15e0aa7608f037e18d7c7ac09140c975ca /src/MTools/Comp/MWritable.pm | |
parent | c0b4003bc4fd76d6885648881c0b4c518ec76e08 (diff) | |
download | mtc-fc06e0835731ec39d2a0c53bd7720b2b40ccc97a.zip mtc-fc06e0835731ec39d2a0c53bd7720b2b40ccc97a.tar.gz mtc-fc06e0835731ec39d2a0c53bd7720b2b40ccc97a.tar.bz2 mtc-fc06e0835731ec39d2a0c53bd7720b2b40ccc97a.tar.xz |
Reinitialisation des bindings(MWritable MReconizer)
->Effacement de toutes les curves (MWritable)
->Variables Position fleche pour la MMultiselection
Diffstat (limited to 'src/MTools/Comp/MWritable.pm')
-rw-r--r-- | src/MTools/Comp/MWritable.pm | 21 |
1 files changed, 21 insertions, 0 deletions
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, "<Button-$button>", [\&__beginWrite, $self, Ev('x'), Ev('y'), Ev('t')]); binding ($src, "<Button$button-Motion>", [\&__writing, $self, Ev('x'), Ev('y'), Ev('t')]); binding ($src, "<ButtonRelease-$button>", [\&__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}, "<Button-$button>", [\&__beginWrite, $self, Ev('x'), Ev('y'), Ev('t')]); + binding ($self->{__source}, "<Button$button-Motion>", [\&__writing, $self, Ev('x'), Ev('y'), Ev('t')]); + binding ($self->{__source}, "<ButtonRelease-$button>", [\&__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; |