aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorribet2007-07-19 07:24:12 +0000
committerribet2007-07-19 07:24:12 +0000
commit389dc2edaab8987dfc1475149940b9e615c2182b (patch)
tree6c7a2c03a6d4b72c1306d3f8f2fa634e7a9aa2f0
parentedd455020813a8989dbbeb306774aa76c393b7c6 (diff)
downloadmtc-389dc2edaab8987dfc1475149940b9e615c2182b.zip
mtc-389dc2edaab8987dfc1475149940b9e615c2182b.tar.gz
mtc-389dc2edaab8987dfc1475149940b9e615c2182b.tar.bz2
mtc-389dc2edaab8987dfc1475149940b9e615c2182b.tar.xz
Gestion de -visible pour les clip
-rw-r--r--doc/manuel_utilisateur.txt3
-rw-r--r--src/MTools/GUI/MClip.pm13
2 files changed, 16 insertions, 0 deletions
diff --git a/doc/manuel_utilisateur.txt b/doc/manuel_utilisateur.txt
index ea0cf7f..8f54270 100644
--- a/doc/manuel_utilisateur.txt
+++ b/doc/manuel_utilisateur.txt
@@ -231,6 +231,9 @@ La création nécessite les arguments suivants :
- soit un objet existant qui prendra pour père le groupe
$clipped.
+Note : un clip peut être rendu visible (ce qui signifie qu'il joue son rôle de
+masquage) ou non visible (pas de masquage) avec la propriété "-visible".
+
Exemple d'utilisation :
use MTools;
use MTools::GUI::MGroup;
diff --git a/src/MTools/GUI/MClip.pm b/src/MTools/GUI/MClip.pm
index b34a537..bc8405d 100644
--- a/src/MTools/GUI/MClip.pm
+++ b/src/MTools/GUI/MClip.pm
@@ -38,6 +38,19 @@ sub new {
my $self = new MTools::MObjet ();
bless $self, $class;
+ $self -> recordProperty ('-visible', 1);
+ $self -> plisten ('-visible', sub {
+ my ($src, $key, $val) = @_;
+ if ($val == 0)
+ {
+ mconfigure($self->{__clipped}, -clip => undef);
+ }
+ else
+ {
+ mconfigure($self->{__clipped}, -clip => $self->{__clip});
+ }
+ });
+
if (!defined $debug) {$debug = 0}
my $clip = $path;