aboutsummaryrefslogtreecommitdiff
path: root/sandbox/testplug.pl
blob: c298881b7ffb6b2bdaf071380a56a64b6e888327 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/usr/bin/perl

use Tk;

$mw = MainWindow->new();

$zinc = $mw->Zinc(-backcolor => 'gray',
		  -relief => 'sunken',
		  -width => 800,
		  -height => 500)->pack(-expand => 1,
					-fill => 'both');
$top = 1;
#$ent = $zinc->Entry();
#$entryitem = $zinc->add('window', $top,
#			-window => $ent,
#			-position => [100, 100]);
$dcontainer = $zinc->Frame(-container => 1);
$did = $dcontainer->id();
$vcontainer = $zinc->Frame(-container => 1);
$vid = $vcontainer->id();
#print "container id is $id\n";

$dlabel = $zinc->add('text', $top,
		     -text => "Digistrips",
		     -position => [150, 30]);
$zinc->bind($dlabel, '<1>', sub { $zinc->itemconfigure($vlabel, -color => 'black');
				  $zinc->itemconfigure($dlabel, -color => 'red');
				  $zinc->itemconfigure($vcontitem, -visible => 0);
				  $zinc->itemconfigure($dcontitem, -visible => 1); });
$vlabel = $zinc->add('text', $top,
		     -text => "Virtuosi",
		     -position => [250, 30]);
$zinc->bind($vlabel, '<1>', sub { $zinc->itemconfigure($dlabel, -color => 'black');
				  $zinc->itemconfigure($vlabel, -color => 'red');
				  $zinc->itemconfigure($dcontitem, -visible => 0);
				  $zinc->itemconfigure($vcontitem, -visible => 1); });
$dcontitem = $zinc->add('window', $top,
			-window => $dcontainer,
			-position => [50, 75],
			-visible => 0);
$vcontitem = $zinc->add('window', $top,
			-window => $vcontainer,
			-position => [50, 75],
			-visible => 0);

$ENV{DIGISTRIPS_PATH} = '/home/etienne/WORK/digistripsIII/src:/home/etienne/WORK/digistripsIII/data';
$ENV{VIRTUOSI_PATH} = '/home/etienne/WORK/virtuosi/src:/home/etienne/WORK/virtuosi/data';

$mw->update();

system("/home/etienne/WORK/digistripsIII/src/digistrips -stan --use $did -style standalone-1024x768 &");
system("/home/etienne/WORK/virtuosi/src/virtuosi -g 1024x768 -use $vid &");

MainLoop();