aboutsummaryrefslogtreecommitdiff
path: root/sandbox/testzinc.pl
diff options
context:
space:
mode:
Diffstat (limited to 'sandbox/testzinc.pl')
-rw-r--r--sandbox/testzinc.pl20
1 files changed, 15 insertions, 5 deletions
diff --git a/sandbox/testzinc.pl b/sandbox/testzinc.pl
index 4d0a6f7..1e4bf90 100644
--- a/sandbox/testzinc.pl
+++ b/sandbox/testzinc.pl
@@ -160,10 +160,10 @@ sub create_tracks {
-filled => 0,
-backcolor => 'gray65',
-text => "Balise");
- my $b_on = sub { print_current($zinc);
+ my $b_on = sub { #print_current($zinc);
$zinc->itemconfigure('current', $zinc->currentpart(),
-border => 'contour')};
- my $b_off = sub { print_current($zinc);
+ my $b_off = sub { #print_current($zinc);
$zinc->itemconfigure('current', $zinc->currentpart(),
-border => 'noborder')};
my $tog_b = sub { my $current = $zinc->find('withtag', 'current');
@@ -181,7 +181,7 @@ sub create_tracks {
$zinc->bind($item, '<Shift-1>', sub {});
}
$zinc->bind($item, '<Enter>',
- sub {print_current($zinc);
+ sub { #print_current($zinc);
$zinc->itemconfigure('current',
-historycolor => 'red',
-symbolcolor => 'red',
@@ -191,7 +191,7 @@ sub create_tracks {
-speedvectorwidth => 2,
-speedvectorcolor => 'red')});
$zinc->bind($item, '<Leave>',
- sub {print_current($zinc);
+ sub { #print_current($zinc);
$zinc->itemconfigure('current',
-historycolor => 'black',
-symbolcolor => 'black',
@@ -210,7 +210,17 @@ create_tracks();
sub print_current {
my ($zinc) = @_;
- print join(' ', $zinc->find('withtag', 'current')), "\n";
+ my $current;
+
+ $current = $zinc->find('withtag', 'current');
+ print join(' ', $current), "\n";
+# print ref($zinc->itemcget($current, -position)) ? 'ref' : 'pas ref', "\n";
+# print 'tout ';
+# for $attr ($zinc->itemconfigure($current)) {
+# print (join(',', @$attr));
+# }
+# print "\n\n";
+# print '-position ', join(',', $zinc->itemconfigure($current, -position)), "\n\n";
}
###################################################