load_file("nrngui.hoc")

objectvar ocbox_, ocbox_list_, scene_, scene_list_
objref sph

{ocbox_list_ = new List()  scene_list_ = new List()}

vplot=1


//open RunControl and set defaults
{
xpanel("RunControl", 0)
xvalue("Init","v_init", 1,"stdinit()", 1, 1 )
xbutton("Init & Run","run()")
xbutton("Stop","stoprun=1")
xvalue("Continue til","runStopAt", 1,"{continuerun(runStopAt) stoprun=1}", 1, 1 )
xvalue("Continue for","runStopIn", 1,"{continuerun(t + runStopIn) stoprun=1}", 1, 1 )
xbutton("Single Step","steprun()")
xvalue("t","t", 2 )
xvalue("Tstop","tstop", 1,"tstop_changed()", 0, 1 )
xvalue("dt","dt", 1,"setdt()", 0, 1 )
xvalue("Points plotted/ms","steps_per_ms", 1,"setdt()", 0, 1 )
xvalue("Scrn update invl","screen_update_invl", 1,"", 0, 1 )
xvalue("Real Time","realtime", 0,"", 0, 1 )
xpanel(680,8)
}

objref grph0
objref scene_vector_[8]

if (vplot) {
	grph0 = new Graph(0)
	scene_vector_[5] = grph0
	{grph0.view(0, -69, 500, 40, 800, 400, 800, 350)}
	//(mleft, mbottom, mwidth, mheight, wleft,wtop, wwidth, wheight)
	// in a window with user-specified location (5th and 6th args) and size (last 2 args)
	graphList[0].append(grph0)
	//addplot(g,0)
	//g.size(0, 500, -80, -50)        // specify coordinate system for the canvas drawing area
	//g.simgraph()
	//g.family(1)
// 	grph0.addvar("Axon[20].v(0.5)", 4,1)
	grph0.addvar("Tines[0].v(0.5)", 4,1)
// 	grph0.addvar("Handle[10].v(0.5)", 1,1)
// 	grph0.addvar("FieldC[22].v(0.5)", 7,1)
// 	grph0.addvar("FieldB[28].v(0.5)", 5,1)
// 	grph0.addvar("MainTrunk[0].v(0.5)", 3,1)
// 	grph0.addvar("Tines[786].v(0.5)", 4,1)
	grph0.addvar("soma.v(0.5)", 6,1)
}

// dt = 0.02
// steps_per_ms = 25
// screen_update_invl = 0.1

/*0 white
1 black
2 red
3 blue
4 green
5 orange
6 brown
7 violet
8 yellow
9 gray*/
/*

objectvar gi
gi = new Graph(0)
scene_vector_[6] = gi
{gi.view(-10, 0, 500, 0, 100, 300, 700, 300)}
graphList[0].append(gi)
gi.addvar("Tines[786].g_KD( 0.5 )", 1, 1, 0.8, 0.9, 2)
gi.addvar("Tines[786].g_h( 0.5 )", 3, 1, 0.8, 0.9, 2)
*/