From 9a53d4578e60d558ac5b4208be7c3dace011c736 Mon Sep 17 00:00:00 2001 From: lecoanet Date: Fri, 15 Mar 2002 13:03:45 +0000 Subject: Fait en sorte que le test marche. --- Perl/t/zinc.t | 43 +++++++++++++++++-------------------------- 1 file changed, 17 insertions(+), 26 deletions(-) (limited to 'Perl/t') diff --git a/Perl/t/zinc.t b/Perl/t/zinc.t index 0d2f1bf..2404667 100644 --- a/Perl/t/zinc.t +++ b/Perl/t/zinc.t @@ -20,21 +20,12 @@ print "ok 1\n"; use Tk; -$map_path = "/usr/share/toccata/maps"; -$image_path = "/usr/share/toccata/images"; +#$map_path = "/usr/share/toccata/maps"; +$image_path = "/usr/share/doc/zinc-tk/examples"; $mw = MainWindow->new; $logo = $mw->Photo(-file => "$image_path/logo.gif"); -# $canvas = $mw->Canvas; -# $canvas->pack(-expand => t, -fill => 'both'); -# $text = $canvas->create('text', 30, 20, -width => 45, -text => "hello"); -# @listOfList = $canvas->itemconfigure($text); -# for (@listOfList) { -# ($option, $name, $class, $default, $value) = @$_; -# print "$option, $value\n"; -# } -# MainLoop; -# exit; + ################################################### # creation zinc ################################################### @@ -92,9 +83,9 @@ $zinc->itemconfigure($track, 2, -image => $logo , -alignment => "center"); $zinc->itemconfigure($track, 0, -reliefthickness => 2, -relief => "sunken", -bordercolor => "red", -border => "noborder"); -$zinc->bind($track.":-3", "", +$zinc->bind($track.':speedvector', "", sub {$zinc->itemconfigure($track, -speedvectorcolor => 'red')}); -$zinc->bind($track.":-3", "", +$zinc->bind($track.'speedvector', "", sub {$zinc->itemconfigure($track, -speedvectorcolor => 'black')}); @@ -131,8 +122,8 @@ $macro = $zinc->add("tabular", $top, 10, $zinc->itemconfigure($macro, 0 , -text => "une"); $zinc->itemconfigure($macro, 1, -text => "macro"); $zinc->itemconfigure($macro, -connecteditem => $track); -$zinc->bind($macro.":0", "", [ \&borders, "on"]); -$zinc->bind($macro.":0", "", [ \&borders, "off"]); +$zinc->bind($macro.':0', "", [ \&borders, "on"]); +$zinc->bind($macro.':0', "", [ \&borders, "off"]); ################################################### # creation ministrip @@ -147,22 +138,22 @@ $zinc->itemconfigure($ministrip, 0 , -text => 'ministrip'); ################################################### # creation map ################################################### -print "creating map\n"; -$mw->videomap("load", "$map_path/videomap_paris-w_90_2", 0, "paris-w"); -$mw->videomap("load", "$map_path/videomap_orly", 17, "orly"); -$mw->videomap("load", "$map_path/hegias_parouest_TE.vid", 0, "paris-ouest"); +#print "creating map\n"; +#$mw->videomap("load", "$map_path/videomap_paris-w_90_2", 0, "paris-w"); +#$mw->videomap("load", "$map_path/videomap_orly", 17, "orly"); +#$mw->videomap("load", "$map_path/hegias_parouest_TE.vid", 0, "paris-ouest"); -print "videomap ids : ", - join('|', $mw->videomap("ids", "$map_path/videomap_orly")),"\n"; -$map = $zinc->add("map", $top, -color => 'red'); -$zinc->itemconfigure($map,-mapinfo => 'orly'); +#print "videomap ids : ", +# join('|', $mw->videomap("ids", "$map_path/videomap_orly")),"\n"; +#$map = $zinc->add("map", $top, -color => 'red'); +#$zinc->itemconfigure($map,-mapinfo => 'orly'); #$map2 = $zinc->add("map", $top, -color => 'green', -filled => 1, -priority => 0, # -fillpattern => AlphaStipple6); #$zinc->itemconfigure($map2, -mapinfo => 'paris-ouest'); -$map3 = $zinc->add("map", $top, -color => 'orange'); -$zinc->itemconfigure($map3,-mapinfo => "paris-w"); +#$map3 = $zinc->add("map", $top, -color => 'orange'); +#$zinc->itemconfigure($map3,-mapinfo => "paris-w"); ################################################### -- cgit v1.1