#!/usr/bin/perl
$WafeLib = $ENV{'WAFELIB'} || "/usr/lib/X11/wafe";
require "$WafeLib/perl/wafe.pl";

&UI( <<"End of TCL");
### BEGIN wafedesign TCL ###
form form1 topLevel  \\
	sensitive true
command command1 form1  \\
	horizDistance 4 \\
	label print \\
	vertDistance 4 \\
	$backGround \\
	$threeD \\
	callback {plotterGeneratePostscript test.ps plotter1 "Das ist der erste Versuch" 50 50 550 350 false} \\
	font -b&h-lucida-bold-r-*-*-14-*-*-*-p-*-iso8859-*
command command2 form1  \\
	callback quit \\
	fromVert command1 \\
	font -b&h-lucida-bold-r-*-*-14-*-*-*-p-*-iso8859-* \\
	label exit \\
	$backGround \\
	$threeD
plotter plotter1 form1  \\
	titleSize biggest \\
	fromHoriz command1 \\
	legendTitle Legende \\
	height 450 \\
	legendTitleStyle bold \\
	legendTitleSize normal \\
	titleStyle bold \\
	background gray \\
	width 600 \\
	plotAreaColor gainsboro \\
	title {Widget Verkauf}
axis axis2 plotter1  \\
	drawNumbers true \\
	drawSubgrid false \\
	label Gewinn \\
	numbersOutside true \\
	drawFrame false \\
	fastUpdate false \\
	vertical true
axis axis3 plotter1  \\
	ticFormat "%.0f" \\
	label Woche
barPlot barPlot1 plotter1  \\
	legendName Gewinn \\
	shading gray5 \\
	fillColor pink
linePlot linePlot1 plotter1  \\
	legendName Umsatz \\
	lineWidth 2 \\
	foreground navy
sV plotter1 xAxis axis3 yAxis axis2
barPlotAttachData barPlot1 1 5 8 3 7 2 10 8 3 7 5 2 1
linePlotAttachData linePlot1 1 3 7 4 5 8 6 7.9 9 8 6 5 2 0
realize
### END wafedesign TCL ###
End of TCL

while(<STDIN>) {
    chop;
    print "---> <$_>\n";
    eval $1 if /^perl (.*)/; 
}
&wafe'cleanup; 
