Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!ssc-vax!lee From: lee@ssc-vax.UUCP (Lee Carver) Newsgroups: comp.sys.apollo Subject: Re: David Letterman's top ten list of Apollo questions. Summary: Help with more of them Message-ID: <1231@ssc-bee.ssc-vax.UUCP> Date: 20 Feb 89 17:04:39 GMT References: <15210@vlsisj.VLSI.COM> Organization: Boeing Aerospace Corp., Seattle WA Lines: 74 In article <15210@vlsisj.VLSI.COM>, bennett@vlsisj.VLSI.COM (Michael Bennett) writes: > Does anyone know how to: > > 2) Create a window whose size includes the legend and border? > It seems that when I use: > > window.left = 100; > window.top = 100; > window.width = 100; > window.height = 100; > pad_$create_window("", (unsigned short) 0, pad_$transcript, > window_no, window, ios_id, status); > > the window specified is really the interior of the window. The > exterior of the window that I get is l=96, t=76,b=204,r=204. > These numbers are different on different machines. I think that > is because the size of the fonts used on those machines is > different, so the legend changes size. You can try getting the current font size, and then working out the calculation yourself, but this is tough. The standard font calls don't provide all the information that really exists. > 7) Get a the name of the process a 'C' program or shell script is > running in from that program or shell script? # process-name: get the name of the current process # pst -c @ | fpat '' @ | edstr -e 's/ */ /g' @ | exfld -t ' ' $6 This works because the shell scripts normally run 'inprocess'. Note that it writes the process name to standard out, which you can easily capture with 'active functions': proc := (( ^"process-name" )) > > 8) Use the DM mark stack to do anything useful? i.e. How in heck > does that #!&$% mark stack work? You can use it to set up your icon areas. The problem is that most interesting Apollo commands seem to clear the mark stack. > > 9) Get the parameters (baseline, line height, etc) for a fixed pitch font? > The method I use now is show below. It seems to work for f5x9 but not for > f9x15. I remember a similar problem. It seems that the 'interline font spacing' is not available from any Apollo calls. That was my problem, at least. Never did build up the nerve to read the font files directly (where the information really DOES exist, see EDFONT). ----- As an aside, it seems that X has a more complete model of fonts and windows anyway. I realize that X is not everyones answer (especially in the sort term), but all the information appears to be available. You may be able to wait. Except for that fixed size window problem. I really wonder what you are up to, and what the basis for you user interface is that REQUIRES a fixed size window. Anyway, X won't (easily) let you fix it at a single size. You must be prepared to run in whatever window you get. It is the USERS option to decide how much real-estate he can dedicate to a single application. (Sorry about the high-horse, but @#$&*%&#$#!!) Lee Carver Boeing Aerospace