classes
classes dialog intercept priority save dismiss_action map ref unmap
HBox()
HBox(frame)
VBox()
VBox(frame)
VBox(frame, 0or1)
As with all classes, a box must have an object reference pointer, and
can be manipulated through this pointer. You must use the .map
command to make a box appear on the screen.
A VBox with a second arg of 1 makes a vertical scrollbox.
HBox()
tiles windows horizontally.
VBox()
tiles windows vertically.
The default frame is an inset frame. The available frames are:
creates an empty box on the screen with a light gray inset frame.objref b b = new VBox(2) b.map
VBox
box.intercept(1)
box.intercept(0)
objref vbox, g vbox = new VBox() vbox.intercept(1) //all following creations go into the "vbox" box g = new Graph() xpanel("") x=3 xvalue("x") xbutton("press me", "print 1") xpanel() vbox.intercept(0) //ends intercept mode vbox.map() //draw the box and its contents
VBox
.map("label")
.map("label", left, top, width, height)
creates an empty box on the screen with a light gray inset frame.objref b b = new VBox(2) b.map //actually draws the box on the screen
VBox
b.unmap()
b.unmap(accept)
If the box is in a dialog the argument refers to the desired return value of the dialog, 1 means accept, 0 means cancel.
VBox
box.save("proc_name")
box.save("string")
box.save(str, 1)
box.save(str, obj)
The default save procedure is to recursively save all the items in the box. This is almost always the wrong thing to do since all the semantic connections between the items are lost.
Generally a box is under the control of some high level object which implements the save procedure. box.save("string") writes string\n to the open session file. box.save(str, 1) returns the open session file name in str.
VBox
.ref(objectvar)
objectvar
references
the object). When .ref
is used, the string in .save
is executed
in the context of the object.
Note: When objects are inaccessible to hoc from a normal objref they can still be manipulated from the interpreter through use of their instance name, ie the class name followed by some integer in brackets. As an alternative one may also use the dismiss_action to properly set the state of an object when a box it manages is dismissed from the screen.
VBox
.dismiss_action("command")
VBox
b = box.dialog("label")
b = box.dialog("label", "Accept label", "Cancel label")
The box may be dismissed under program control by calling b.unmap(boolean) where the argument to unmap is the desired value of the return from the dialog.
VBox
box.priority(integer)
The priority scheme, of course, does not guarantee that a session file is consistent in isolation since it may depend on windows not saved.
Priority range is -1000 to 10000
Some existing priorities are:
SingleCompartment 1000 CellBuild 1000 PointProcessManager 990 Electrode 990 PointGroupManager 980 NetworkReadyCell 900 ArtificialCell 900 NetGUI 700 SpikePlot 600 Inserter 900 RunFitter 100 FunctionFitter 100 MulRunFitter 100