/usr/share/nrn/lib/hoc/pointbsr.hoc is in neuron 7.5-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | begintemplate PointBrowser
objref plist, box, pp, this
strdef tempstr, label
proc init() {
plist = new List($s1) // the objects are not referenced by plist
box = new VBox()
box.ref(this)
box.intercept(1)
plist.browser("", label, "makelabel(hoc_ac_)")
plist.accept_action("accept(hoc_ac_)")
if (nrnglobalmechmenu($s1, 0)) {
xpanel("PointBrowser")
sprint(tempstr, "nrnglobalmechmenu(\"%s\")", $s1)
xbutton("Globals", tempstr)
xpanel()
}
box.intercept(0)
box.map($s1)
}
proc makelabel() {local x
pp = plist.object($1)
if (pp.has_loc()) {
x = pp.get_loc()
sectionname(tempstr)
pop_section()
sprint(label, "%s(%g)", tempstr, x)
}else{
label = "No Location"
}
objectvar pp //make sure we are not retaining a reference
}
proc accept() {
pp = plist.object($1)
if (pp.has_loc()) {
nrnpointmenu(pp)
}else{
continue_dialog("Point process not located")
}
objectvar pp
}
endtemplate PointBrowser
objref tempobj
strdef tempstr1, tempstr2
proc makePointBrowser() {
tempobj = new PointBrowser($s1)
objref tempobj
}
proc pointmenu() { local i
tempobj = new MechanismType(1)
xmenu("PointProcesses")
for i=0, tempobj.count() - 1 {
tempobj.select(i)
tempobj.selected(tempstr1)
sprint(tempstr2, "makePointBrowser(\"%s\")", tempstr1)
xbutton(tempstr1, tempstr2)
}
xmenu()
objref tempobj
}
|