window title="Population Simulation" #onClose=".workingDirQuit"

menu nitems=1 label=File
  menuitem label="Save As..." function=calcAssess action=save
  #menuitem label=Exit function=".workingDirQuit"
menu nitems=3 label=View
  menu nitems=1 label=Docs     
    menuitem label="Background" function=openFile action=PopSimDoc.pdf
  menuitem label="R Code" function=openFile action=PopSim.r
  menuitem label=Window   function=openFile action=PopSimWin.txt

grid 1 2 sticky=NW
#---------------------------LEFT
	grid 4 1 sticky=NW 
		grid 22 2 sticky=NW
			label text="Maturity parameters" font=bold sticky=W
			null
			label text="Age class at 50% maturity" sticky=W
			entry name=am50 action=am50 value=2       function=calcAssess mode=numeric width=7 sticky=W
			label text="Age class at 95% maturity" sticky=W
			entry name=am95 action=am95 value=5       function=calcAssess mode=numeric width=7 sticky=W
			label text="Selectivity parameters" font=bold sticky=W
			null
			label text="Age class at 50% selectivity" sticky=W
			entry name=as50 action=as50 value=4       function=calcAssess mode=numeric width=7 sticky=W
			label text="Age class at 95% selectivity" sticky=W
			entry name=as95 action=as95 value=5       function=calcAssess mode=numeric width=7 sticky=W
			label text="Weight parameters" font=bold sticky=W
			null
			label text="w infinity (kg)" sticky=W
			entry name=winf action=winf value="1.5"   function=calcAssess mode=numeric width=7 sticky=W
			label text="L infinity (mm)" sticky=W
			entry name=linf action=linf value="500"   function=calcAssess mode=numeric width=7 sticky=W
			label text="VonBertalanffy b" sticky=W
			entry name=b action=b value="2.8"         function=calcAssess mode=numeric width=7 sticky=W
			label text="VonBertalanffy t0" sticky=W
			entry name=t0 action=t0 value="-0.2"      function=calcAssess mode=numeric width=7 sticky=W
			label text="VonBertalanffy K" sticky=W
			entry name=k action=k value="0.2"         function=calcAssess mode=numeric width=7 sticky=W
			label text="Fishing rates" font=bold sticky=W
			null
			label text=h1 sticky=W
			entry name=h1 action=h1 value=3           function=calcAssess mode=numeric width=7 sticky=W
			label text=h2 sticky=W
			entry name=h2 action=h2 value=1           function=calcAssess mode=numeric width=7 sticky=W
			label text="Time span" font=bold sticky=W
			null
			label text="Number of age classes" sticky=W
			entry name=A action=A value=30            function=calcAssess mode=numeric width=7 sticky=W
			label text="Number of years" sticky=W
			entry name=T action=T value=40            function=calcAssess mode=numeric width=7 sticky=W
			label text="Other parameters" font=bold sticky=W
			null
			label text="Natural mortality rate" sticky=W
			entry name=M action=M value=0.05          function=calcAssess mode=numeric width=7 sticky=W
			label text="Mean recruitment (units)" sticky=W
			entry name=R action=R value=1             function=calcAssess mode=numeric width=7 sticky=W
			label text=Catchability sticky=W
			entry name=q action=q value=1             function=calcAssess mode=numeric width=7 sticky=W
		check name=chk checked=T text="Enable constraints" mode=logical sticky=W
		grid 8 2 sticky=NW
			label text="Standard errors       " font=bold sticky=W
			null
			label text="Recruitment process error" sticky=W
			entry name=sigma1 action=sigma1 value=1   function=calcAssess mode=numeric width=7 sticky=W
			label text="Recruitment autocorrelation"  sticky=W
			entry name=gamma1 action=gamma1 value=0.5 function=calcAssess mode=numeric width=7 sticky=W
			label text="Survival process error" sticky=W
			entry name=sigma2 action=sigma2 value=0.9 function=calcAssess mode=numeric width=7 sticky=W
			label text="Index measurement error" sticky=W
			entry name=tau1 action=tau1 value=1   function=calcAssess mode=numeric width=7 sticky=W
			label text="Age measurement error    " sticky=W
			null
			radio name=doDir mode=logical text="Logistic Normal sd" value=FALSE selected=TRUE sticky=W padx=5
			entry name=tau2 action=tau2 value=0.9  function=calcAssess mode=numeric width=7 sticky=W
			radio name=doDir mode=logical text="Dirichlet effective N" value=TRUE selected=FALSE sticky=W padx=5
			entry name=dirN action=dirN value=100 function=calcAssess mode=numeric width=7 sticky=W
		text name=msg value="Notes:" height=3 width=34 edit=T 

#---------------------------RIGHT
	grid 5 1 sticky=NW 
		grid 1 4 stick=E
			label text=View: font=bold
			button text=Docs     function=openFile action=PopSimDoc.pdf
			button text="R Code" function=openFile action=PopSim.r
			button text=Window   function=openFile action=PopSimWin.txt
		grid 2 1 sticky=NE
			label text="Display properties" font=bold sticky=W
			grid 5 2 sticky=W
				label text="Max bubble size     " sticky=W
				entry name=maxB value=0.15 action=disp function=calcAssess mode=numeric width=5 sticky=W
				label text="Bubble power" sticky=W
				entry name=powr value=0.5 action=disp function=calcAssess mode=numeric width=5 sticky=W
				label text="Highlight top" sticky=W
				grid 1 2
					entry name=percent value=10 action=disp function=calcAssess mode=numeric width=5 sticky=E
					label text="%" sticky=W
				label text="Display numbers" sticky=W
				radio name=unitType value=numbers action=disp function=calcAssess mode=character
				label text="Display biomass" sticky=W
				radio name=unitType value=biomass action=disp function=calcAssess mode=character
		grid 15 1 sticky=NE
			label text="Choose a display" font=bold sticky=W
			label text="Hidden states" font="11" sticky=W
			radio name=plotType value=recruit   text="Recruits"                action=disp function=calcAssess mode=character sticky=W
			radio name=plotType value=total     text="Total population"        action=disp function=calcAssess mode=character sticky=W
			radio name=plotType value=spawner   text="Spawners"                action=disp function=calcAssess mode=character sticky=W
			radio name=plotType value=select    text="Selected population"     action=disp function=calcAssess mode=character sticky=W
			radio name=plotType value=compare   text="Comparison chart"        action=disp function=calcAssess mode=character sticky=W
			radio name=plotType value=spawnVSrt text="Recruitment vs spawners" action=disp function=calcAssess mode=character sticky=W
			radio name=plotType value=dbubble   text="Theoretical ages"        action=disp function=calcAssess mode=character sticky=W
			radio name=plotType value=sbubble   text="True ages"               action=disp function=calcAssess mode=character sticky=W
			radio name=plotType value=fish      text="Fishing mortality"       action=disp function=calcAssess mode=character sticky=W
			label text="Measurements" font="11" sticky=W
			radio name=plotType value=catch     text="Catch"                   action=disp function=calcAssess mode=character sticky=W
			radio name=plotType value=index     text="Observed index"          action=disp function=calcAssess mode=character sticky=W
			radio name=plotType value=pbubble   text="Observed ages"           action=disp function=calcAssess mode=character sticky=W
		grid 1 3 sticky=W pady=5
			button text="Interact" action=interact function=calcAssess sticky=W
			button text="Save As..." action=save function=calcAssess sticky=W padx=5
			button text="Recalculate" action="recalc" function=calcAssess sticky=W bg=greenyellow
		grid 2 1 sticky=E
			label text="History" font=bold
			history sticky=E
