Terry Dartnall asked this question, and it may be of interested to
others:
> ....I wish
> the output window would pop into the forground when it gets new output.
> At present you have to ferret about for it (and esc e doesn't forground
> it when you hit the number of the file).
If you want an output file to be raised whenever printing goes to it,
put this in your vedinit.p file.
define vedinitfile;
;;; This procedure is run whenever a file is set or re-set on screen
;;; E.g. when printing is directed to the file.
;;; Raise and de-iconise output.p files.
if sys_fname_name(vedpathname) = 'output.p' then
;;; Raise the window of the current file, and warp to it
wved_set_input_focus(wvedwindow);
endif;
enddefine;
Alternatively instead of wved_set_input_focus you can try
wved_raise_window
Also if you want to control WHERE the output.p file comes and how many
rows and columns it has, e.g, to make the output.p file have 90 columns,
20 rows, and be offset 150 pixels from the left and 350 from the top
of screen you can do something like this after "then",
90, 20, 150, 350
-> xved_value("currentWindow", [numColumns numRows x y]);
You can also, to some extent, control the circumstances in which Xved
automatically warps to and raises a file. Set the global pop-11
variable vedwarpcontext.
This is described in REF WVED (Not a typo: it stands for Windowed Ved).
You can assign false or true (the default) or a list of procedure names
to vedwarpcontext, specifying contexts in which the cursor should warp
to a file, thereby raising that file.
E.g. I use this in my vedinit.p file
vars vedwarpcontext =
[vedsetonscreen vedswapfiles vedfileselect ved_rb];
Though I sometimes also include "vedquitfile" so that when I quit a file
Xved warps to the last file that previously accepted input.
Including "vedsetonscreen" means that when a file is FIRST created or
read in (e.g. output.p) it will be brought to the top.
Including "vedswapfiles" in the list means that by using "ESC x" to
switch between editing the last two files you can also make the
"current" file come to the top.
Including "vedfileselect" means that if you select a current file using
the "ESC e" menu it will be raised and ready for input.
Other options are described in REF WVED.
You can also (SIGH!) set that list as a resource in your .Xdefaults file
or whatever you use to set your X resources. The resource in question is
XVed.WarpContexts
E.g. your .Xdefaults file could include this
XVed.WarpContexts: [vedsetonscreen vedswapfiles vedfileselect ved_rb]
But I really don't like controlling Xved or anything else in Poplog via
X resources rather than via pop-11 variables, or whatever.
I assume it is wasteful to have your X server permanently informed of
what you want it to do with Xved as well as being hard to modify
dynamically, or on a per process basis (e.g. if you want to have two
versions of Xved running) in different ways.
However, when I first objected I was told that that was what X users
expected!
Aaron
===
|