aboutsummaryrefslogtreecommitdiff
path: root/sandbox/testplug.pl
blob: 418c91a365f88def655b4b8c1c936bcc8869dcbd (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
#!/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);

$mw->update();

system("digistripsIII -stan --use $did -style standalone-1024x768 &");
system("virtuosi -g 1024x768 -use $vid &");

MainLoop();