classes
close hide leader printfile
count iconify manager save
deco is_mapped map scale
deiconify jwindow name snap
group landscape paper_place window_place
SYNTAX
p = new PWManager()
DESCRIPTION
A variety of hooks into the Print&FileWindowManager to allow program control
of that tool. The implementation of the
Window item of the NeuronMainMenu makes
heavy use of this class. Note that the first window created is called
the leader. It cannot be closed.
PWManager
SYNTAX
cnt = p.count()
DESCRIPTION
Returns number of "Printable" windows on the screen.
PWManager
SYNTAX
boolean = p.is_mapped(index)
DESCRIPTION
Return 1 if the index'th window is visible.
PWManager
SYNTAX
p.map(index)
DESCRIPTION
Makes the index'th window visible.
PWManager
SYNTAX
p.hide(index)
DESCRIPTION
Unmaps the index'th window. The window is NOT closed.
PWManager
SYNTAX
p.close(index)
DESCRIPTION
Closes the index'th window. This will destroy the window and decrement the
reference count of the associated hoc object (if any).
PWManager
SYNTAX
p.iconify()
DESCRIPTION
Hides all windows and iconifies the leader.
PWManager
SYNTAX
p.deiconify()
DESCRIPTION
Un-iconifies the leader window and maps any windows not hidden before it was
iconified.
PWManager
SYNTAX
index = p.leader()
DESCRIPTION
Window index of the leader window.
PWManager
SYNTAX
index = p.manager()
DESCRIPTION
Window index of the Print&FileWindowManager window.
PWManager
SYNTAX
n = p.save("filename", group_object, ["header"])
n = p.save("filename", selected, ["header"])
DESCRIPTION
Create a session file with the given filename
consisting oo all windows associated with a
particular group_object in a session file
If selected == 0 then all windows are saved. If selected==1 then only
the windows on the paper icon are saved in the session file.
If the header argument exists, it is copied to the beginning of the file.
SEE ALSO
save_session
PWManager
SYNTAX
group_obj = p.group(index, group_obj)
group_obj = p.group(index)
DESCRIPTION
Associate the index'th window with the group object and returns the
group object associated with that window.
PWManager
SYNTAX
p.snap()
p.snap("filename")
DESCRIPTION
Only works on the unix version.
Puts the GUI in snapshot mode until the 'p' keyboard character is pressed.
During this time the mouse can be used normally to pop up menus or drag
rubberbands on graphs. When the p character is pressed all windows including
drawings of the window decorations, menus, rubberband, and mouse arrow cursor is
printed to a postscript file with the "filename" or filebrowser selection.
PWManager
SYNTAX
index = p.jwindow(hoc_owner, mapORhide, x, y, w, h)
DESCRIPTION
Manipulate the position and size of a java window frame associated with the
java object referenced by the hoc object. The mapORhide value may be 0
or 1. The index of the window is returned. This is used by session file
statements created by the java object in order to specify window attributes.
PWManager
SYNTAX
p.scale(x)
DESCRIPTION
Works only under mswin.
Immediately rescales all the windows (including font size) and their position
relative to the top, left corner of the screen according to the absolute
scale factor x.
i.e, a scale value of 1 gives normal size windows.
PWManager
SYNTAX
strdef = p.name(index)
DESCRIPTION
Returns the window title bar string of the index'th window.
PWManager
SYNTAX
p.window_place(index, left, top)
DESCRIPTION
moves the index window to the left,top pixel
coordinates of the screen.
PWManager
SYNTAX
p.paper_place(index, show)
p.paper_place(index, left, bottom, scale)
DESCRIPTION
Shows or hides the ith window on the
paper icon. If showing, this constitutes adding this window to the list of
selected windows.
The 4 arg form shows, places, and scales
the index window on the paper icon. The scale and location only has an effect when
the paper is printed in postscript mode.
PWManager
SYNTAX
p.landscape(boolean)
DESCRIPTION
Determines if postscript printing is in landscape
or portrait mode.
PWManager
SYNTAX
p.deco(mode)
DESCRIPTION
When printing in postscript mode,
0 print only the interior of the window.
1 print the interior and the title above each window
2 print the interior and all window decorations including the window title.
PWManager
SYNTAX
p.printfile("filename", mode, selected)
DESCRIPTION
Print to a file in postcript, idraw, or ascii mode (mode=0,1,2) the selected windows
or all the windows( selected=0,1)
neuron/general/classes/pwman.hel : May 13 2012