button={ label=Quit action=QUIT }
var={ name=calc value=" | bc -l " }
var={ name=trigcon value="*3.14159265/180" }
var={ name=buffer value="" }
var={ name=todisp value="" }
var={ name=tobuff value="" }
hbox={ name=noborder
vbox={ name=noborder
vbox={ 
message={ value="Display" }
text={ name=display value="0" height=50 width=300 }
}
vbox={
message={ value="Memory" }
text={ name=mem value="0" height=50 width=300 }
}
}
vbox={ name=noborder
button={ label="Clear display" action="ASSIGN display 0" }
button={ label="Clear memory " action="ASSIGN mem 0" }
button={ label="Clear all    " action="ASSIGN display 0" 
      action="ASSIGN buffer " action="ASSIGN mem 0" 
      action="ASSIGN todisp " action="ASSIGN tobuff " }
choice={ label="Trig units" action="ASSIGN trigcon $val"
	item={ label="DEG" value="*3.14159265/180" }
	item={ label="RAD" value="" }
}
}
}
hbox={ name=noborder
vbox={ name=noborder
hbox={ name=noborder
button={ label=" 7 " 
 action="ASSIGN todisp $(todisp)7" 
 action="ASSIGN display $(todisp)" 
 action="ASSIGN tobuff $(display)" 
}
button={ label=" 8 " 
 action="ASSIGN todisp $(todisp)8" 
 action="ASSIGN display $(todisp)" 
 action="ASSIGN tobuff $(display)" 
}
button={ label=" 9 " 
 action="ASSIGN todisp $(todisp)9" 
 action="ASSIGN display $(todisp)" 
 action="ASSIGN tobuff $(display)" 
}
}
hbox={ name=noborder
button={ label=" 4 " 
 action="ASSIGN todisp $(todisp)4" 
 action="ASSIGN display $(todisp)" 
 action="ASSIGN tobuff $(display)" 
}
button={ label=" 5 " 
 action="ASSIGN todisp $(todisp)5" 
 action="ASSIGN display $(todisp)" 
 action="ASSIGN tobuff $(display)" 
}
button={ label=" 6 " 
 action="ASSIGN todisp $(todisp)6" 
 action="ASSIGN display $(todisp)" 
 action="ASSIGN tobuff $(display)" 
}
}
hbox={ name=noborder
button={ label=" 1 " 
 action="ASSIGN todisp $(todisp)1" 
 action="ASSIGN display $(todisp)" 
 action="ASSIGN tobuff $(display)" 
}
button={ label=" 2 " 
 action="ASSIGN todisp $(todisp)2" 
 action="ASSIGN display $(todisp)" 
 action="ASSIGN tobuff $(display)" 
}
button={ label=" 3 " 
 action="ASSIGN todisp $(todisp)3" 
 action="ASSIGN display $(todisp)" 
 action="ASSIGN tobuff $(display)" 
}
}
hbox={ name=noborder
button={ label=" 0 " 
 action="ASSIGN todisp $(todisp)0" 
 action="ASSIGN display $(todisp)" 
 action="ASSIGN tobuff $(display)" 
}
button={ label=" . " 
 action="ASSIGN todisp $(todisp)." 
 action="ASSIGN display $(todisp)" 
 action="ASSIGN tobuff $(display)" 
}
button={ label="+/-" 
 action="ASSIGN display `echo ""-$(display)"" | sed -e 's,--,,g' `" 
 action="ASSIGN tobuff $(display)" 
}
}
}
vbox={ name=noborder
button={ label=" + " 
 action="ASSIGN buffer $(buffer)$(tobuff)+" action="ASSIGN todisp " }
button={ label=" - " 
 action="ASSIGN buffer $(buffer)$(tobuff)-" action="ASSIGN todisp " }
button={ label=" * " 
 action="ASSIGN buffer $(buffer)$(tobuff)*" action="ASSIGN todisp " }
button={ label=" / " 
 action="ASSIGN buffer $(buffer)$(tobuff)/" action="ASSIGN todisp " }
button={ label=" = " 
 action="ASSIGN buffer $(buffer)$(tobuff)" 
 action="ASSIGN display `echo ""$(buffer)"" $calc  `" 
 action="ASSIGN buffer "  
 action="ASSIGN tobuff $(display) "  
 action="ASSIGN todisp " }
}
vbox={ name=noborder
hbox={ name=noborder
button={ label="x^2" 
 action="ASSIGN display `echo ""$(display)^2"" $calc `"
 action="ASSIGN tobuff $(display) "  
}
button={ label="SQT" 
 action="ASSIGN display `echo ""sqrt($(display))"" $calc `"
 action="ASSIGN tobuff $(display) "  
}
button={ label="1/x" 
 action="ASSIGN display `echo ""1/$(display)"" $calc `"
 action="ASSIGN tobuff $(display) "  
}
button={ label="x^y" 
 action="ASSIGN buffer $(buffer)$(display)^" action="ASSIGN todisp "
}
}
hbox={ name=noborder
button={ label=" ( " 
 action="ASSIGN buffer $(buffer)(" action="ASSIGN todisp "
 action="ASSIGN tobuff " }
button={ label=" ) " 
 action="ASSIGN buffer $(buffer)$(tobuff))" action="ASSIGN todisp "
 action="ASSIGN tobuff " }
button={ label="e^x" 
 action="ASSIGN display `echo ""e($(display))"" $calc `"
 action="ASSIGN tobuff $(display) "  }
button={ label=" ln" action="ASSIGN display `echo ""l($(display))"" $calc `"
 action="ASSIGN tobuff $(display) "  }
}
hbox={ name=noborder
button={ label="sin" 
 action="ASSIGN display `echo ""s($(display)$(trigcon))"" $calc `"
 action="ASSIGN tobuff $(display) "  }
button={ label="cos" 
 action="ASSIGN display `echo ""c($(display)$(trigcon))"" $calc `"
 action="ASSIGN tobuff $(display) "  }
button={ label="tan" 
 action="ASSIGN display \
 `echo ""s($(display)$(trigcon))/c($(display)$(trigcon))"" $calc `"
 action="ASSIGN tobuff $(display) "  }
button={ label=" PI" action="ASSIGN display 3.14159265" 
 action="ASSIGN tobuff $(display) "  }
}
hbox={ name=noborder
var={ name=temp value="" }
button={ label="STO" action="ASSIGN mem $display" 
 action="ASSIGN todisp " }
button={ label="RCL" action="ASSIGN display $mem" 
 action="ASSIGN tobuff $(display) "  }
button={ label="SUM" action="ASSIGN mem `echo ""$mem + $display"" $calc `" 
 action="ASSIGN todisp " }
button={ label="EXC" 
 action="ASSIGN temp $mem" 
 action="ASSIGN mem $display" action="ASSIGN display $temp" 
 action="ASSIGN todisp " 
 action="ASSIGN tobuff $(display) "  }
}
}
}
