From don Thu Mar 1 20:59:36 1990 Date: Thu, 1 Mar 90 20:59:36 -0500 To: NeWS-makers@brillig.umd.edu Subject: Re: Handling PostScript Errors From: ecn!wim@relay.EU.net (Wim Rijnsburger) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Anthony Worrall posted a request a few days ago for a more debug supporting version of psh. I think I have what he needs. We use as long as NeWS exists our own replacement for psh, called psrun. This command downloads server side code, catches errors and handles client-server communications appropriate. We use loose coupling of applications to the NeWS server, by redirecting stdout of the application to stdin of psrun and vice versa. Below you will find a shar archive of the complete source of psrun, including a manual page. After unpacking of this archive, edit the Makefile to set the BINDIR, MANDIR and LIBDIR appropriate. Then type 'make' to build everything. Test it out by something like: psrun -h psrun -d -L . -P "executive" All commands typed at stdin are given to the server. Try to type garbage to test the error catching. If everything looks fine, do a 'make install'. The manual page gives more explanations on usage. Wim. ---------- Netherlands Energy Research Foundation, ECN -------------- Wim Rijnsburger email: RIJNSBURGER@ECN.NL P.O. Box 1, 1755 ZG Petten, Holland phone: +31 2246 4673 ----------- Remove everything below and including this line ----------- : To unbundle, sh this file echo main.c cat >main.c <<'@@@ Fin de main.c' #include "def.h" /* * psrun: a general client-server coupling program * * The main program tries to connect with the server and load the * application into the server. * A child is forked to read stdin and pass it to the server * Then a loop is started to read tagged commands from the server. * * If the -d (debug) flag was given as an option, the psrun * reports the server's messages on stderr, in case * the interpreter failed for some reason. * * Immediate to execute PostScript commands can be passed to the * server via the option -P. For instance to get into executive * mode, where the server do not stop on errors: * * psrun -d -P "executive" * * Server side code files, passed as arguments to psrun are downloaded * by psrun into the server. The server searches files in a library * directory as given with the -L option. The default lib dir * is determined by a variable in the Makefile. * * (c) 1989 Copyright Wim Rijnsburger, ECN Petten, Holland * * ---------- Netherlands Energy Research Foundation, ECN -------------- * Wim Rijnsburger UUCP : wim@ecn.uucp * P.O. Box 1, 1755 ZG Petten(NH) ARPA : ecn!wim@nluug.nl * Holland phone: +31 2246 4336 ecn!wim@uunet.uu.net * */ main(argc, argv) int argc; char **argv; { #define STRBUFLEN 1024 char Buf1[STRBUFLEN], Buf2[STRBUFLEN], *LibDir = LIBDIR, *PsString = "", *ErrStr; int status = OK, debug = 0, pid, i, c, cid; FILE *InPipe; /* * Parse the options */ extern char *optarg; extern int optind, opterr; opterr = 0; while ((c = getopt(argc, argv, "dhL:P:")) != -1) switch (c) { case 'd': debug = 1; break; case 'L': LibDir = optarg; break; case 'P': PsString = optarg; break; case 'h': status = ARG_ERROR; break; case '?': status = ARG_ERROR; break; } /* * Connect to the server */ if (ps_open_PostScript() == NULL) status = SERVER_ERROR; if (status == OK) { fprintf(stderr, "%s\n", HEADER); if (argc == 1) { fprintf(stderr, "Use 'psrun -h' to get help\n"); } /* * Init the cps code */ ps_Init(); /* * Pass the client parameters and command arg's to the ps environment * Let the server load the application files */ fprintf(PostScript, "/ClientPwd (%s) def\n", getwd(Buf1)); fprintf(PostScript, "/LibDir (%s) def\n", LibDir); fprintf(PostScript, "/NewsLibDir (XNEWSHOME) getenv (/etc/NeWS) append def\n"); fprintf(PostScript, "/Debug? %d 1 eq def\n", debug); fprintf(PostScript, "%s\n", PsString); fprintf(PostScript, "/ClientArgv [\n"); for (; optind < argc; optind++) fprintf(PostScript, "(%s)\n", argv[optind]); fprintf(PostScript, "] def\n"); fprintf(PostScript, "ClientPwd ClientArgv loadFiles\n"); ps_flush_PostScript(); /* * Fork a child to read PS commands from stdin */ pid = fork(); if (pid < 0) status = FORK_ERROR; else if (pid == 0) { while (status == OK) { if (gets(Buf1) == NULL) { status = QUIT; strcpy(Buf1, "quit"); } fprintf(PostScript, "%s\n", Buf1); ps_flush_PostScript(); } exit (0); } else { /* * Read and handle tagged commands from the server-side */ while (status == OK) { if (psio_error(PostScriptInput)) status = PS_ERROR; else if (ps_tag_Quit()) status = QUIT; else if (ps_tag_Print(Buf1)) { printf("%s", Buf1); fflush(stdout); } else if (ps_tag_Error(Buf1)) { fprintf(stderr, "%s", Buf1); fflush(stderr); } else if (ps_tag_System(&cid, Buf1)) { system(Buf1); if (cid) ps_CidExec(cid, "exit"); } else if (ps_tag_Popen(&cid, Buf1)) { InPipe = (FILE *) popen(Buf1, "r"); if (InPipe == NULL) status = POPEN_ERROR; else { strcpy(Buf1, "["); while (fgets(Buf2, STRBUFLEN, InPipe) != NULL) { strcat(Buf1, "("); strncat(Buf1, Buf2, strlen(Buf2) - 1); strcat(Buf1, ")"); } strcat(Buf1, "] exit"); ps_CidExec(cid, Buf1); pclose(InPipe); } } else if (debug) { if (fgets(Buf1, STRBUFLEN, PostScriptInput) > 0) fprintf(stderr, Buf1); else status = PS_ERROR; } else status = PS_ERROR; } /* * Clean up and quit */ ps_close_PostScript(); } } /* * Exit */ switch (status) { case ARG_ERROR: ErrStr = (char *) sprintf(Buf2, "usage: %s [-dh] [-L LibDir] [-P PsString] [ PsFiles ]\n", argv[0]); break; case IO_ERROR: ErrStr = "IO error"; break; case SERVER_ERROR: ErrStr = "Cannot contact NeWS server"; break; case PS_ERROR: ErrStr = "PS error"; break; case FORK_ERROR: ErrStr = "Fork failed"; break; case CHILD_ERROR: ErrStr = "Child error"; break; default: ErrStr = (char *) sprintf(Buf2, "abnormal termination, status = %d", status); break; } if (status != QUIT) fprintf(stderr, "%s: %s\n", argv[0], ErrStr); exit(status); } @@@ Fin de main.c echo client.cps cat >client.cps <<'@@@ Fin de client.cps' % % Define the tag's % #define QUITTAG 100 #define PRINTTAG 101 #define ERRORTAG 102 #define SYSTEMTAG 103 #define POPENTAG 104 % % Tag routines to poll the server % cdef ps_tag_Quit() => QUITTAG cdef ps_tag_Print(string s) => PRINTTAG(s) cdef ps_tag_Error(string s) => ERRORTAG(s) cdef ps_tag_System(int i, string s) => SYSTEMTAG(i, s) cdef ps_tag_Popen(int i, string s) => POPENTAG(i, s) % % Routine to return a Cid result and exit % cdef ps_CidExec(int id, string s) id {s cvx exec} sendcidevent % % Initialization % cdef ps_Init() % % Tagged commands interface % /c_Quit { % - => - QUITTAG tagprint } def /c_Error { % string => - ERRORTAG tagprint typedprint } def /c_Debug { % string => - Debug? { c_Error } { pop } ifelse } def /c_Print { % string => - PRINTTAG tagprint typedprint } def /c_System { % string => - SYSTEMTAG tagprint 0 typedprint typedprint } def /c_SystemAndWait { % string => - % send args: tag id string /MyCID uniquecid def SYSTEMTAG tagprint MyCID typedprint typedprint % wait until completed [ MyCID cidinterest ] forkeventmgr waitprocess pop } def /c_PopenAndWait { % string => string % send args: tag id string /MyCID uniquecid def POPENTAG tagprint MyCID typedprint typedprint % wait until completed [ MyCID cidinterest ] forkeventmgr waitprocess } def % % Safe executor % /safeExec { % string|key|proc => boolean cvx stopped { ExecutiveErrorHandler true } { false } ifelse } def % % Load files % /loadFiles { % dirname [filenames .. ] => - { 1 index exch safeRun {exit} if } forall pop } def /safeRun { % dirname filename => boolean { (r) openFile dup null eq { pop } { cvx exec } ifelse } safeExec } def % % Open a file in a directory % /openFile { % dirname filename mode => file|null 1 index length 0 eq { pop pop pop null } { 3 -1 roll % drop the dirname if filename is already complete 2 index 0 get (/) 0 get eq { pop () } if % Complete the dirname with a trailing slash dup length 0 gt { dup dup length 1 sub get (/) 0 get ne { (/) append } if } if % Complete the path and insert the client PWD, if not complete 3 -1 roll append dup 0 get (/) 0 get ne { ClientPwd dup dup length 1 sub get (/) 0 get ne { (/) append } if exch append } if 2 copy [ 3 1 roll ] (openFile: (%) %\n) exch sprintf c_Debug exch % Open the file { 2 copy file } stopped { pop pop (openFile: %\n) [ $error /errorname get ] sprintf c_Error null } if % stack: string string file|null % Skip over a #! line if opened for read dup null ne 2 index 0 get (r) 0 get eq and { dup 255 string readline pop (#!) anchorsearch { pop pop } { pop closefile 2 copy file } ifelse } if % Return the file object 3 1 roll pop pop } ifelse } def @@@ Fin de client.cps echo Makefile cat >Makefile <<'@@@ Fin de Makefile' TARGET =psrun VERSION =1.5 AUTHOR =Wim Rijnsburger INSTITUTION =ECN Petten Holland YEAR =1989 INSTDIR =$(OPENWINHOME) BINDIR =$(INSTDIR)/bin LIBDIR =$(INSTDIR)/lib/VisualObjects MANEXT =l MANDIR =$(INSTDIR)/share/man/man$(MANEXT) CC =cc CFLAGS = C_SCR =main.c CPS_SRC =client.cps INCLUDE =def.h MANPAGE =man.txt MISC =Makefile $(MANPAGE) LIBS =-I$(OPENWINHOME)/include -L$(OPENWINHOME)/lib -lcps ALL =$(C_SCR) $(CPS_SRC) $(MISC) $(INCLUDE) C_OBJ =$(C_SCR:.c=.o) CPS_H =$(CPS_SRC:.cps=.h) HEADER =$(TARGET) $(VERSION) (c) $(YEAR) $(AUTHOR), $(INSTITUTION) .c.o: cc -O -c -DHEADER=\""$(HEADER)"\" -DLIBDIR=\""$(LIBDIR)"\" $(LIBS) $< $(TARGET): $(C_OBJ) $(CC) $(CFLAGS) $(C_OBJ) -o $(TARGET) $(LIBS) $(CPS_H): $(CPS_SRC) cps $(CPS_SRC) $(C_OBJ): $(CPS_H) $(INCLUDE) new: rm -f $(TARGET) $(C_OBJ) $(CPS_H) core *% *.BAK clean: rm -f core *% *.BAK list: $(ALL) enscript -G -b"$(HEADER)" $? touch list backup: rm -f bak/* cp $(ALL) bak install: install -d $(BINDIR) install -s $(TARGET) $(BINDIR) install -d $(MANDIR) install -c -m 444 $(MANPAGE) $(MANDIR)/$(TARGET).$(MANEXT) update: $(TARGET) make install touch update shar: $(TARGET).shar $(TARGET).shar: $(ALL) \rm -f $(TARGET).shar shar $(ALL) > $(TARGET).shar @@@ Fin de Makefile echo man.txt cat >man.txt <<'@@@ Fin de man.txt' .TH BACKUP 1 "1 MARCH 1990" "ECN, Petten (Holland)" .SH NAME psrun \- a general client-server coupling program for NeWS applications .SH SYNOPSIS .B psrun [-dh] [-L \fILibDir\fP] [-P \fIPsString\fP] [ \fIPsFiles\fP ] .SH DESCRIPTION .LP \fIpsrun\fP is a utility for loosely coupling of client side code with the window server and to down load server side code into the server. The main program tries to connect with the server and load the application into the server. A child is forked to read stdin and pass it to the server. Then a loop is started to read tagged commands from the server. If the \fB-d\fP (debug) flag was given as an option, the psrun reports the server's messages on stderr, in case the interpreter failed for some reason. Commands entered at stdin are interpreted by the server and responses appear at stdout of \fBpsrun\fP. Server side code files, passed as arguments to psrun are downloaded by psrun into the server. The server searches files in a library directory as given with the \fB-L\fP \fILibDir\fP option. The default \fILibDir\fP is determined by a variable in the Makefile. The server side code can communicate with the client side via \fBc_Print\fP to send a string to stdout. Via \fBc_Error\fP and \fBc_Debug\fP messages are send to stderr. With \fBc_Quit\fP the server side code quits the session. Immediate to execute PostScript commands can be passed to the server via the option \fB-P\fP. For instance to get into executive mode, where the server do not stop on errors: .LP .RS .nf .IP "\fBpsrun -d -P 'executive (Type 'c_Quit' to stop\n) c_Error'\fP" .RE .fi .LP Loose coupling with the client side of an application can be done with redirection of stdin and stdout. For instance: .LP .RS .nf .IP "\fB/etc/mknod p1 p2\fP" .IP "\fBpsrun -d -P 'executive' -L . \fImyapplPSfiles\fP < p1 > p2 &\fP" .IP "\fB\fImyappl\fP < p2 > p1\fP" .RE .fi .LP .SH FILES .TP 2.2i /usr/openwin/bin/psrun the command is usually installed here .TP /usr/openwin/lib/VisualObjects default directory to search library files .SH "SEE ALSO" psh(1) .SH DIAGNOSTICS The status messages given by the command should be self explanatory. .SH AUTHOR Wim Rijnsburger, ECN, PO box 1, 1755 ZG Petten (NH), Holland. .SH BUGS This is a preliminary release. Please contact me about bugs and wishes. .SH NOTES The development of \fBpsrun\fP is part of the \fBVisualObjects\fP research project of the \fINetherlands Energy Research Foundation (ECN), Petten (NH), Holland\fP. @@@ Fin de man.txt echo def.h cat >def.h <<'@@@ Fin de def.h' #include "client.h" #define NOT ! #define AND && #define OR || #define ARG_ERROR 2 #define QUIT 1 #define OK 0 #define IO_ERROR -1 #define SERVER_ERROR -2 #define PS_ERROR -3 #define FORK_ERROR -4 #define CHILD_ERROR -5 #define POPEN_ERROR -6 @@@ Fin de def.h exit 0 From don Fri Mar 2 19:13:08 1990 Date: Fri, 2 Mar 90 19:13:08 -0500 To: NeWS-makers@brillig.umd.edu Subject: Re: What is Sun doing? From: Mark Smith Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) In response to David Lau-Kee's posting "What is Sun doing?", Tom Schneider writes: > There was an article in (the 1990 January issue?) of Scientific American > about technical races. It seems that when two nearly equivalent products > appear, one of them can take over because of random market forces. So VHS > beat out Beta video. It is tempting to draw an analogy between NeWS and Betamax, in that both are seen as "technically superior" products which lost in the marketplace. One flaw in the analogy is that VHS and Betamax were competing technologies meant to do exactly the same thing; there was no point in both surviving. With NeWS, Sun has the opportunity to position it as a complementary rather than purely competing technology to X. This whole "X vs. NeWS" debate, implying that there can be only one winner, has inevitably damaged NeWS more than X. Because X has a C-based interface (well, a multitude of them actually), it will be *perceived* as easier to learn and use by the vast majority of the Unix/PC programmer community. Look at the commercial Unix world (for instance, the financial services sector), where most Unix vendors see the greatest growth potential. There is no way that systems houses/DP shops in these areas are going to be convinced that they should learn PostScript. Obviously, a C interface to NeWS is no problem, but the perception already exists that NeWS-is-PostScript-is-strange and X-is-C-is-familiar. With the merged server, Sun has a product which requires a precise marketing strategy to win both commercially and technically. Unavoidably, X will be seen as the basic, standards-oriented window system. If that's all the support that your application needs, then fine, use it. For developers who need better support than X delivers (device independence, imaging, server enrichment, etc.), then the learning effort put into NeWS will be worthwhile. (And no, adding "display PostScript" to X will *not* make it as powerful as NeWS.) The only way that Sun is going to see a reward for their efforts is to promote both sides of the merged server as solutions, and support developers on both sides. Standards are wonderful for producing networked multi-vendor Lotus 1-2-3 clones, but not so great for advancing the state of the art. +-----------------------------------+------------------------------+ | Mark Smith | tel: +44 483 574 325 | | Canon Research Centre Europe Ltd. | fax: +44 483 574 360 | | 19 Frederick Sanger Road +------------------------------+ | Surrey Research Park | inet: smith@canon.co.uk | | Guildford Surrey UK GU2 5YD | uucp: ukc!uos-ee!canon!smith | +-----------------------------------+------------------------------+ From don Fri Mar 2 19:14:00 1990 Date: Fri, 2 Mar 90 19:14:00 -0500 To: NeWS-makers@brillig.umd.edu Subject: Color in OpenWindows pageview program? From: crdgw1!montnaro@uunet.uu.net (Skip Montanaro) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) I am using the pageview program that comes with Sun's OpenWindows to preview the color PostScript file that appears at the end of this message. If I image at 36, 72, or 100 dpi, it is shown in color. If I image at 150, 300, or 400 dpi, however, it is shown in black and white. Can someone tell me if this is a bug or a feature? Is there a workaround other than avoiding the higher resolutions? Thanks, and beware the trailing signature. Skip (montanaro@crdgw1.ge.com) %! save /psnewssav exch def % "@(#)drawlib.ps 1.1 12/19/89 Arthur van Hoff (Turing Institute)"; % -- drawlib.ps -- Header file for PostScript drawings. /SC {dup length 3 eq {aload pop setrgbcolor} {aload pop setgray} ifelse} def /MX {1 0 0 1} def /CT {curveto} def /CP {closepath} def /LT {lineto} def /PT {moveto} def /PC {{lineto} stopped {moveto} if} def /LN {0 0 PT LT} def /LC {0 0 PC LT} def /FL {SC fill} def /ST {SC setlinewidth stroke} def /FS {gsave FL grestore ST} def /CM {matrix currentmatrix exch concat} def /SM {setmatrix} def /BO {gsave newpath concat} def /EO {grestore} def /SG {gsave SC eofill grestore ST} def /FG {SC eofill} def /AR { % c s a x y -- newpath matrix currentmatrix 5 1 roll newpath translate rotate 0 0 moveto 0 0 3 -1 roll -20 20 arc 0 0 lineto setmatrix FL } def /DA { % x y -- matrix currentmatrix 3 1 roll scale 0 1 1 -90 0 arc setmatrix } def /DR { % w h -- 0 0 moveto exch dup 0 lineto 1 index lineto 0 exch lineto closepath } def /DO { % w h -- matrix currentmatrix 3 1 roll scale 0.5 0.5 translate 0 0 0.5 0 360 arc setmatrix } def /RR { % w h c -- 10 dict begin /c exch def /h exch def /w exch def c 0 moveto mark w 0 w h c arcto w h 0 h c arcto 0 h 0 0 c arcto 0 0 w 0 c arcto cleartomark closepath end } def /DP { % d1 d2 w h -- matrix currentmatrix 5 1 roll scale 0.5 0.5 moveto 0.5 0.5 0.5 5 -2 roll arc 0.5 0.5 lineto setmatrix } def /SF { % text col fontsize font -- text width findfont exch scalefont setfont SC 1 1 index {stringwidth pop abs 2 copy lt {exch} if pop} forall } def /TS { % width w h -- exch 2 index div exch scale } def /TL { % text w h lh -- 5 dict begin /h exch def 0 exch moveto pop {gsave show grestore 0 h rmoveto} forall end } def /TR { % text w h bh -- 5 dict begin /h exch def moveto { gsave dup stringwidth pop neg 0 rmoveto show grestore 0 h rmoveto} forall end } def /TC { % text w h bh -- 5 dict begin /h exch def exch 2 div exch moveto { gsave dup stringwidth pop 2 div neg 0 rmoveto show grestore 0 h rmoveto} forall end } def /IR { % w h DR gsave 1 setgray fill grestore 0 setgray stroke } def /IC { % str w h -- scale LoadImage imagecanvas } def /IM { % ... -- /pstr exch string def 0 exch translate scale {} settransfer 0 0 3 -1 roll 0 0 6 array astore {currentfile pstr readhexstring pop} image } def /EPSdict 10 dict begin /initmatrix { #Matrisk# setmatrix } def /initgraphics { systemdict /initgraphics get exec #Matrisk# setmatrix } def /showpage {} def currentdict end def /BEPS { save 5 1 roll EPSdict begin gsave scale translate matrix currentmatrix /#Matrisk# exch def systemdict /initgraphics get exec #Matrisk# setmatrix 500 dict begin } def /EEPS { end grestore end restore } def gsave initmatrix -172.180 -206.580 translate 0.820 0.820 scale [1 0 0 1 0 0 ] BO 1166 1470 DR [.7891 1 0.058] FL EO [1 0 0 1 399 958 ] BO [1 0 0 1 9 9 ] BO 30 30 DO 1 [0 0 1] ST EO [1 0 0 1 0 0 ] BO 48 48 DO 1 [1 .6305 .1929] ST EO [1 0 0 1 25 24 ] BO 0 15 LN 1 [1 .6305 .1929] ST EO [1 0 0 1 25 24 ] BO 14 0 LN 1 [1 .6305 .1929] ST EO EO [1 0 0 1 472 938 ] BO [1 0 0 1 0 36 ] BO 195 0 LN 4 [1 0 0.03] ST EO [1 0 0 1 56 78 ] BO 0 -77 LN 4 [1 0 0.03] ST EO [1 0 0 1 140 78 ] BO 0 -78 LN 4 [1 0 0.03] ST EO [1 0 0 1 2 36 ] BO 54 40 DA 4 [1 0 0.03] ST EO [1 0 0 1 193 36 ] BO -53 38 DA 4 [1 0 0.03] ST EO [1 0 0 1 102 50 ] BO 38 26 DA 4 [1 0 0.03] ST EO [1 0 0 1 102 50 ] BO -46 24 DA 4 [1 0 0.03] ST EO EO showpage grestore psnewssav restore -- Skip (montanaro@crdgw1.ge.com) From don Fri Mar 2 19:14:55 1990 Date: Fri, 2 Mar 90 19:14:55 -0500 To: NeWS-makers@brillig.umd.edu Subject: Re: What is SUN doing? From: spectral!sjs@bellcore.com (Stan Switzer) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) In article <9003011602.AA19024@tripoli.ees.anl.gov> korp@TRIPOLI.EES.ANL.GOV writes: > Do you think DEC, IBM, HP or others will ever offer > OW even if they adopt 5.4? They only way to make this happen is if > enough customers ask for it! And why will a user scream for OpenWindows if there are no OpenWindows-dependent applications? Answer this: why do Sun's deskset applications use XView instead of NeWS? As a developer, I know why I want NeWS, and I also know that if I can't count on a large market penetration, then the market for NeWS applications is quite limited. The only organization in a position to put NeWS over the top is Sun, and they can only do that by giving X/NeWS have a distinct added value for end users. Where is this added value? Where are the (NeWS) drawing applications? Where are the hypermedia applications? Where are the direct-manipulation interfaces? > Some people > inside that organization are trying to make OW a reality but get shot > down by higher management because $80,000 is too much to port the OW > server to their machine. Do you have any idea how little $80,000 is to a company like DG? It can cost that much just to have a meeting with "higher management" once you start to figure in the cost of everybody's time. As you say, if the users want it, companies will deliver. > All opinions are my own and not representative of my employer! Likewise. Stan Switzer sjs@bellcore.com From don Fri Mar 2 19:16:14 1990 Date: Fri, 2 Mar 90 19:16:14 -0500 To: NeWS-makers@brillig.umd.edu Subject: Re: What is SUN doing? From: phil%scripps.edu@scripps.edu (Phil Cohen) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) A guy from Solbourne was here yesterday. He was an ex-SUN employee and was interested in talking about why we like NeWS so much. Anyway, one thing led to another and he told me that for a while he had close ties to MasPar. The prez of MasPar is an ex-VP of DEC and it turns out that DEC had decided that there was no way that they were going to allow SUN to pull off another "NFS phenomenon" with NeWS. From what my source said, it seems there were unlimited funds available for shooting down NeWS. Like I said, make OW a line item on all your future workstation purchases. Do not do business with those that neglect to port OW to System 5 Release 4. I remember when we had to do the same thing in the early days of TCP/IP and NFS in order to get the attention of vendors. Of course, then there was no X11 arround to confuse the issues. Phil My favorite reason for liking NeWS? You get the source for everything. From don Sun Mar 4 00:14:49 1990 Date: Sun, 4 Mar 90 00:14:49 -0500 To: NeWS-makers@brillig.umd.edu Subject: BYTE seeks qualified GUI writer From: decvax!maxx!tyager@bloom-beacon.mit.edu (Tom Yager) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) [Sorry if this is a repost--trouble with me news system] I'm currently seeking a qualified author to take part in an upcoming feature article on GUI development. Up to three authors will be involved, and I'm looking here for technical people qualified to write on the topics of GUI development on the following platforms: NeXT, Sun, X/Motif/OL. The candidate must be a genuine expert in the GUI APIs of one or more of these environments, and make her/his living developing applications under them. The ideal author would be someone who is intimately familiar with two or three of the above-mentioned platforms. I also require knowledge of at least one GUI design tool in each of the environments mentioned above, native or third-party. Two such tools (except, possibly, in the case of the NeXT) would be helpful. Employees of any workstation manufacturer or third-party GUI tools vendor are disqualified. Please submit a brief resume or credentials to me via e-mail to one of the addresses below, or by US mail to: BYTE Magazine ATTN: Tom Yager, Technical Editor One Phoenix Mill Lane Peterborough, NH 03458 No phone calls, please. Thanks to all in advance. (ty) -- +--Tom Yager, Technical Editor, BYTE magazine------------------------------+ | NET: decvax!maxx!tyager -or- tyager%maxx@m2c.m2c.org | | I speak only for myself "If our knees bent the other way, | +-------------------------------------what would a chair look like?"-------+ From don Sun Mar 4 16:29:30 1990 Date: Sun, 4 Mar 90 16:29:30 -0500 To: NeWS-makers@brillig.umd.edu Subject: What shot down NeWS? From: hoptoad!gnu (John Gilmore) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) phil@SCRIPPS.EDU (Phil Cohen) wrote: > . . . it turns out that DEC had decided that > there was no way that they were going to allow SUN to pull off > another "NFS phenomenon" with NeWS. From what my source said, > it seems there were unlimited funds available for shooting down > NeWS. Technically, the development teams on X and NeWS were about equal, I'd guess. Unlimited funds (if true) didn't seem to help there. That is, both worked hard and evolved things as fast as they could. Sun took a year's beating when they decided to integrate X, though, and the X developers had the significant 'free software' advantage: many users were fixing up the code, writing new stuff, and folding most of it back into the release. We *tried* to get Sun to adopt some portability changes and new apps, but it somehow never worked. *Everybody* got their changes back into X, evolving it faster and making everybody feel like part of the team. It didn't take unlimited funds to shoot down NeWS. All it took was a marketing decision: making X11 even more accessible than NeWS. Putting it out for free to the public, and putting the development group at MIT, with wideband wide-open Internet ftp access, was a brilliant stroke. As brilliant as Sun licensing NFS to everybody for cheap. Sun wanted to do the same thing with NeWS, but DEC trumped their offer with a better one -- free. In contrast, Sun made it hard to get NeWS. At every turn there was another bottleneck, for both source and binary customers. Grasshopper regularly had to get 'under the table' copies of things because their release processes took forever and produced poor quality 'generic ports'. Customers had to special-order binaries on a slow death release schedule, and for X/NeWS you had to be somebody special just for them to accept your order. Anyone in their right mind would've just FTP'd X11 from MIT or uunet and cut the crap. *All* the commercial licensees, who had paid $25K or more for NeWS, begged Sun to just put it in the public domain (blowing their $25K investment), more than a year ago. But nothing happened. --- Sun was able to overtake DEC in the computer market in the early '80s because DEC got complacent about their installed base and stopped moving forward and adopting new technology. (All the world's a Vax, we're first in market share, so what if these little companies have faster/cheaper boxes...) I've seen a lot of signs of this in Sun these days. It's an attitude that will make them an also-ran if it continues -- like DEC in workstations. DEC tried to get into workstations late, but after ten years of propaganda, their employees weren't interested in pushing non-Vaxen. Internal to Sun, NeWS competes with SunView -- and loses hands down. You won't find NeWS running on even one out of a hundred workstations there. Why should a sales rep or developer support person recommend something new when they like the good old alternative better? Why should a programmer write NeWS apps when the customers will have to go through significant pain to run the apps, while a SunView app will just tar in and run? Why should any employee run NeWS when many of the tools they need to use produce ugly blotches on the screen and can't be pushed behind their NeWS windows? *BECAUSE IF YOU DON'T STAY FLEXIBLE SOMEONE WILL SNEAK UP ON YOU*, that's why. But the technical team didn't make it easy enough to switch, and the marketing team didn't sell the rest of the company on the need to. Since Sun itself didn't switch to NeWS, its customers didn't either. Since the customers didn't switch, no other manufacturers adopted it. End of story. -- John Gilmore {sun,pacbell,uunet,pyramid}!hoptoad!gnu gnu@toad.com Boycott the census! The government that invaded Central America does not hesitate to break into "their own" census database to violate your privacy. Maximum penalty for refusing to answer: $100, no jail. From don Mon Mar 5 12:13:16 1990 Date: Mon, 5 Mar 90 12:13:16 -0500 To: NeWS-makers@brillig.umd.edu Subject: cps ps_findfont From: Anthony Worrall Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Category: x11news Subcategory: libcps Bug/Rfe: bug Synopsis: font names are sent as strings by ps_findfont and ps_fontdef Severity: 5 Priority: 4 Description: The routines ps_findfont and ps_fontdef send the names of the fonts as postscript strings instead of postscript objects. Work around: Use pprintf to find and define fonts. Suggested fix: Edit the file psmacros.cps in $OPENWINHOME/share/src/xnews/lib/NeWS diff psmacros.cps_old psmacros.cps 62c62 < cdef ps_findfont(string f) f findfont --- > cdef ps_findfont(postscript f) f findfont 84c84 < cdef ps_DO_finddef(string font,usertoken) font findfont --- > cdef ps_DO_finddef(postscript font,usertoken) font findfont then do a make install (change XXINSDIRXX to $(OPENWINHOME)). Called in by: Customer: Company: University of Reading Employee: Anthony Worrall Release: 1.0 Hardware version: sun3 and sun4 O/S version: SUNOS 4.0.3 From don Mon Mar 5 12:13:30 1990 Date: Mon, 5 Mar 90 12:13:30 -0500 To: NeWS-makers@brillig.umd.edu Subject: Re: Handling PostScript Errors From: ecn!wim@relay.EU.net (Wim Rijnsburger) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) A couple of days ago I posted the source of our 'psrun', a 'psh' alike utility for loose coupling of applications with NeWS user interfaces. Unfortunately there was a minor incorrectness in the manual page file 'man.txt': 2c2 < .TH PSRUN 1 "1 MARCH 1990" "ECN, Petten (Holland)" --- > .TH BACKUP 1 "1 MARCH 1990" "ECN, Petten (Holland)" The error resulted from the fact that I'm to lazy to write manual pages from scratch and use as mutch as I can from existing manual pages. I forgot to grep on the old command name in capitals too :-( Wim. ---------- Netherlands Energy Research Foundation, ECN -------------- Wim Rijnsburger email: RIJNSBURGER@ECN.NL P.O. Box 1, 1755 ZG Petten, Holland phone: +31 2246 4673 From don Mon Mar 5 15:38:55 1990 Date: Mon, 5 Mar 90 15:38:55 -0500 To: NeWS-makers@brillig.umd.edu Subject: which terminal emulator do you use? From: aramis.rutgers.edu!porthos.rutgers.edu!marantz@rutgers.edu (Roy Marantz) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) As an aside from all the (justified :-|)bashing about NeWS marketing is this question. I'm trying to findout which terminal emulator people use. I'm interested in what is being done for use with OpenWindows (what a misnomer :-|) Below are my comments on the ones I've tried so far. psterm (sun's) - works but scrolls slowly and insists on scaling the font when the window is resized. doesn't support scrollbars xterm (sun or MIT X) - faster than psterm on screen updating, scales number of rows/columns when window is resized (yea), not good for use on a slow remote machine (i.e. uncovering the window asks the remote side to repaint, this takes too long), doesn't understand the L keys (L5 and L7) psterm (Grasshoppers) can't get it to work :-( probably because of font handling changes. Anyone have any other's I should try? I sure do wish there was one that worked in every situation. I find it hard to believe that these are the "state of the art" when it comes to terminal emulations programs. Roy -- uucp: {backbone}!rutgers!cs.rutgers.edu!marantz arpa: marantz@cs.rutgers.edu From don Mon Mar 5 15:38:59 1990 Date: Mon, 5 Mar 90 15:38:59 -0500 To: NeWS-makers@brillig.umd.edu Subject: Re: GraphicServers From: mstar!mstar.morningstar.com!bob@tut.cis.ohio-state.edu (Bob Sutterfield) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) In the "better late than never" department, please see the following article in comp.newprod: In article <32567@mcdchg.chg.mcd.mot.com> timw@osiris.osiris.oz.au (Tim Wooller) writes: ...The range of GraphicServers from Osiris Technology are PostScript based, multi-tasking network graphics terminals. They are compatible at the operator level with Sun Microsystem's NeWS [1.1] servers and Adobe's PostScript page description language... Sounds like the alternative to X terminals that the NeWS community has been waiting for. Has anyone seen it yet? From don Tue Mar 6 04:00:39 1990 Date: Tue, 6 Mar 90 04:00:39 -0500 To: NeWS-makers@brillig.umd.edu Subject: Re: which terminal emulator do you use? From: rws@expo.lcs.mit.edu (Bob Scheifler) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) xterm ... doesn't understand the L keys (L5 and L7) (In R4 at least) "xterm -sf" will enable the Sun function key escape sequences. If you need something even different from that, you can always rebind the translations for these keys directly (assuming the desired actions are supported by xterm). From don Tue Mar 6 04:01:21 1990 Date: Tue, 6 Mar 90 04:01:21 -0500 To: NeWS-makers@brillig.umd.edu Subject: NeWS Dead???? From: korp@tripoli.ees.anl.gov Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) A month or so ago a Sun Sales Engineer told us that NeWS and OpenWindows was the future of Sun. He told us that about 50+ people were working on it and that Sun had contractual obligations to finish NDE. Today I heard from a reliable source that Sun has dropped internal development of NeWS and all but abandoned it! This would not bode well for our community if it is true. Does anyone have news to the contrary? Would someone at Sun like to comment? Is X the future direction at Sun? Also, DEC did seem to have unlimited funds when it came to bashing NeWS. They went so far as to have 3 of their tech people write a paper bashing NeWS and any developer doing work in it(us). All the money seems to have paid off. Peter A. Korp Argonne National Laboratory These views are my own and do not in any way represent those of my employer. From don Tue Mar 6 04:01:55 1990 Date: Tue, 6 Mar 90 04:01:55 -0500 To: NeWS-makers@brillig.umd.edu Subject: Re: Docs for tNt, & what is Sun doing? From: hpfcso!hpfcmgw!chan@hplabs.hp.com (Chan Benson) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) > It seems that when two nearly equivalent products appear, one > of them can take over because of random market forces. So VHS beat out Beta > video. The point is that one product can win even if it is technically > superior because it got the grab on the market first. Well NeWS is technically > superior, but Sun is being so stupid that they are letting the window slip > by---if it's not to late already! VHS beat out Beta because the licensing was more liberal. X is ahead of NeWS for the same reason. When anyone can get source for only a media charge, a software system will get a lot of exposure. > I think that NeWS is superior for a simple reason: it is based on PostScript. Oh barf. I do not wish to program a windowing application in PostScript. I think that NeWS has some definite advantages, but the PS language is not one of them (this is not to say that some of the characteristics of PS are not advantages in NeWS). If they had used Lisp as the base language I would be much more interested in NeWS. -- Chan From don Tue Mar 6 05:04:28 1990 Date: Tue, 6 Mar 90 05:04:28 -0500 To: NeWS-makers@brillig.umd.edu Subject: psrun: replacement for psh (Reposting) From: ecn!wim@relay.EU.net (Wim Rijnsburger) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Last week I tried to post our source of 'psrun', a 'psh' alike utility for loose coupling of applications to NeWS user interfaces. Because problably something went wrong with this posting, here is another try. This is a corrected version, so the patch for the manual page, posted yesterday is not necessary anymore. The psrun command downloads NeWS code into the server, catches errors and handles client-server communications appropriate. We use loose coupling of applications to the NeWS server, by redirecting stdout of the application to stdin of psrun and vice versa. Below you will find a shar archive of the complete source of psrun, including a manual page. After unpacking of this archive, edit the Makefile to set the BINDIR, MANDIR and LIBDIR appropriate. Then type 'make' to build everything. Test it out by something like: psrun -h to get help on available options and arguments. To start an interactive debugging session with the server, use: psrun -d -P "executive" All commands typed at stdin are now given to the server. Try to type some garbage to test the error catching. To download NeWS code files from some directory, use: psrun -d -L /home/.../mydir file1 file2 ... If everything looks fine, do a 'make install'. The manual page gives more explanations on usage. Wim. ---------- Netherlands Energy Research Foundation, ECN -------------- Wim Rijnsburger email: RIJNSBURGER@ECN.NL P.O. Box 1, 1755 ZG Petten, Holland phone: +31 2246 4673 ----------- Remove everything below and including this line ----------- : To unbundle, sh this file echo main.c cat >main.c <<'@@@ Fin de main.c' #include "def.h" /* * psrun: a general client-server coupling program * * The main program tries to connect with the server and load the * application into the server. * A child is forked to read stdin and pass it to the server * Then a loop is started to read tagged commands from the server. * * If the -d (debug) flag was given as an option, the psrun * reports the server's messages on stderr, in case * the interpreter failed for some reason. * * Immediate to execute PostScript commands can be passed to the * server via the option -P. For instance to get into executive * mode, where the server do not stop on errors: * * psrun -d -P "executive" * * Server side code files, passed as arguments to psrun are downloaded * by psrun into the server. The server searches files in a library * directory as given with the -L option. The default lib dir * is determined by a variable in the Makefile. * * (c) 1989 Copyright Wim Rijnsburger, ECN Petten, Holland * * ---------- Netherlands Energy Research Foundation, ECN -------------- * Wim Rijnsburger UUCP : wim@ecn.uucp * P.O. Box 1, 1755 ZG Petten(NH) ARPA : ecn!wim@nluug.nl * Holland phone: +31 2246 4336 ecn!wim@uunet.uu.net * */ main(argc, argv) int argc; char **argv; { #define STRBUFLEN 1024 char Buf1[STRBUFLEN], Buf2[STRBUFLEN], *LibDir = LIBDIR, *PsString = "", *ErrStr; int status = OK, debug = 0, pid, i, c, cid; FILE *InPipe; /* * Parse the options */ extern char *optarg; extern int optind, opterr; opterr = 0; while ((c = getopt(argc, argv, "dhL:P:")) != -1) switch (c) { case 'd': debug = 1; break; case 'L': LibDir = optarg; break; case 'P': PsString = optarg; break; case 'h': status = ARG_ERROR; break; case '?': status = ARG_ERROR; break; } /* * Connect to the server */ if (ps_open_PostScript() == NULL) status = SERVER_ERROR; if (status == OK) { fprintf(stderr, "%s\n", HEADER); if (argc == 1) { fprintf(stderr, "Use 'psrun -h' to get help\n"); } /* * Init the cps code */ ps_Init(); /* * Pass the client parameters and command arg's to the ps environment * Let the server load the application files */ fprintf(PostScript, "/ClientPwd (%s) def\n", getwd(Buf1)); fprintf(PostScript, "/LibDir (%s) def\n", LibDir); fprintf(PostScript, "/NewsLibDir (XNEWSHOME) getenv (/etc/NeWS) append def\n"); fprintf(PostScript, "/Debug? %d 1 eq def\n", debug); fprintf(PostScript, "%s\n", PsString); fprintf(PostScript, "/ClientArgv [\n"); for (; optind < argc; optind++) fprintf(PostScript, "(%s)\n", argv[optind]); fprintf(PostScript, "] def\n"); fprintf(PostScript, "ClientPwd ClientArgv loadFiles\n"); ps_flush_PostScript(); /* * Fork a child to read PS commands from stdin */ pid = fork(); if (pid < 0) status = FORK_ERROR; else if (pid == 0) { while (status == OK) { if (gets(Buf1) == NULL) { status = QUIT; strcpy(Buf1, "quit"); } fprintf(PostScript, "%s\n", Buf1); ps_flush_PostScript(); } exit (0); } else { /* * Read and handle tagged commands from the server-side */ while (status == OK) { if (psio_error(PostScriptInput)) status = PS_ERROR; else if (ps_tag_Quit()) status = QUIT; else if (ps_tag_Print(Buf1)) { printf("%s", Buf1); fflush(stdout); } else if (ps_tag_Error(Buf1)) { fprintf(stderr, "%s", Buf1); fflush(stderr); } else if (ps_tag_System(&cid, Buf1)) { system(Buf1); if (cid) ps_CidExec(cid, "exit"); } else if (ps_tag_Popen(&cid, Buf1)) { InPipe = (FILE *) popen(Buf1, "r"); if (InPipe == NULL) status = POPEN_ERROR; else { strcpy(Buf1, "["); while (fgets(Buf2, STRBUFLEN, InPipe) != NULL) { strcat(Buf1, "("); strncat(Buf1, Buf2, strlen(Buf2) - 1); strcat(Buf1, ")"); } strcat(Buf1, "] exit"); ps_CidExec(cid, Buf1); pclose(InPipe); } } else if (debug) { if (fgets(Buf1, STRBUFLEN, PostScriptInput) > 0) fprintf(stderr, Buf1); else status = PS_ERROR; } else status = PS_ERROR; } /* * Clean up and quit */ ps_close_PostScript(); } } /* * Exit */ switch (status) { case ARG_ERROR: ErrStr = (char *) sprintf(Buf2, "usage: %s [-dh] [-L LibDir] [-P PsString] [ PsFiles ]\n", argv[0]); break; case IO_ERROR: ErrStr = "IO error"; break; case SERVER_ERROR: ErrStr = "Cannot contact NeWS server"; break; case PS_ERROR: ErrStr = "PS error"; break; case FORK_ERROR: ErrStr = "Fork failed"; break; case CHILD_ERROR: ErrStr = "Child error"; break; default: ErrStr = (char *) sprintf(Buf2, "abnormal termination, status = %d", status); break; } if (status != QUIT) fprintf(stderr, "%s: %s\n", argv[0], ErrStr); exit(status); } @@@ Fin de main.c echo client.cps cat >client.cps <<'@@@ Fin de client.cps' % % Define the tag's % #define QUITTAG 100 #define PRINTTAG 101 #define ERRORTAG 102 #define SYSTEMTAG 103 #define POPENTAG 104 % % Tag routines to poll the server % cdef ps_tag_Quit() => QUITTAG cdef ps_tag_Print(string s) => PRINTTAG(s) cdef ps_tag_Error(string s) => ERRORTAG(s) cdef ps_tag_System(int i, string s) => SYSTEMTAG(i, s) cdef ps_tag_Popen(int i, string s) => POPENTAG(i, s) % % Routine to return a Cid result and exit % cdef ps_CidExec(int id, string s) id {s cvx exec} sendcidevent % % Initialization % cdef ps_Init() % % Tagged commands interface % /c_Quit { % - => - QUITTAG tagprint } def /c_Error { % string => - ERRORTAG tagprint typedprint } def /c_Debug { % string => - Debug? { c_Error } { pop } ifelse } def /c_Print { % string => - PRINTTAG tagprint typedprint } def /c_System { % string => - SYSTEMTAG tagprint 0 typedprint typedprint } def /c_SystemAndWait { % string => - % send args: tag id string /MyCID uniquecid def SYSTEMTAG tagprint MyCID typedprint typedprint % wait until completed [ MyCID cidinterest ] forkeventmgr waitprocess pop } def /c_PopenAndWait { % string => string % send args: tag id string /MyCID uniquecid def POPENTAG tagprint MyCID typedprint typedprint % wait until completed [ MyCID cidinterest ] forkeventmgr waitprocess } def % % Safe executor % /safeExec { % string|key|proc => boolean cvx stopped { ExecutiveErrorHandler true } { false } ifelse } def % % Load files % /loadFiles { % dirname [filenames .. ] => - { 1 index exch safeRun {exit} if } forall pop } def /safeRun { % dirname filename => boolean { (r) openFile dup null eq { pop } { cvx exec } ifelse } safeExec } def % % Open a file in a directory % /openFile { % dirname filename mode => file|null 1 index length 0 eq { pop pop pop null } { 3 -1 roll % drop the dirname if filename is already complete 2 index 0 get (/) 0 get eq { pop () } if % Complete the dirname with a trailing slash dup length 0 gt { dup dup length 1 sub get (/) 0 get ne { (/) append } if } if % Complete the path and insert the client PWD, if not complete 3 -1 roll append dup 0 get (/) 0 get ne { ClientPwd dup dup length 1 sub get (/) 0 get ne { (/) append } if exch append } if 2 copy [ 3 1 roll ] (openFile: (%) %\n) exch sprintf c_Debug exch % Open the file { 2 copy file } stopped { pop pop (openFile: %\n) [ $error /errorname get ] sprintf c_Error null } if % stack: string string file|null % Skip over a #! line if opened for read dup null ne 2 index 0 get (r) 0 get eq and { dup 255 string readline pop (#!) anchorsearch { pop pop } { pop closefile 2 copy file } ifelse } if % Return the file object 3 1 roll pop pop } ifelse } def @@@ Fin de client.cps echo Makefile cat >Makefile <<'@@@ Fin de Makefile' TARGET =psrun VERSION =1.5 AUTHOR =Wim Rijnsburger INSTITUTION =ECN Petten Holland YEAR =1989 INSTDIR =$(OPENWINHOME) BINDIR =$(INSTDIR)/bin LIBDIR =$(INSTDIR)/lib/VisualObjects MANEXT =l MANDIR =$(INSTDIR)/share/man/man$(MANEXT) CC =cc CFLAGS = C_SCR =main.c CPS_SRC =client.cps INCLUDE =def.h MANPAGE =man.txt MISC =Makefile $(MANPAGE) LIBS =-I$(OPENWINHOME)/include -L$(OPENWINHOME)/lib -lcps ALL =$(C_SCR) $(CPS_SRC) $(MISC) $(INCLUDE) C_OBJ =$(C_SCR:.c=.o) CPS_H =$(CPS_SRC:.cps=.h) HEADER =$(TARGET) $(VERSION) (c) $(YEAR) $(AUTHOR), $(INSTITUTION) .c.o: cc -O -c -DHEADER=\""$(HEADER)"\" -DLIBDIR=\""$(LIBDIR)"\" $(LIBS) $< $(TARGET): $(C_OBJ) $(CC) $(CFLAGS) $(C_OBJ) -o $(TARGET) $(LIBS) $(CPS_H): $(CPS_SRC) cps $(CPS_SRC) $(C_OBJ): $(CPS_H) $(INCLUDE) new: rm -f $(TARGET) $(C_OBJ) $(CPS_H) core *% *.BAK clean: rm -f core *% *.BAK list: $(ALL) enscript -G -b"$(HEADER)" $? touch list backup: rm -f bak/* cp $(ALL) bak install: install -d $(BINDIR) install -s $(TARGET) $(BINDIR) install -d $(MANDIR) install -c -m 444 $(MANPAGE) $(MANDIR)/$(TARGET).$(MANEXT) update: $(TARGET) make install touch update shar: $(TARGET).shar $(TARGET).shar: $(ALL) \rm -f $(TARGET).shar shar $(ALL) > $(TARGET).shar @@@ Fin de Makefile echo man.txt cat >man.txt <<'@@@ Fin de man.txt' .TH PSRUN 1 "1 MARCH 1990" "ECN, Petten (Holland)" .SH NAME psrun \- a general client-server coupling program for NeWS applications .SH SYNOPSIS .B psrun [-dh] [-L \fILibDir\fP] [-P \fIPsString\fP] [ \fIPsFiles\fP ] .SH DESCRIPTION .LP \fIpsrun\fP is a utility for loosely coupling of client side code with the window server and to down load server side code into the server. The main program tries to connect with the server and load the application into the server. A child is forked to read stdin and pass it to the server. Then a loop is started to read tagged commands from the server. If the \fB-d\fP (debug) flag was given as an option, the psrun reports the server's messages on stderr, in case the interpreter failed for some reason. Commands entered at stdin are interpreted by the server and responses appear at stdout of \fBpsrun\fP. Server side code files, passed as arguments to psrun are downloaded by psrun into the server. The server searches files in a library directory as given with the \fB-L\fP \fILibDir\fP option. The default \fILibDir\fP is determined by a variable in the Makefile. The server side code can communicate with the client side via \fBc_Print\fP to send a string to stdout. Via \fBc_Error\fP and \fBc_Debug\fP messages are send to stderr. With \fBc_Quit\fP the server side code quits the session. Immediate to execute PostScript commands can be passed to the server via the option \fB-P\fP. For instance to get into executive mode, where the server do not stop on errors: .LP .RS .nf .IP "\fBpsrun -d -P 'executive (Type 'c_Quit' to stop\n) c_Error'\fP" .RE .fi .LP Loose coupling with the client side of an application can be done with redirection of stdin and stdout. For instance: .LP .RS .nf .IP "\fB/etc/mknod p1 p2\fP" .IP "\fBpsrun -d -P 'executive' -L . \fImyapplPSfiles\fP < p1 > p2 &\fP" .IP "\fB\fImyappl\fP < p2 > p1\fP" .RE .fi .LP .SH FILES .TP 2.2i /usr/openwin/bin/psrun the command is usually installed here .TP /usr/openwin/lib/VisualObjects default directory to search library files .SH "SEE ALSO" psh(1) .SH DIAGNOSTICS The status messages given by the command should be self explanatory. .SH AUTHOR Wim Rijnsburger, ECN, PO box 1, 1755 ZG Petten (NH), Holland. .SH BUGS This is a preliminary release. Please contact me about bugs and wishes. .SH NOTES The development of \fBpsrun\fP is part of the \fBVisualObjects\fP research project of the \fINetherlands Energy Research Foundation (ECN), Petten (NH), Holland\fP. @@@ Fin de man.txt echo def.h cat >def.h <<'@@@ Fin de def.h' #include "client.h" #define NOT ! #define AND && #define OR || #define ARG_ERROR 2 #define QUIT 1 #define OK 0 #define IO_ERROR -1 #define SERVER_ERROR -2 #define PS_ERROR -3 #define FORK_ERROR -4 #define CHILD_ERROR -5 #define POPEN_ERROR -6 @@@ Fin de def.h exit 0 From don Tue Mar 6 20:13:33 1990 Date: Tue, 6 Mar 90 20:13:33 -0500 To: NeWS-makers@brillig.umd.edu Subject: sun's commitment to NeWS From: James Gosling Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) The windows group has spent the past months focused on X11. With the upcoming Summer release of X11/NeWS, we feel comfortable about the quality of the X11 side of the product. We are now restoring balance to our efforts and will be spending significantly more energy on NeWS. The timing of the rash of "NeWS is dead" messages on the net has been really ironic; they started just after we kicked off the new internal emphasis on NeWS. It has always been clear to us (Sun) that we have to produce both standards and innovative technology. In the windows area the X11/NeWS merge provides a synthesis of the two that allows us to deliver standards and to innovate. The combination of the X11 and NeWS protocols into one server provides a more flexible development platform and ultimately a larger application base for end users. X11 and the purely PostScript part of NeWS represent the standards side, while NeWS is where we will be concentrating our innovative leading edge technology We're doing a lot of work in turning TNT into a real product, and we're doing work on object-oriented client-side toolkits. There are a number of NeWS-based applications from Sun and third parties that will become available in the near future. Sun has significantly increased the resources it is dedicating to NeWS. This includes the NeWS portion of the X11/NeWS merged server, the NeWS toolkit, and the integration of our desktop environment with NeWS. In order to achieve greater focus on the NeWS technology, we have consolidated internal NeWS development under a single organization. In the forthcoming months you will see a much greater commitment to NeWS. Please send mail to tnt-request@sun.com if you would like to receive documentation for the experimental version of TNT distributed with OpenWindows 1.0. Domestic US customers should receive the documentation within three weeks. Overseas shipments are expected to take longer. From don Tue Mar 6 20:16:59 1990 Date: Tue, 6 Mar 90 20:16:59 -0500 To: NeWS-makers@brillig.umd.edu Subject: BTOL 1.3 From: korp@tripoli.ees.anl.gov Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) A beta version of BTOL is currently running and a final version is about 2 weeks away. Version 1.3 includes: BTOL toolkit ------------ 1) Application Windows 2) Subwindows 3) Menus 5) Buttons 6) ScrollTextItems 7) PopUp Items 8) FieldItem (For tabular reports) 9) ChoiceItem BIK - BTOL Interface Kit ------------------------ 1) Allows for the creation of BTOL windows in a point and click manner 2) Lets you attach items to a window as well as altering items attributes 3) Genrates code that runs if psh'd. LIK - Lite Interface Kit ------------------------ This is still undergoing changes but does for lite what BIK does for BTOL Express ------- A quick launch facility for OpenWindows or NeWS, finally get rid of those pesky rootmenus. We are working on a distribution scheme for such a large distribution. If any of you have comments as to any other items that seem logical for inclusion or have ideas about distribution, please email me directly. Peter A. Korp Argonne National Laboratory From don Tue Mar 6 20:17:31 1990 Date: Tue, 6 Mar 90 20:17:31 -0500 To: NeWS-makers@brillig.umd.edu Subject: Re: Color in OpenWindows pageview program? From: wind!naughton@sun.com (Patrick Naughton) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) >> From: montnaro@spyder.crd.ge.com (Skip Montanaro) >> Newsgroups: comp.windows.news,comp.windows.x,comp.lang.postscript >> Subject: Color in OpenWindows pageview program? >> Date: 2 Mar 90 17:25:44 GMT >> Organization: GE Corporate Research & Development, Schenectady, NY >> >> I am using the pageview program that comes with Sun's OpenWindows to >> preview the color PostScript file that appears at the end of this >> message. If I image at 36, 72, or 100 dpi, it is shown in color. If I >> image at 150, 300, or 400 dpi, however, it is shown in black and white. >> Can someone tell me if this is a bug or a feature? Is there a workaround >> other than avoiding the higher resolutions? >> >> Skip (montanaro@crdgw1.ge.com) >> It's a feature... Pageview switches to monochrome above 100 dpi since the memory requirements for retaining 8 bit rasters at high resolutions are prohibitive. For instance at 300 dpi an 8.5 by 11 inch page takes 8.4 Meg. If you really want to try it, use the undocumented command line switch: -mcd (max color dpi). pageview -mcd 900 -dpi 900 tiger.ps will work, but it will take over 75 Meg of memory. If you have that much memory... have fun! -Patrick OpenWindows Version 2... flying soon on a SPARCstation near you! "Time to eat all your words, Swallow your pride, Open your eyes..." - Tears for Fears ______________________________________________________________________ Patrick J. Naughton ARPA: naughton@sun.com Window Systems Group UUCP: ...!sun!naughton Sun Microsystems, Inc. AT&T: (415) 336 - 1080 From don Wed Mar 7 04:32:06 1990 Date: Wed, 7 Mar 90 04:32:06 -0500 To: NeWS-makers@brillig.umd.edu Subject: Re: NeWS Dead???? From: zwicky@sparkyfs.istc.sri.com (Elizabeth Zwicky) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) In article <9003052327.AA25232@tripoli.ees.anl.gov> korp@TRIPOLI.EES.ANL.GOV writes: >A month or so ago a Sun Sales Engineer told us that NeWS and OpenWindows was the >future of Sun. He told us that about 50+ people were working on it and that Sun >had contractual obligations to finish NDE. Today I heard from a reliable source >that Sun has dropped internal development of NeWS and all but abandoned it! Either your source is not as reliable as you think, or one of you has confused "NeWS as a standalone window system" with "NeWS and OpenWindows". Either there is internal development going on in OpenWindows, or I was hallucinating last time I was at Sun, standing in a programmer's office watching him work. And he's a PostScript side programmer, too... Elizabeth Zwicky From don Thu Mar 8 00:54:55 1990 Date: Thu, 8 Mar 90 00:54:55 -0500 To: NeWS-makers@brillig.umd.edu Subject: NeWS gathering From: korp@tripoli.ees.anl.gov Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) I am just coming off of a meeting with Hugh Daniel of the grasshopper group during which a most unusual suggestion was made. Would it not be a wonderful thing if the leading people in NeWS development would come together and share their ideas and philosophies with Sun. A great deal of good could come from such a gathering. Many of us would love to do something like this, but only if it does not fall on deaf ears inside Sun. I would be willing to sponsor a get together at Argonne of not only Sun but Silicon Graphics, and any other HW vendor that is interested in porting OW to their platform. I know of the long drawn out political squabbles inside Sun, but can they be put aside long enough to talk to the people who believe in NeWS? This type of meeting could go a long way in restoring the faith in Sun that many of us feel we have lost. Peter A. Korp Argonne National Laboratory From don Thu Mar 8 00:55:15 1990 Date: Thu, 8 Mar 90 00:55:15 -0500 To: NeWS-makers@brillig.umd.edu Subject: sun function keys again From: George Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) with the discusion as to what is SUN doing about NeWS , i feel somewhat reticent to repost a query about how to program Function keys within NeWS. seems quite insignificant in comparison to the level of discusion within this group. however, i would appreciate it if someone could point out how to program a function key to pass ^P for example to tcsh within a psterm window. i have tried to do this but i havent been able to get it to work. i really want to be able to R8 (uparrow). thanks George Travan " rebel without a clue" PHONE : +61 8 2885968 University of Adelaide Telex : UNIVAD AA89141 G.P.O Box 498 Adelaide FAX : +61 8 244 0464 S.AUSTRALIA 5001 e_mail: george@frodo.ua.oz.au From don Thu Mar 8 00:55:42 1990 Date: Thu, 8 Mar 90 00:55:42 -0500 To: NeWS-makers@brillig.umd.edu Subject: Re: sun's commitment to NeWS From: intercon!news@uunet.uu.net (Amanda Walker) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) In article <9003061912.AA10539@norquay.Eng.Sun.COM>, jag@Eng.Sun.COM (James Gosling) writes: > The windows group has spent the past months focused on X11. With > the upcoming Summer release of X11/NeWS, we feel comfortable about the > quality of the X11 side of the product. We are now restoring balance to > our efforts and will be spending significantly more energy on NeWS. Thank you. It's nice to hear that Sun hasn't abandoned NeWS after all, and it's even nicer to hear it from an authoritative source :-). I was hoping someone from Sun would pipe up and say something, actually. I hope I'll have to take back the evil nasty things I said about Sun last week... :-). Hopefully the Sun marketroids will get the idea this time around. -- Amanda Walker InterCon Systems Corporation "Many of the truths we cling to depend greatly upon our own point of view." --Obi-Wan Kenobi in "Return of the Jedi" From don Thu Mar 8 08:45:34 1990 Date: Thu, 8 Mar 90 08:45:34 -0500 To: NeWS-makers@brillig.umd.edu Subject: Re: sun's commitment to NeWS From: laukee%canon.uucp@NSFnet-Relay.AC.UK Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) I now have two poster-sized NeWS-makers messages on my wall. To the left, John Gilmore's "friends of NeWS may as well know truth" expose; To the right, James Gosling's "much greater commitment" retort. (I won't quote them here, if you don't know what I'm talking about just hit 'n'). Well, a couple of things still worry me. John says not to believe Sun even if they promise to fix all the problems tomorrow. James says that significant extra resources are now available for NeWS, and that the X11 bias is set for redress. John claims that the NeWS team has disintegrated, while James talks about consolidation [of the NeWS team] under a single organisation. John currently views NeWS [xnews] as a lose, and James says that tNt is set to become a real product and that Sun, and others, will be releasing NeWS-based applications Real Soon Now. [Though not, presumably, Grasshopper?] James hints at the standards / innovation bifurcation in consideration of the X11-NeWS debacle, while John talks about Sun's continued political and organisational faux pas. It is clear that The Two Faces of Sun has created an awful lot of confusion and mistrust by users and developers, [John, I guess, speaks for many of us]. But in trying to fathom out the truth we ought to ask ourselves who James speaks for. He works for Sun, and I noticed no disclaimer (good sign). He works on NeWS - and indeed, he started the sunDEW project at Sun (looking very good). He might be said to represent the good side of Sun, (technically driven, innovative, with [and here I plunge into supposition] that sense of "bugger the standards, I want the best" kind of belief in NeWS). Now we're cooking. What does this mean for NeWS? If nigh-on anyone else had posted the message instead of Gosling I think we'd all do best to follow John Gilmore's advice and file it in the trashcan. As it is, I guess Gosling has twice the investment in NeWS that any of us has. I tend to believe him when he talks about Sun's renewed commitment, and though I have misgivings about the facilitation of NeWS development through consolidation into a single organisation (could be read, "push them out together before we sink the boat"), but let's face it, Sun is too large to be non-factional, and if what we hear is true then *this* time the clever money rides with the NeWS group. *Now*, does anyone want to tell us about this X11/NeWS summer launch, and what's this mysterious OpenWindows 2? [The opinions expressed here are not necessarily shared by my employer] ------------- David Lau-Kee Canon Research Centre Europe, 17/20 Frederick Sanger Rd, Surrey Research Park, Guildford, Surrey, GU25YD, UK. NRS: laukee@uk.co.canon, INET: laukee%canon@nsfnet-relay.ac.uk UUCP: laukee@canon.uucp, PATH: ..!mcsun!ukc!uos-ee!canon!laukee Tel: +44 (0) 483 574325 Fax: +44 (0) 483 574360 From don Thu Mar 8 08:45:48 1990 Date: Thu, 8 Mar 90 08:45:48 -0500 To: NeWS-makers@brillig.umd.edu Subject: What order is the NeWS Kanji font in? From: amdcad!cdr@ucbvax.Berkeley.EDU (Carl Rigney) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) I'm playing with the kanji browser written by Stan Switzer (sjs@ctt.bellcore.com) and I'm wondering what order the Kanji symbols in the NeWS font are in. In his 88/10/04 posting to NeWS-makers he notes that % It seems that Kanji is encoded by pairs of hyper-printable-ASCII % characters. If we were to give each Kanji char a number "n" % beginning at 0, then "n", in terms of the pair (a,b) is given by % n = 96*(a-160) + (b-160) % The -160 term comes from subtracting 128 for hyperASCII and 32 % for printable ASCII. There are many ways to get the same character % (when, for instance, b is not in the "normal" range of 160-255). % This analysis is based on trial and error and error and .... My question is: Is there any mapping from say, Nelson Index # to Ordinal value in the font? For example, Ko (self) is 1462 in Nelson, and 370 in Hadamitzky & Spahn. You can display it with /Kanji findfont 24 scalefont setfont 72 72 moveto (\270\312) show 96*(188-160) + (202-160) is 2730. What I'm wondering is, is there any mapping, or are the Kanji in the font in random order (that would be horrible!). Also, does anyone out there have any tools, programs, or code examples for working with Kanji under OpenWindows? I know about Kterm for X and am planning to work on that, but I know almost nothing about X and would much prefer a solution that uses NeWS. What would be ideal is a Kanji hyper-dictionary to help learn it (I'm just a beginner), but almost anything would be appreciated. Thank you in advance for any hints, leads or help you can provide. And if anyone's interested, I'll post a summary of what I find out to comp.windows.news. -- Carl Rigney cdr@amdcad.AMD.COM {ames att decwrl pyramid sun uunet}!amdcad!cdr 408-749-2453 From don Fri Mar 9 04:18:37 1990 Date: Fri, 9 Mar 90 04:18:37 -0500 To: NeWS-makers@brillig.umd.edu Subject: Re: sun's committment to NeWS From: mailrus!umich!terminator!rioja.ifs.umich.edu!ric@tut.cis.ohio-state.edu (Richard Campbell) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Thanks Jim for the inside information. I'm glad that NeWS development is back on the high-priority list for Sun. Peter Korp writes: Would it not be a wonderful thing if the leading people in NeWS development would come together and share their ideas and philosophies with Sun. Wasn't there an organization called "Open Vistas" or some such thing which appeared to be a technical/vendor group boosting NeWS? I don't recall seeing a booth at the D.C. Uniforum, but it was at previous technical shows - Hugh, weren't you involved?? Richard Campbell From don Fri Mar 9 04:19:04 1990 Date: Fri, 9 Mar 90 04:19:04 -0500 To: NeWS-makers@brillig.umd.edu Subject: Re: GraphicServers From: uokmax!munnari.oz.au!cluster!metro!osiris!timw@apple.com (Tim Wooller) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) In article , bob@MorningStar.Com (Bob Sutterfield) writes: > > Sounds like the alternative to X terminals that the NeWS community has > been waiting for. Has anyone seen it yet? GraphicServers are new products currently in use only in Australia. Osiris is interested in marketing these products overseas and is happy to hold discussions to furthur this. Osiris will be demonstrating GraphicServers at CeBIT in Hannover March 21 to 28. We will be on the Australia stand in building 6. Perhaps some visitors will put their reports to the net. Tim Wooller -- From don Fri Mar 9 04:19:48 1990 Date: Fri, 9 Mar 90 04:19:48 -0500 To: NeWS-makers@brillig.umd.edu Subject: Re: which terminal emulator do you use? From: mcsun!sunic!tut!ks@uunet.uu.net (Syst{ Kari) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) In article marantz@porthos.rutgers.edu (Roy Marantz) writes: > I'm trying to findout which terminal emulator people use. I'm > interested in what is being done for use with OpenWindows (what a > misnomer :-|) Below are my comments on the ones I've tried so far. The Grasshopper psterm (modified here at Tampere University of Technology) is available by anonymous ftp at tut.fi (128.214.1.2). The file is src/NeWS/psterm_3.tar.Z. -- This article represents my personal views. Peter da Silva: "X is the Fortran of windowing systems." - I agree Kari Systa, Tampere Univ. Technology, Box 527, 33101 Tampere, Finland work: +358 31 162585 fax: +358 31 162913 home: +358 31 177412 From don Fri Mar 9 04:21:14 1990 Date: Fri, 9 Mar 90 04:21:14 -0500 To: NeWS-makers@brillig.umd.edu Subject: Re: sun function keys again From: spectral!sjs@bellcore.com (Stan Switzer) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) In article <9003080030.AA13390@frodo.ua.oz> george@FRODO.UA.OZ.AU (George) writes: > > with the discussion as to what is SUN doing about NeWS , i feel somewhat > reticent to repost a query about how to program Function keys within NeWS. > seems quite insignificant in comparison to the level of discussion within > this group. On the contrary, that is exactly what this group is for. I was beginning to thing we'd lost another group to meta-discussions, flamage, speculation, recriminations, and misinformation. I wish I were entirely blameless in this regard.... > however, i would appreciate it if someone could point out how to program > a function key to pass ^P for example to tcsh within a psterm window. > i have tried to do this but i haven't been able to get it to work. i really > want to be able to R8 (uparrow). OK, here's the trick: % "standard" arrow key bindings /FunctionR8 { dup begin % UP /Name /InsertValue def /Action (\033[A) def end redistributeevent } bindkey /FunctionR14 { dup begin % DOWN /Name /InsertValue def /Action (\033[B) def end redistributeevent } bindkey /FunctionR12 { dup begin % RIGHT /Name /InsertValue def /Action (\033[C) def end redistributeevent } bindkey /FunctionR10 { dup begin % LEFT /Name /InsertValue def /Action (\033[D) def end redistributeevent } bindkey /FunctionR11 { dup begin % CENTER (do nothing) /Name /InsertValue def /Action () def end redistributeevent } bindkey Just change the "Action" field to your preferred character sequence. ^P is (\020), ^N is (\016), ^F is (\006), ^B is (\002) in case you want to continue with the emacs theme. "vi" users might want to see if they can make "map" and "map!" do sensible things with the default sequences generated by these keys. As for myself, I've long-since given up on arrow keys. Proper use of arrow keys involves application intelligence, and until enough keyboards have arrow keys or enough applications abandon terminal emulation in favor of real windowing, things just aren't going to improve much. Also, this is a stop-gap solution since it remaps the arrow keys globally. What you want is for the arrow keys to be remapped according to the keyboard focus target. Again, this means application intelligence will be required. Ideally, there would be some mechanism like the X resources database to specify such application customizations. Toward a more technical newsgroup, Stan Switzer sjs@bellcore.com P.S. About the encoding of the Kanji font: I seem to remember being told that it is based on a Japanese national standard called JIS-1. It's been a long time, though, so my memory could be faulty. As for whether there is any logic in the sequence, my Chinese friends cannot discern any sense in it except that the names of various birds seem to be clumped in groups. Perhaps there is a relationship to the Japanese pronunciation. From don Fri Mar 9 04:21:38 1990 Date: Fri, 9 Mar 90 04:21:38 -0500 To: NeWS-makers@brillig.umd.edu Subject: Re: which terminal emulator do you use? From: hpda!cadence!horen@ucbvax.Berkeley.EDU (Jonathan Horen) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) In article marantz@porthos.rutgers.edu (Roy Marantz) writes: >I'm trying to findout which terminal emulator people use. I'm >interested in what is being done for use with OpenWindows (what a >misnomer :-|) Below are my comments on the ones I've tried so far. > >psterm (sun's) - works but scrolls slowly and insists on scaling the > font when the window is resized. doesn't support scrollbars >xterm (sun or MIT X) - faster than psterm on screen updating, scales > number of rows/columns when window is resized (yea), not good > for use on a slow remote machine (i.e. uncovering the window > asks the remote side to repaint, this takes too long), doesn't > understand the L keys (L5 and L7) >psterm (Grasshoppers) can't get it to work :-( probably because of > font handling changes. > >Anyone have any other's I should try? I sure do wish there was one >that worked in every situation. I find it hard to believe that these >are the "state of the art" when it comes to terminal emulations programs. You say you're interested in what is being done for use with OpenWindows? Just use either of Sun's excellent OpenWindows/XView clients -- Shelltool or CmdTool! OpenWindows is the greatest thing since SunView. Don't leave home without it. +------------------------+--------------------------------------------------+ | _J_o_n_a_t_h_a_n_ _B_._ _H_o_r_e_n_ _ _ _ _ | | . | Lilmod Al Manat Laasot | | _C_a_d_e_n_c_e_ _D_e_s_i_g_n_ _S_y_s_t_e_m_s | |__ (/\ \ / |__ Lilmod Al Manat Lelamed | | | _/ / _\ _\/ _/ Lilmod Al Manat Lichtov | | _h_o_r_e_n_@_c_a_d_e_n_c_e_._c_o_m | -: - | +------------------------+--------------------------------------------------+ From don Fri Mar 9 18:24:12 1990 Date: Fri, 9 Mar 90 18:24:12 -0500 To: NeWS-makers@brillig.umd.edu Subject: Timeout error From: dennis!dennis@boulder.colorado.edu Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) I am running an application under XNEWS 1.0 that sometimes dies with a timeout on some process. The problem is that my machine is slow not that there is a loop in the program. Does anyone know how to extend the timeout period, or suppress timeout altogether? Is this perhaps related to not doing 'pause' often enough? p.s. Dbgcontinue does not work to get things going again. -Dennis Heimbigner (dennis@boulder.colorado.edu) From don Fri Mar 9 18:25:12 1990 Date: Fri, 9 Mar 90 18:25:12 -0500 To: NeWS-makers@brillig.umd.edu Subject: Re: sun's commitment to NeWS From: crdgw1!crdgw1.ge.com!barnett@uunet.uu.net (Bruce Barnett) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) In article <9003071155.AA05836@aida.canon.co.uk>, laukee@canon writes: >*Now*, does anyone want to tell us about this X11/NeWS summer launch, and >what's this mysterious OpenWindows 2? Well, I just received my official 1.0.1 OpenWindows package. It comes with a video tape! The video tape is geared for a system manager who has difficulty reading. Close up's of someone setting environment variables, typing "y", etc. I think Sun should have included a 5 or 10 minute example of using OpenWindows. Show the people what it looks like in action - so that they will have an interest in learning more about it. If I had a video tape that gave end users an introduction to USING OpenWindows, I would have something exciting. But the tape I got from Sun is just not worth passing on to another person, unless they want a chuckle. Anyhow - the Video mentions a program called "tutorial". You execute this program, and it teaches you everything you need to know. The Video also comes with several stickers, etc. that say the "tutorial" program in not included in OpenWindows 1.0.1 Using my great deductive powers, i predict that OpenWindows 2.0 will include this on line tutorial system. :-) -- Bruce G. Barnett uunet!crdgw1!barnett From don Fri Mar 9 18:25:37 1990 Date: Fri, 9 Mar 90 18:25:37 -0500 To: NeWS-makers@brillig.umd.edu Subject: Re: sun's committment to NeWS From: neil@akolea.soest.hawaii.edu Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Let's not be so easily soothed. Our fears for NeWS are well-founded. Let's keep up the pressure on Sun to PUT NeWS IN THE PUBLIC DOMAIN. No company is perfectly managed, and in this case it seems clear that Sun's management is making a mistake by keeping NeWS proprietary. We can help NeWS *and Sun* by keeping up the pressure. From don Fri Mar 9 18:27:30 1990 Date: Fri, 9 Mar 90 18:27:30 -0500 To: NeWS-makers@brillig.umd.edu Subject: Re: What order is the NeWS Kanji font in? From: pacific.mps.ohio-state.edu!zaphod.mps.ohio-state.edu!usc!cs.utexas.edu!jarvis.csri.toronto.edu!daemon@tut.cis.ohio-state.edu (Brian Thomson) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) In article <29422@amdcad.AMD.COM> cdr@amdcad.AMD.COM (Carl Rigney) writes: >I'm playing with the kanji browser written by Stan Switzer >(sjs@ctt.bellcore.com) and I'm wondering what order the Kanji symbols >in the NeWS font are in. Kanji characters are encoded as specified by Japanese standard JIS C 6226, which comes in 1978 and 1983 flavours that are essentially identical. The encoding is done such that each 16-bit character, when regarded as a pair of 8-bit units, looks like a pair of printable ASCII characters. Similar standard encodings exist for Chinese and Korean. >My question is: >Is there any mapping from say, Nelson Index # to Ordinal value in the font? >For example, Ko (self) is 1462 in Nelson, and 370 in Hadamitzky & Spahn. >You can display it with > >/Kanji findfont 24 scalefont setfont >72 72 moveto >(\270\312) show > >96*(188-160) + (202-160) is 2730. What I'm wondering is, is there any >mapping, or are the Kanji in the font in random order (that would be horrible!). > The high-order (i.e. 128) bit being on is not required by the standard, it is a convention often used to distinguish Kanji from Roman characters in text that may contain both. The standard way to do this is to use escape sequences to switch from one character set to the other and back again. These escape sequences are standardized by the ISO. I have heard of Kanji dictionaries that indicate the JIS code, but I don't know any specifics. The character set actually contains more than just Kanji. It begins with kana (Japanese phonetic alphabets), graphics symbols, and Roman, Greek, and Cyrillic alphabets, and Arabic numerals. Then come the Kanji, which are in two groups: first a group of (relatively) common characters ordered by their commonest "on" (Chinese-derived) pronunciation in the usual Japanese syllabary order (a-i-u-e-o-ka/ga-ki/gi- etc.), then a group of less common ones ordered by radical. The character you describe has the pronunciations "onore", "ki", "ko", and sometimes "mi" in people's names. It is a common character, and its position in the character set is determined by the "ko" reading. That puts it near the front of the pack. It is immediately followed by (\270\313 as you would put it) "ko" meaning a kind of storage shed, as in "reizouko" = refrigerator. -- Brian Thomson, CSRI Univ. of Toronto utcsri!uthub!thomson, thomson@hub.toronto.edu From don Fri Mar 9 20:48:57 1990 Date: Fri, 9 Mar 90 20:48:57 -0500 To: NeWS-makers@brillig.umd.edu Subject: Re: What order is the NeWS Kanji font in? From: opus!mleisher@lanl.gov (Mark Leisher) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Try 94*(a-161) + (b-161) instead of 96*(a-160) + (a-160). I discovered this in the encoding of some Asian fonts in the new release of X11. -- ----------------------------------------------------------------------------- mleisher@nmsu.edu "I laughed. Mark Leisher I cried. Computing Research Lab I fell down. New Mexico State University It changed my life." Las Cruces, NM - Rich [Cowboy Feng's Space Bar and Grille] From don Sat Mar 10 16:30:12 1990 Date: Sat, 10 Mar 90 16:30:12 -0500 To: NeWS-makers@brillig.umd.edu Subject: NeWS unwell .. From: c-art!jae@Canada.Sun.COM (Yukon Kid) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Well, I'm just back from Seybold Seminars in Boston, and as a matter of interest I asked people at Sun's booth about NeWS, and was told the standard `we're happy with X11 now, so we'll get back to NeWS', but I then visited SGI's booth, and they said that they're changing their windowing environment to be motif-display! Sad making. -john Ps: The guy at Sun said someone had posted something to the net confirming Sun's committment to NeWS yesterday. But not to NeWS-makers, I guess? John Eadie Computing Art Inc Tel (416) 536-9951 FAX (416) 536-6252 Studio #303, 25 Liberty St, Toronto, CANADA .. jeadie@Sun.COM | jae@c-art.UUCP `_The riddle_ does not exist' 6.5, Tractatus Logico-Philosophicus, Wittgenstein From don Sat Mar 10 16:32:27 1990 Date: Sat, 10 Mar 90 16:32:27 -0500 To: NeWS-makers@brillig.umd.edu Subject: Re: sun's commitment to NeWS From: x11news_mgr@Eng.Sun.COM (sevans) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Well, I just received my official 1.0.1 OpenWindows package. It comes with a video tape! The video tape is geared for a system manager who has difficulty reading. Close up's of someone setting environment variables, typing "y", etc. I think Sun should have included a 5 or 10 minute example of using OpenWindows. Show the people what it looks like in action - so that they will have an interest in learning more about it. If I had a video tape that gave end users an introduction to USING OpenWindows, I would have something exciting. This shortcoming of the video tape is well known at Sun. If a subsequent release of OpenWindows contains a video tape, the orientation will be much more along the lines that you are looking for. But the tape I got from Sun is just not worth passing on to another person, unless they want a chuckle. I'll give away the video's BIG GAG line right now. As the folks on the video are trying to figure out where to install the tape they say, "There is no place like /home/openwin". sevans From don Sat Mar 10 16:47:44 1990 Date: Sat, 10 Mar 90 16:47:44 -0500 To: NeWS-makers@brillig.umd.edu Subject: NeWS will win iff it's free From: don (Don Hopkins) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) One of the biggest problems with NeWS in the past has been that there was no way to get many of the ports of NeWS that had been done. Sun wasn't selling them, and neither was anyone else. Even though somebody ported it to some particular machine, they had no way of distributing the port to other people, because it was proprietary and they were not set up to sell software (not an easy thing to do in your spare time). If there were a port of X11/NeWS to the SGI, or any other machine for that matter, and the source was available for free, then it could be distributed by the X Consortium, the Free Software Foundation, Cygnus, anonymous ftp directories around the world, and through many other channels. -Don From don Mon Mar 12 01:08:03 1990 Date: Mon, 12 Mar 90 01:08:03 -0500 To: NeWS-makers@brillig.umd.edu Subject: Re: sun's committment to NeWS From: haven!ncifcrf!toms@purdue.edu (Tom Schneider) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) In article <9003091828.AA01983@elepaio.soest.hawaii.edu> neil@AKOLEA.SOEST.HAWAII.EDU writes: > PUT NeWS IN THE PUBLIC DOMAIN. Seconded! By the way, somebody (sorry I lost the information) objected to my previous posting about NeWS. They thought that programming in NeWS was not good. My main reason for believing NeWS is technically superior has to do with the use one can put it to. I have always been interested in graphics and have seen many kinds appear and disappear in the last 16 years. I have been always frustrated by graphics that did not integrate what I put on a CRT with what I put onto my printer, because I use the graphics as notes in my scientific notebooks. NeWS, being based on PostScript FINALLY sidesteps this problem by using the same language on both places. I preview graphs on my screen, dump them to the printer for hard copy and dump them to disks for high quality figures in publications. This system can't be beat, it's the obvious logical way to go. Can you imagine having a different graphics language for every output device 50 years in the future? Ugh! I work with an X-based drawing program called 'fig' because it has a nicest set of icon-controls and doesn't bomb at every move I make (unlike a NeWS drawing program released not too long ago). But the thing is doomed because it does not have a way to manipulate characters. The characters appear one size on the screen but are not in the same location on the paper - one has to fight to make it work. One can't rotate anything in angles other than 90 degrees. Where is Sun's support for things like this that we all need to make our figures? And howcome Sun went to all the trouble to make 20 stupid terminal types on the standard NeWS interface, when ONE good one would have done the job? (Sorry, this one still bugs me because I STILL don't have something better than a shelltool to work with, see below... ) Finally, there was a posting recently on where to get psterm - but I forgot to transfer using binary and it wouldn't uncompress. Could somebody remind me where it is again? Thanks. Tom Schneider National Cancer Institute Laboratory of Mathematical Biology Frederick, Maryland 21701-1013 toms@ncifcrf.gov From don Tue Mar 13 02:10:49 1990 Date: Tue, 13 Mar 90 02:10:49 -0500 To: NeWS-makers@brillig.umd.edu Subject: Re: sun's commitment to NeWS From: hoptoad!gnu (John Gilmore) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) I'm glad that people believe James Gosling about NeWS more than they believe me. Check his message for specifics, though. Weed out the promises and soothing noises and what is left? > John claims that the NeWS team has disintegrated, while James talks about > consolidation [of the NeWS team] under a single organisation. The "old" NeWS team has disintegrated. There may be a "new" NeWS team... > ...Sun, and others, will be releasing NeWS-based > applications Real Soon Now. [Though not, presumably, Grasshopper?] Grasshopper has no NeWS products in the pipeline. At this point we are a consulting company. When we run out of consulting we'll dissolve it. > ...in trying to fathom out the truth we ought to ask ourselves who James > speaks for....He might be said to represent the good side of Sun, (technically > driven, innovative, with [and here I plunge into supposition] that sense of > "bugger the standards, I want the best" kind of belief in NeWS). I agree with this characterization; James is tops on my list. The problem is that he's been fooled before with Sun's promises, level of committment, and simply how much work it is to get from here to there. > . . .if what we hear > is true then *this* time the clever money rides with the NeWS group. Even if Sun has a high level of committment to NeWS, I can't see it as a viable window system unless they take it non-proprietary. I can see that a very committed Sun could make it a good, proprietary, replacement for SunView with some time and work. But the chance for it to take hold in the wide world as a proprietary product has been shot to hell by the combination of Sun, DEC, and X. Even as a free product it will be an uphill battle since the marketing war is already lost. -- John Gilmore {sun,pacbell,uunet,pyramid}!hoptoad!gnu gnu@toad.com Boycott the census! In 1942, the Census Bureau told the Army which block every Japanese-American lived on, so they could be hustled to internment camps. Maximum penalty for refusing to answer: $100, no jail. From don Tue Mar 13 02:11:15 1990 Date: Tue, 13 Mar 90 02:11:15 -0500 To: NeWS-makers@brillig.umd.edu Subject: Open Vistas From: hoptoad!gnu (John Gilmore) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) ric@rioja.ifs.umich.edu (Richard Campbell) wrote: > Wasn't there an organization called "Open Vistas" or some such thing > which appeared to be a technical/vendor group boosting NeWS? Open Vistas was a trade association for "PostScript on screens" vendors and users. To be independent from Sun it had to be run by people from the community. Grasshopper and Windows Marketing started it; Architec joined in to administer it. A bunch of NeWS vendors financed their shares of the big booth, and Sun kicked in some money for administration and the nonprofits (e.g. Don Hopkins and Los Alamos). The problem was, we had no marketing people. Hugh and I are hackers. Our third partner Keith is not strong at marketing. Architec seems to have similar problems. E.g. when Adobe called up to see if they could join, Architec said "we'll have to think about it" rather than "YES!!!". Sun Windows Marketing has its hands full already, and if Sun ran Open Vistas it would truly appear to be just another arm of Sun Marketing. It should've been NeWS (and DPS) Marketing -- lord knows we needed it -- but we had no marketing experience. We never developed the organization or spent any time on recruiting people, beyond the first booth. I think we did OK for being some hackers putting together a booth. The problem was in follow-through, and Grasshopper and Architec didn't have what it took. If somebody wants to resurrect Open Vistas for future NeWS stuff, more power to you -- but find a marketeer! -- John Gilmore {sun,pacbell,uunet,pyramid}!hoptoad!gnu gnu@toad.com Boycott the census! In 1942, the Census Bureau told the Army which block every Japanese-American lived on, so they could be hustled to internment camps. Maximum penalty for refusing to answer: $100, no jail. From don Tue Mar 13 02:11:39 1990 Date: Tue, 13 Mar 90 02:11:39 -0500 To: NeWS-makers@brillig.umd.edu Subject: Re: sun's commitment to NeWS From: intercon!news@uunet.uu.net (Amanda Walker) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) In article <10762@hoptoad.uucp>, gnu@hoptoad.uucp (John Gilmore) writes: > I'm glad that people believe James Gosling about NeWS more than they > believe me. Well, I don't want to get in the middle of an argument between two people I respect quite a bit, but I would say that James inches you out this time, John. In particular: - James is still working for Sun. I don't know much about the internal politics involved, but I've been following SunDEW -> NeWS -> OpenWindows progress from the outside, and of everyone who has worked on it, James is the one who has been there from the start. If he's just blowing hot air and Sun isn't doing anything, then he (and Sun) are about to lose one of a lot of their credibility. James now has a lot on the line, and he seems like enough of a realist not to do that unless there's something behind him to back it up. His posting was a lot stronger than just being enthusiastic at a windowing conference... > The "old" NeWS team has disintegrated. There may be a "new" NeWS team... That may not be all bad--I don't know enough to speculate. > I agree with this characterization; James is tops on my list. The problem > is that he's been fooled before with Sun's promises, level of committment, > and simply how much work it is to get from here to there. The same was true with X11, and it's still alive... :-). This need not be fatal unless you bet all of your assets on someone else's project. > Even if Sun has a high level of committment to NeWS, I can't see it as > a viable window system unless they take it non-proprietary. For that matter, Sun doesn't even have to be the company that does so. C-script isn't the only PostScript interpreter out there; adding the new data types and lightweight processes would not be at all impossible for a good Lisp programmer; since all of NeWS's extra primitives are quite low level, the basic technology is quite accessible to anyone who wants to compete. It's certainly of similar scale to stuff GNU is sponsoring... > Even as a free product > it will be an uphill battle since the marketing war is already lost. (I don't like the war metaphor, but...) battles can turn, too. I wouldn't call this one over unless Sun actually gives up, but it seems that the rumors to that effect were somewhat exaggerated. We'll all get to find out, though... :-). -- Amanda Walker InterCon Systems Corporation "Many of the truths we cling to depend greatly upon our own point of view." --Obi-Wan Kenobi in "Return of the Jedi" From don Tue Mar 13 02:12:08 1990 Date: Tue, 13 Mar 90 02:12:08 -0500 To: NeWS-makers@brillig.umd.edu Subject: help with menus From: raible@ew09.nas.nasa.gov (Eric L. Raible) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) I'm posting this for a friend - it should be an easy one for someone out there... On SGI machines, the window mangler uses right mouse as the "menu button". It is possible to put up a menu with the left mouse, by calling dopup, but dopup won't return until the RIGHT button is pressed. [ dopup = do popup, and is the graphics library interface to the NeWS litemenus ] So what is needed is a way to temporarily make leftmouse be the MenuButton during the duration of the dopup. This is easy, right? From don Tue Mar 13 08:46:35 1990 Date: Tue, 13 Mar 90 08:46:35 -0500 To: NeWS-makers@brillig.umd.edu Subject: Re: sun's commitment to NeWS From: dwf@hope.ACL.LANL.GOV (David W. Forslund) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) I don't buy the idea by itself tht NeWS would be a success if Sun had given it away because a lot of people would work on it. William Leler of Cogent Research offered a free version of NeWS called PIX a couple of years ago if some people would volunteer to enhance the graphics performance. No one stepped forward, so we still have no free NeWS. Dave Forslund Los Alamos From don Tue Mar 13 08:59:07 1990 Date: Tue, 13 Mar 90 08:59:07 -0500 To: NeWS-makers@brillig.umd.edu Subject: sun's commitment to NeWS From: don (Don Hopkins) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Date: Tue, 13 Mar 90 08:46:35 -0500 From: dwf@hope.ACL.LANL.GOV (David W. Forslund) I don't buy the idea by itself tht NeWS would be a success if Sun had given it away because a lot of people would work on it. William Leler of Cogent Research offered a free version of NeWS called PIX a couple of years ago if some people would volunteer to enhance the graphics performance. No one stepped forward, so we still have no free NeWS. Dave Forslund Los Alamos As I understand it, PIX used the graphics library in NeWS 1.1 (cscript), but that could not be given away with PIX. If the NeWS 1.1 source code had been freely redistributable then there would have been no need for someone to volunteer to write a PostScript graphics library to go with PIX. PIX plus cscript or some other compatible graphics library (like shapes in xnews) would be a nice workable window system. The PIX PostScript interpreter has some enhancements over the NeWS PostScript interpreter, but the hardest part of NeWS to implement is the graphics library, not the interpreter. -Don From don Wed Mar 14 04:30:40 1990 Date: Wed, 14 Mar 90 04:30:40 -0500 To: NeWS-makers@brillig.umd.edu Subject: Sockets: Can a NeWS process be a client? From: hbo!huelsbec (David Huelsbeck) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) My coworkers and I have only recently joing the mailing list, so I'll apologize in advance in the event that this subject was just discussed at length last week. Sorry. The subject says it all. Is there a means of doing and open_connection() call from a NeWS process so that it can take on the client role? From what I can tell from the documentation I'd have to say that the answer is "No.", but it seems like such a natural thing to want to do they must have provided some way of doing it. Right? ;-) Oh, we're still waiting on the new release of NeWS, (i.e. we're using 1.1) if that has any thing to do with it. Thanks, -dph (you ... atlantis.ees.anl.gov!hbo!huelsbec) David P. Huelsbeck Applied Computing Systems, Inc From don Wed Mar 14 04:30:54 1990 Date: Wed, 14 Mar 90 04:30:54 -0500 To: NeWS-makers@brillig.umd.edu Subject: Free NeWS? (Re: sun's commitment to NeWS) From: zaphod.mps.ohio-state.edu!lavaca.uh.edu!uhnix1!sugar!ficc!peter@tut.cis.ohio-state.edu (Peter da Silva) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Is the PIX PostScript interpreter available any more? Even without the windowing, a free PostScript would be something worth having available for a wide variety of purposes. The only one I know of is Ghostscript, and I don't care to play political games with the GNU folks. -- _--_|\ `-_-' Peter da Silva. +1 713 274 5180. . / \ 'U` \_.--._/ v From don Wed Mar 14 12:26:44 1990 Date: Wed, 14 Mar 90 12:26:44 -0500 To: NeWS-makers@brillig.umd.edu Subject: Re: Free NeWS? (Re: sun's commitment to NeWS) From: agate!shelby!helens!baroque!jim@ucbvax.Berkeley.EDU (James Helman) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Don't forget Crispin Goswell's interpreter which was integrated into viewers for SunView and X. I think the SunView interface fell away, but "xps" is still alive, mostly well, and available by anonymous ftp from expo.lcs.mit.edu (contrib/xps.tar.Z). An older version, which may still have the SunView support, is available from labrea.stanford.edu (pub/ukps.tar.Z) Jim Helman Department of Applied Physics P.O. Box 10494 Stanford University Stanford, CA 94309 (jim@thrush.stanford.edu) (415) 723-4940 From don Thu Mar 15 01:06:18 1990 Date: Thu, 15 Mar 90 01:06:18 -0500 To: NeWS-makers@brillig.umd.edu Subject: Re: Sockets: Can a NeWS process be a client? From: zaphod.mps.ohio-state.edu!uwm.edu!rpi!netserv2!deven@think.com (Deven T. Corzine) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) On 14 Mar 90 09:30:40 GMT, huelsbec@hbo.UUCP (David Huelsbeck) said: David> My coworkers and I have only recently joing the mailing list, so David> I'll apologize in advance in the event that this subject was just David> discussed at length last week. Sorry. Hasn't recently... David> The subject says it all. Is there a means of doing and David> open_connection() call from a NeWS process so that it can take David> on the client role? From what I can tell from the David> documentation I'd have to say that the answer is "No.", but it David> seems like such a natural thing to want to do they must have David> provided some way of doing it. Right? ;-) The answer is in fact "Yes." It's not documented, but it exists. Basically, instead of: (%socketl123) file You use: (%socketc123.host.domain) file Ugh. It's been a while since I've done it, so I may be misremembering, but I know that the key is to do the same as you would to open an incoming socket (that's documented), but replace the (%socketl) with (%socketc.host). I hope I remembered that right; I've had the hardest time remembering the proper format for host & port for an outgoing socket. But I think it's port number followed by any nondigit separator and then the host. I know you replace the %socketl with %socketc. ("socket listen" -> "socket connect") Anyway, give it a try. If that format doesn't work, Email me and I'll root around for the info I have somewhere, or I'll try it. David> Oh, we're still waiting on the new release of NeWS, (i.e. we're David> using 1.1) if that has any thing to do with it. It works under NeWS 1.1... Deven -- Deven T. Corzine Internet: deven@rpi.edu, shadow@pawl.rpi.edu Snail: 2151 12th St. Apt. 4, Troy, NY 12180 Phone: (518) 274-0327 Bitnet: deven@rpitsmts, userfxb6@rpitsmts UUCP: uunet!rpi!deven Simple things should be simple and complex things should be possible. From don Thu Mar 15 01:06:35 1990 Date: Thu, 15 Mar 90 01:06:35 -0500 To: NeWS-makers@brillig.umd.edu Subject: OpenWindows tools/toys/etc... From: noose.ecn.purdue.edu!harbor.ecn.purdue.edu!mckay@iuvax.cs.indiana.edu (Dwight D. McKay) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Hi. Having just started running NeWS/OpenWindows on a regular basis, I'm interested in places where I can FTP sample programs or tools. What's the best NeWS tools I should get a hold of? -- Dwight D. McKay -- mckay@harbor.ecn.purdue.edu From don Thu Mar 15 01:06:46 1990 Date: Thu, 15 Mar 90 01:06:46 -0500 To: NeWS-makers@brillig.umd.edu Subject: what's up with GoodNeWS for 2.0 From: agate!darkstar!jupiter.ucsc.edu!conrad@ucbvax.Berkeley.EDU (Al Conrad, x2370) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) What's up with GoodNeWS for NeWS 2.0 (i.e., open windows)? I've got use of a sparcstation now but have to switch to NeWS 1.1 when I want to newsdraw, preview TeX, etc. Thanks in advance, Al conrad@cis.ucsc.edu From don Thu Mar 15 01:06:56 1990 Date: Thu, 15 Mar 90 01:06:56 -0500 To: NeWS-makers@brillig.umd.edu Subject: Re: Free NeWS? (Re: sun's commitment to NeWS) From: zaphod.mps.ohio-state.edu!math.lsa.umich.edu!emv@tut.cis.ohio-state.edu (Edward Vielmetti) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) please do make the sunview support for Goswell's stuff available. --Ed From don Thu Mar 15 01:07:35 1990 Date: Thu, 15 Mar 90 01:07:35 -0500 To: NeWS-makers@brillig.umd.edu Subject: Re: Free NeWS? (Re: sun's commitment to NeWS) From: sun-barr!newstop!texsun!hosaka.Central.Sun.COM!jthomp@apple.com (Jim Thompson) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) > Don't forget Crispin Goswell's interpreter which was integrated into > viewers for SunView and X. I think the SunView interface fell away, > but "xps" is still alive, mostly well, and available by anonymous ftp > from expo.lcs.mit.edu (contrib/xps.tar.Z). An older version, which > may still have the SunView support, is available from > labrea.stanford.edu (pub/ukps.tar.Z) Um, there never was SunView support, though there was the basic SunWindow support. A few months back, Mike Bender and I went through the gymnastics to bend the code into working with (under?) SunView. I suppose I can put it out somewhere if the demand is overwhelming. -- Jim Thompson - Network Engineering - Sun Microsystems - jthomp@central.sun.com Charter Member - Fatalistic International Society for Hedonistic Youth (FISHY) "Confusing yourself is a way to stay honest." -Jenny Holzer From don Thu Mar 15 01:07:43 1990 Date: Thu, 15 Mar 90 01:07:43 -0500 To: NeWS-makers@brillig.umd.edu Subject: setlinewidth and overlay canvases From: elroy.jpl.nasa.gov!usc!brutus.cs.uiuc.edu!zaphod.mps.ohio-state.edu!swrinde!cs.utexas.edu!milano!cadillac!surya!alexandr@decwrl.dec.com (Mark Alexandre) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Does anyone know whether it is a feature or a bug that setting the line width seems to have no effect when drawing on an overlay canvas? That is, the thickness of any line does not change when stroked, regardless of what value has been given to 'setlinewidth'. I didn't find any mention of this fact in the NeWS 2.0 Programmer's Guide, section 2.5, which deals with overlay canvases. Is this hardware dependent? Would there be performance problems if the line width were set rather large? I am running NeWS 2.0 (X/NeWS) on a Sun 4/110. Mark Alexandre@MCC.com From don Thu Mar 15 02:08:27 1990 Date: Thu, 15 Mar 90 02:08:27 -0500 To: NeWS-makers@brillig.umd.edu Subject: GoodNeWS & HyperNeWS version 1.3 NOW AVAILABLE!!!! From: don (Don Hopkins) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Hurray hurray!! GoodNeWS and HyperNeWS version 1.3, by Arthur van Hoff of the Turing Institute, are now available via anonymous ftp, from tumtum.cs.umd.edu (128.8.128.49). [Set binary mode, go to the "NeWS" directory, and retrieve the file "HyperNeWS1.3.RELEASE.tar.Z". A collection of lots of other NeWS programs is in the file "news-tape.tar.Z".] What is it? Well, as understated by the README file: "This is GoodNeWS/HyperNeWS for OpenWindows1.0. HyperNeWS provides a complete user-interface development environment, which is considerable easier to use than other offerings." Run, don't walk, to your nearest shell window, fire up an ftp, and get a copy! It's too good to describe in detail, but basically, GoodNeWS is a window system environment for NeWS, and HyperNeWS is HyperCard done *RIGHT*, with PostScript instead of pixels, and Unix instead of MacOS. GoodNeWS includes a wonderful color PostScript drawing editor (which can now include encapsulated PostScript documents!), utilities to include plots in GoodNeWS drawings and GoodNeWS drawings in LaTeX documents, a dvi previewer and dvi to PostScript converter (to print and view LaTeX documents), a terminal emulator, a load monitor, a chess position editor (you can paste chess boards into the drawing editor), and a scrabble game. You can make HyperNeWS stacks, in arbitrarily shaped windows, with graphics and buttons and other user interface objects that are programmable in PostScript. You can cut and paste drawings between the GoodNeWS drawing editor and HyperNeWS stacks (and there is a new drawing editor implemented on top of HyperNeWS!), make stacks with buttons, scroll bars, sliders, scrolling editable text windows, menus, dials, and more. You can write PostScript scripts for the user interface objects (stacks, backgrounds, cards, and other stuff), and there's even (very importantly) a client side library to HyperNeWS, so you can interface C, Prolog, and Lisp programs to HyperNeWS stacks! HyperNeWS is actually a complete toolkit, and you can create user interfaces using the drawing tool and HyperNeWS stack editing commands (menus, buttons, sliders, text windows, keyboard accelerators, etc). There are HyperNeWS stacks with documentation about GoodNeWS and HyperNeWS, a class browser stack, stacks for editing the characteristics of various HyperNeWS objects, and a lots of nifty demos. (Pete's neck never gets tired!) Best of all, it's free! Thanks to everybody at Turing for making it fly! -Don From don Thu Mar 15 12:32:13 1990 Date: Thu, 15 Mar 90 12:32:13 -0500 To: NeWS-makers@brillig.umd.edu Subject: Re: setlinewidth and overlay canvases From: Rafael Bracho Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) >Does anyone know whether it is a feature or a bug that setting >the line width seems to have no effect when drawing on an overlay >canvas? That is, the thickness of any line does not change when >stroked, regardless of what value has been given to 'setlinewidth'. It is a feature. Overlay canvases are ambiguously defined on purpose, to allow for efficient (perhaps hardware-dependent) implementations. It was rumoured that some of their restrictions may be lifted in the future (e.g., ability to set the color, perhaps line width, etc.). -Rafael From don Thu Mar 15 14:31:43 1990 Date: Thu, 15 Mar 90 14:31:43 -0500 To: NeWS-makers@brillig.umd.edu Subject: Re: Free NeWS? (Re: sun's commitment to NeWS) From: crdgw1!crdgw1.ge.com!barnett@uunet.uu.net (Bruce Barnett) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) In article <2120@texsun.Central.Sun.COM>, jthomp@hosaka (Jim Thompson) writes: > I suppose I can put it out somewhere if the demand is >overwhelming. Please. The old "patch" announced in comp.sources.misc (v15i049) never worked right. -- Bruce G. Barnett uunet!crdgw1!barnett From don Thu Mar 15 21:48:37 1990 Date: Thu, 15 Mar 90 21:48:37 -0500 To: NeWS-makers@brillig.umd.edu Subject: Re: setlinewidth and overlay canvases From: naughton%sun.com@sun.com (Patrick Naughton) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) In article <9003151602.AA06773.rxb@plutonium.ASC.SLB.COM>, rxb@ASC.SLB.COM (Rafael Bracho) writes: > >Does anyone know whether it is a feature or a bug that setting > >the line width seems to have no effect when drawing on an overlay > >canvas? That is, the thickness of any line does not change when > >stroked, regardless of what value has been given to 'setlinewidth'. > > It is a feature. Overlay canvases are ambiguously defined on purpose, > to allow for efficient (perhaps hardware-dependent) implementations. > It was rumoured that some of their restrictions may be lifted in the > future (e.g., ability to set the color, perhaps line width, etc.). > > -Rafael The overlay code does indeed ignore the linewidth, dash pattern, color, etc., on paths... Here's how overlays work: An overlay canvas maintains a list of paths and strings to display. The only way to add a string to this list is with the 'show' operator, and the only way to add a path is with the 'stroke' operator. A notable exception is that paths cannot be 'fill'ed. This was done for the same reason that wide lines were left out. Overlays are implemented by simply rendering the display list using the XOR rasterop mode each time the canvas which has the overlay is written to. If large filled areas were allowed, rather than the current one pixel wide lines, there would be excessive screen flashing. On future graphics hardware which has one or more hardware overlay planes, this restriction can be removed. This is why the definition of what happens in the overlay canvases has been left ambiguous. ______________________________________________________________________ Patrick J. Naughton ARPA: naughton@sun.com Window Systems Group UUCP: ...!sun!naughton Sun Microsystems, Inc. AT&T: (415) 336 - 1080 ps. while we're talking about overlays... here's a little hack which shows off rotated OpenFonts in the overlay plane... Click the middle button to change the string, and give it a few spins to let the font cache fill up with the glyphs. %!PS-NeWS2.0 %%Title: OpenFonts rotated text demo %%Creator: Patrick Naughton %%CreationDate: Thu Mar 15 11:40:15 PST 1990 %%EndComments /fontfamily /Palatino-Roman def /fontsize 64 def /angle 60 def /strings [ (Open) (Fonts) (are) (very) (cool) (!!!!) ] def %%EndProlog fboverlay setcanvas fontfamily findfont fontsize scalefont setfont /drag createevent dup begin /Name /MouseDragged def /Canvas fboverlay def /Exclusivity true def end def /click createevent dup begin /Name /LeftMouseButton def /Action null def /Exclusivity true def /Canvas null def end def /flip createevent dup begin /Name /MiddleMouseButton def /Action [ /UpTransition /DownTransition ] def /Exclusivity true def /Canvas null def end def /update { erasepage x y translate angle rotate 0 0 moveto strings idx get false { false charpath strokepath stroke } { cshow } ifelse } def currentcursorlocation /y exch def /x exch def /idx 0 def update drag expressinterest click expressinterest flip expressinterest { awaitevent dup begin Name { /MiddleMouseButton { /Action get /DownTransition eq { /idx idx 1 add strings length mod store update } if } /MouseDragged { pop /x XLocation store /y YLocation store update } /LeftMouseButton { pop exit } } case end } loop erasepage drag revokeinterest click revokeinterest flip revokeinterest From don Thu Mar 15 21:49:47 1990 Date: Thu, 15 Mar 90 21:49:47 -0500 To: NeWS-makers@brillig.umd.edu Subject: images From: smc%radon@LANL.GOV (Susan Coghlan) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Hi, I have a client program that creates a postscript file that creates an image. I'd like to be able to make the image fit into a specified area of the page, leaving room for labels, etc... When I execute it in a NeWS window (NeWS 1.1) using buildimage and imagecanvas - I simply build a rectpath around the area where I want the image to be, do a clip, scale to a unit square, scale to fit the image to the unit area, buildimage and imagecanvas. It works great. However, when sending the same code to the printer (using image and showpage), it's as if the image was done and then the clip clipped a hole out of it. Meaning that the area that should be blank for the labels etc, has image in it, and the area where the image should be is blank... Any help would be greatly appreciated. Thanks, Susan Coghlan smc@radon.lanl.gov From don Fri Mar 16 16:24:54 1990 Date: Fri, 16 Mar 90 16:24:54 -0500 To: NeWS-makers@brillig.umd.edu Subject: HyperNeWS 1.3 - term: cannot open PostScript From: mentor.cc.purdue.edu!noose.ecn.purdue.edu!harbor.ecn.purdue.edu!mckay@purdue.edu (Dwight D. McKay) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) I'm running HyperNeWS 1.3 under OpenWindows 1.0. It works wonderfully except for the following: 1) Start up xnews w/HyperNeWS 1.3 .startup.ps & .user.ps 2) Exit from HyperNeWS 3) Try and start an "nterm". It works fine. 4) Start up an X11 application, say, xmh. 5) Try and start an "nterm". It never starts up and give the error message, "term: cannot open PostScript". Is there a fix for this? Did I get something wrong in the install or build? Everything seems to work just fine as long as I don't start up any X11 applications... -- Dwight D. McKay -- mckay@harbor.ecn.purdue.edu From don Fri Mar 16 16:25:07 1990 Date: Fri, 16 Mar 90 16:25:07 -0500 To: NeWS-makers@brillig.umd.edu Subject: /InstanceVarExtra From: hbo!bice (Brent A. Bice) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) I've been wondering what /InstanceVarExtra is for. I saw this variable in the LiteWindow subclass, but as far as I can tell, it's not used for anything. Does anyone know what this variable is for if anything? Oh, by the by, I'm running NeWS ver 1.1. Thanks. Brent Bice Applied Computing Systems 2075 Trinity Drive Suite Lower Level Los Alamos, NM 87544 (505) 662-3309 bice@atlantis.ees.anl.gov From don Fri Mar 16 17:16:24 1990 Date: Fri, 16 Mar 90 17:16:24 -0500 To: NeWS-makers@brillig.umd.edu Subject: Re: what's up with GoodNeWS for 2.0 From: hoptoad!hugh (Hugh Daniel) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) GoodNeWS (Soon to be knowen as HyperNeWS) is allmost to final release. I have seen a version that is readdy to go once the testers say that it installs correctly. HyperNeWS 1.3 runs under OpenWindows (Ie, NeWS 2.0, X/NeWS 1.0, this system is a PAIN!). I have to go test it now... ||ugh Daniel hugh@toad.com Grasshopper Group, +1 415/668-5998 hugh@xanadu.com 210 Clayton St. San Francisco CA94117 From don Sat Mar 17 04:23:24 1990 Date: Sat, 17 Mar 90 04:23:24 -0500 To: NeWS-makers@brillig.umd.edu Subject: HyperNeWS1.3 startup problem From: cary%scripps.edu@scripps.edu (Steve Cary) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Well, I unbundled and tried to run it... Got a strange error that I can't figure out... Any pointers would be most appreciated!!! -Steve Cary cary@scripps.edu Research Institute of Scripps Clinic, La Jolla, CA Error Messages::: X11/NeWS: error in .user.ps X11/NeWS: initial operand stack not clear! X11/NeWS: initial dictionary stack not clear! Environment::: HOME=/benden/cary SHELL=/bin/csh TERM=sun-cmd USER=cary PATH=/bin:/benden/cary/bin:/usr/hosts:/usr/local/GoodNeWS1.3/bin:/usr/local/HyperNeWS1.3/bin:/usr/local/OpenWindows1.0/bin:/usr/local/frame2.0/bin:/usr/local/misc/bin:/usr/local/news/bin:/usr/local/rcs/bin:/usr/local/transcript/bin:/usr/local/OpenWindows1.0/bin/xview:/usr/local/OpenWindows1.0/demo:/usr/bin:/usr/ucb:/usr/new:/usr/etc:/etc:.:/usr/games LOGNAME=cary PWD=/benden/cary FMHOME=/usr/local/frame2.0 OPENWINHOME=/usr/local/OpenWindows1.0 GNHOME=/usr/local/GoodNeWS1.3 HNHOME=/usr/local/HyperNeWS1.3 MANPATH=/usr/local/OpenWindows1.0/share/man:/usr/local/GoodNeWS1.3/man:/usr/local/OpenWindows1.0/man:/usr/local/rcs/man:/usr/local/transcript/man:/usr/share/man LD_LIBRARY_PATH=/usr/local/OpenWindows1.0/lib:/usr/lib XNEWSHOME=/usr/local/OpenWindows1.0 XVIEWHOME=/usr/local/OpenWindows1.0 HELPDIR=/usr/local/OpenWindows1.0/lib/help WMGR_ENV_PLACEHOLDER=/dev/win1 WINDOW_PARENT=/dev/win0 NEWSSERVER=3223999020.2000;benden DISPLAY=unix:0 XSERVER=/tmp/.X11-unix/X0 From don Mon Mar 19 18:23:59 1990 Date: Mon, 19 Mar 90 18:23:59 -0500 To: NeWS-makers@brillig.umd.edu Subject: Re: /InstanceVarExtra From: Rafael Bracho Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) If I remember correctly (this is no longer true in NeWS 2.0), Object, in class.ps, adds InstanceVarExtra to the number of instance variables for a particular class, to obtain the size of the instance's dictionary. If you set InstanceVarExtra to zero, all attempts to 'def' a new variable in an instance will fail, with a 'dictfull' error. Given that the initial size of the dictionary is just a hint to the hashing function in NeWS (i.e., no space is actually allocated), there is no reason to make InstanceVarExtra small (other than wanting such errors to indicate unwanted definitions). -Rafael From don Tue Mar 20 18:40:20 1990 Date: Tue, 20 Mar 90 18:40:20 -0500 To: NeWS-makers@brillig.umd.edu Subject: Friendly complaints of a would-be NeWS/GoodNeWS/HyperNeWS user... From: maxwell.mmwb.ucsf.edu!rodgers@cgl.ucsf.edu (R. P. C. Rodgers) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Dear Fellow Netlanders, We have high regard and enthusiasm for the technical merits of NeWS, and highly admire the folks at Turing for sharing a system like GoodNeWS/HyperNeWS. We have been delighted with features of both, and would like to be using them as our production windowing environment; however, we still find impediments to doing so. Some of our problems may have work-arounds which NeWS gurus out there may be able to help solve. Others may require peppier hardware or a new (more efficient) release of NeWS. So please take the following remarks as criticism from friends of NeWS who are not entirely satisfied with how it works at present. We look forward to reading knowledgeable responses. ca. GoodNeWS/HyperNeWS 1.3: --------------------------- 1) GoodNeWS appears to work. If we put in our standard multi-line .openwin-init, it starts xnews with an altered menu system (great scrabble game!). However, selecting the HyperNeWS item on the root menu does *nothing*. No error messages, no action of any type. If we use the supplied (one-line) openwin-init, as I read the instructions, HyperNeWS should start about 30 seconds after the GoodNeWS Turing Inst. message appears on screen. Again, nothing...nothing... nothing... What's wrong here? Xnews works fine on its own; GNHOME and HNHOME are defined, the supplied .usr.ps, (one-line) openwin-init, and .startup.ps files are present. 2) Documentation seems sparse. I assume that HyperNeWS itself is suppposed to present you with on-line documentation, but given that it may not work (vide supra), a bare-bones UNIX man page seems required, with some very basic description of what the package is and how it behaves. Such manual pages ARE provided for the GoodNeWS components. The README refers to a GoodNeWS document, but we find no evidence of such, unless this appears as part of HyperNeWS on-line information, which is not easily read as ASCII files. 3) Now and then GoodNeWS (SPARCstation 1, OS 4.0.3, 12MB, running as 1 of 5 discless clients on a 32MB 4/370) gets *VERY* slow, and occasionally completely hung (requiring a L1-A maneuver). 4) The terminal emulator is superior to any supplied with OpenWindows (nice job!)--see point 5 below. ca. OpenWindows 1.0: -------------------- 1) The default font for xnews is ridiculously small and hard on the eyes. The fix (for psterm) is to add -fontsize NN to the command line, where NN is the point size to be used (we find 14 optimal). 2) It would be MUCH easier on the user if he/she could change the point size and font type through some window-based system such as the SunView defaults editor. At present, to change the font type (according to the manual) you must create a file .startup.ps containing the following (I use the font LucidaSansTypewriter in the example): UserProfile begin /ClassPsTermCanvas { begin /TextFamily /LucidaSansTypewriter store currentdict end } def end 3) The xnews initialization file (.openwin-init) is terribly limited in capability compared to equivalent SunView .sunview file: a) we can't find any way to start SunView applications from .openwin-init (workaround: start them as background processes from a shell script invoked as command to a psterm window). b) you can't specify the location of a psterm icon in .openwin-init 4) Support for SunView tools is clumsy. Icons and windows have wide white borders around them; SunView icons can not be put behind other objects; see also item 3a above. 5) The terminal emulation is poor. For example, when you rescale a psterm window, the font is rescaled proportionally to the window, which is not of much use. It should rescale so as to preserve font size but change the number of rows and columns (or at least, an option should be present to force it to behave this way if desired). We find no way to make ^H produce a backspace in cmd-tool or mailtool. There is no inverse video mechanism in shelltool or cmd-tool, which make certain programs (like the nn news reader) useless. 6) It is still SLLOOOOOWWWWWWWW. When we return to SunView, we are dazzled at the speed (though we would rather have the network capabilities and other features of NeWS). Cheerio, Rick Rodgers (rodgers@maxwell.mmwb.ucsf.edu) R. P. C. Rodgers, M.D. (415)476-8910 (work) 664-0560 (home) UCSF Laurel Heights Campus UUCP: ...ucbvax.berkeley.edu!cca.ucsf.edu!rodgers 3333 California St., Suite 102 ARPA: rodgers@maxwell.mmwb.ucsf.edu San Francisco CA 94118 USA BITNET: rodgers@ucsfcca From don Tue Mar 20 18:40:31 1990 Date: Tue, 20 Mar 90 18:40:31 -0500 To: NeWS-makers@brillig.umd.edu Subject: Re: Free NeWS? (Re: sun's commitment to NeWS) From: ogicse!admin!goward@ucsd.edu (Philip Goward) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) The PIX window system is alive and well on the Cogent Research XTM. The graphics libraries have been completely rewritten, and it no longer uses any cscript code. PIX isn't yet completely compatible with NeWS, but is compatible enough to run litewindow and litemenu, and most of the Sun demo programs. PIX now also supports X in a novel way - by means of a shared graphics server that both a separate PostScript server and X server access simultaneously. On the Cogent machine all three parts run on different processors. Cogent is still interested in enhancing the graphics side of the server, and also in the possibility of putting PIX into the public domain, but it still needs work before it's exactly like NeWS. Anyone interested can contact me: Philip J Goward, at Cogent Research Inc., 1100 NW Compton Dr., Beaverton, OR 97006. goward@admin.ogi.edu From don Tue Mar 20 18:41:05 1990 Date: Tue, 20 Mar 90 18:41:05 -0500 To: NeWS-makers@brillig.umd.edu Subject: Problem with getsocketlocaladdress From: mcsun!ukc!strath-cs!turing.ac.uk!news@uunet.uu.net (Jim Rudolf) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) We've noticed some unusual behavior between X and NeWS, and we're wondering if this When running psh in OpenWindows1.0 on a sparc, the following line of code produces a typical response: (%socketl2001) (r) file getsocketlocaladdress == (2516582412.2001;rannoch) Then we do something as innocuous as adding a new machine to the X access list: xhost +glass Now, repeating the line in psh produces: (%socketl2001) (r) file getsocketlocaladdress == (2516582417.2001;glass) Is this correct? We wanted to add a host to the access list, but we didn't want to change our default NeWS server. Can anyone else repro- duce this? Thanks for the help, -- Jim Rudolf rudolf@turing.ac.uk From don Wed Mar 21 18:22:51 1990 Date: Wed, 21 Mar 90 18:22:51 -0500 To: NeWS-makers@brillig.umd.edu Subject: Getting framebuffer's colormap twice fails From: David Burgess Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Subject: Another way to crash X/NeWS 1.0 here's a cute way to crash X/NeWS 1.0 (aka NeWS2.0). Any explanations? ----------- psh executive Welcome to X11/NeWS Version 1.0 framebuffer /Colormap get /Entries get pstack [colormapentry(255, 255, 255 @ 0) colormapentry(0, 0, 0 @ 1) etc etc ... ] ----------- ie. get the colormapentries for the root canvas This works as expected. Now .. clear the stack and repeat the same operations ---------- pop pstack Empty stack framebuffer /Colormap get /Entries get pstack [**obj/corpus type mismatch** colormapentry( colormapentry( colormapentry( ... same wierd garbage ... ] ----------- And the neat thing is that when you leave psh with ^D the server comes down with a "X11 closing" message. And you are left with a login prompt. Maybe I'm being stupid (I am a NeWSnovice)... Is there an explanation? David Burgess ++++++++ Astronomy Unit, Queen Mary College, London UK From don Wed Mar 21 18:23:04 1990 Date: Wed, 21 Mar 90 18:23:04 -0500 To: NeWS-makers@brillig.umd.edu Subject: RE: colormap segments problem From: David Burgess Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) I posted a problem about getting the colormap entries of the root canvas.... AARGH! Apologies. My problem was OpenWindows_1.0_Bugs Bug Id: 1025608 The work around is in the bug list. David Burgess From don Wed Mar 21 22:59:51 1990 Date: Wed, 21 Mar 90 22:59:51 -0500 To: NeWS-makers@brillig.umd.edu Subject: Re: Friendly complaints of a would-be NeWS/GoodNeWS/HyperNeWS user... From: pasteur!miro.Berkeley.EDU!tzeng@ames.arc.nasa.gov (Ping-San Tzeng) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) In article <10878@hoptoad.uucp> hugh@toad.com (Hugh Daniel) writes: > > I have noticed that many folks are haveing problems with getting >HyperNeWS (and therefore GoodNeWS) 1.3 up. Many have gotten a message >about an error in .user.ps and dont know what the problem is. This is a problem that I found. In $GNHOME/sys/fixes.ps, there is segment of code for deciding the machine architecture. The default value is "sun3" if you don't have "sun4" in your PATH. I changed all the (sun3) to (sun4) and then it worked fine on my SPARC. Ping-san. From don Wed Mar 21 23:56:23 1990 Date: Wed, 21 Mar 90 23:56:23 -0500 To: NeWS-makers@brillig.umd.edu Subject: Re: Friendly complaints of a would-be NeWS/GoodNeWS/HyperNeWS user... From: hoptoad!hugh (Hugh Daniel) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) I have noticed that many folks are haveing problems with getting HyperNeWS (and therefore GoodNeWS) 1.3 up. Many have gotten a message about an error in .user.ps and dont know what the problem is. While testing HyperNeWS I found that it is VERY important that you add $GNHOME/bin and $HNHOME/bin to your PATH before you start HyperNeWS. If you add the bin directorys to your .login be sure to login again or to source the .login file. For documentation on HyperNeWS and GoodNeWS look at the manual stacks for each under the Applicatoins stacks button on the left edge of the screen when HyperNeWS is up and running. One note, I think that GoodNeWS its self will be going away and that HyperNeWS will be whats left when Turing is done. The parts of GoodNeWS that HyperNeWS uses will will end up in HyperNeWS I guess. This is why I talk of HyperNeWS first and sometimes add GoodNeWS second in prens. ||ugh Daniel hugh@toad.com Grasshopper Group, +1 415/668-5998 hugh@xanadu.com 210 Clayton St. San Francisco CA94117 From don Sat Mar 24 00:12:16 1990 Date: Sat, 24 Mar 90 00:12:16 -0500 To: NeWS-makers@brillig.umd.edu Subject: Re: Friendly complaints of a would-be NeWS/GoodNeWS/HyperNeWS user... From: mcsun!ukc!strath-cs!turing.ac.uk!news@uunet.uu.net (Jim Rudolf) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) In article <10878@hoptoad.uucp> hugh@toad.com (Hugh Daniel) writes: > > While testing HyperNeWS I found that it is VERY important that you >add $GNHOME/bin and $HNHOME/bin to your PATH before you start HyperNeWS. >If you add the bin directorys to your .login be sure to login again or >to source the .login file. Not to split hairs, but the directories should be $GNHOME/bin-"`arch`"-xnews $HNHOME/bin-"`arch`"-xnews -- Jim Rudolf The Turing Institute rudolf@turing.ac.uk From don Sat Mar 24 00:12:45 1990 Date: Sat, 24 Mar 90 00:12:45 -0500 To: NeWS-makers@brillig.umd.edu Subject: Re: HyperNeWS1.3 startup problem From: zaphod.mps.ohio-state.edu!rpi!crdgw1!crdgw1.ge.com!barnett@tut.cis.ohio-state.edu (Bruce Barnett) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) In article <9003162315.AA09014@benden.scripps.edu>, cary@SCRIPPS (Steve Cary) writes: > X11/NeWS: error in .user.ps > X11/NeWS: initial operand stack not clear! > X11/NeWS: initial dictionary stack not clear! As I recall, the sample .user.ps file looks at the stack of dictionaries and pops off all that are loaded. This strikes me as being kludgy, because if you begin a dictionary and then append the HyperNews .user.ps, it will pop off it's dictionaries and yours as well. In any case NeWS 20.0 detects when something is left on the stack after executing the .user.ps file and warns you that things aren't nested correctly. Eyeball your .user.ps again. Do you get the error when you use their .user.ps as originally provided? -- Bruce G. Barnett uunet!crdgw1!barnett From don Sat Mar 24 21:06:33 1990 Date: Sat, 24 Mar 90 21:06:33 -0500 To: NeWS-makers@brillig.umd.edu Subject: OS/2 Press Release ... From: ucsdhub!hp-sdd!ncr-sd!asihub!cris@ucsd.edu (Cris Nelson) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) OS/2 Magazine - News Release Contact: OS/2 Magazine 1101 B Eugenia Place Carpinteria, CA 93013 Phone: (805) 566-1282 FAX: (805) 566-9153 BBS: (805) 684-0589 Subscriptions: (800) 322-9873 Outside CA. $19.95 / year: (805) 684-9873 Inside CA. FOR IMMEDIATE RELEASE Santa Barbara, Calif. January 20, 1990 - The Silicon Beach Operation, Inc. today announced it will launch OS/2 Magazine, a full-color, monthly magazine for users of OS/2, Presentation Manager and Windows on all hardware platforms. The Premier issue of OS/2 Magazine will debut in June at COMDEX and will include hard news, commentary, reviews, editorials and interviews. OS/2 Magazine will cover industry and technology highlights, new hardware and software products as well as in depth profiles of the companies and people that will make OS/2 the dominant computing environment of the 90's. OS/2 Magazine will also offer special coverage each month to Micro- soft Windows (Presentation Manager for DOS), along with product reviews, news and help to users as they migrate from DOS/Windows to OS/2. OS/2 networking coverage will include helpful hints and tips on getting started, implementation, administration and trouble shooting. Networking articles will include "how-to" solutions and reviews of workgroup software and hardware. OS/2 Magazine will also devote a section, to software engineering in the OS/2 Presentation Manager environment. Topics will include languages, programming techniques, debugging, tools, CASE (computer aided software engineering) and OOPS (object oriented programming) technologies. OS/2 Magazine offers an OS/2 and Windows only BBS, with 1200/2400 baud service. OS/2 Magazine ONLINE supports upload and download facilities, public domain OS/2 programs, e-mail and tele-conferencing capabilities. The OS/2 Magazine ONLINE BBS number is (805)-685-0589. "OS/2 Magazine will offer readers a refreshing "hands-on" approach. It will serve both as a valuable information resource for OS/2 users and as a barometer for corporate MIS, business and government decision makers to help them determine when and how to best get started," said editor, Dave Nelson . "Our objective is to provide timely, detailed information covering the entire range of OS/2 and Windows issues - to be the one-stop OS/2/Windows shop, so to speak." OS/2 Magazine will be sold on the newstand, and distributed to paid subscribers and through controlled subscriptions to the fortune 1000, government users and to computer resellers. Total distribution of the premiere spring Comdex issue will exceed 70,000 copies, including a special distribution of 20,000 copies at COMDEX/Spring 1990 in Atlanta, GA. OS/2 Magazine advertising rates for a full-page, black and white insertion begin at $5115. To charter advertisers who commit to three consecutive insertions, the fourth will be free. For advertising information, contact Ann M. Briggs or Paul Thomas Burns at (805) 566-1282. For information about OS/2 Magazine, contact David Nelson at (805) 566-1282. OS/2 Magazine ONLINE services voice line is (805) 566-1282, modem line is (805) 684-0589 (after March 1, 1990). OS/2 is a trademark of International Business Machines. -- Cris Nelson cris@asihub.AUTOSYS.COM {uunet|ncr-sd}!asihub!cris 805-684-8977 days 805-966-7170 evenings From don Sat Mar 24 21:07:23 1990 Date: Sat, 24 Mar 90 21:07:23 -0500 To: NeWS-makers@brillig.umd.edu Subject: NeWS and sockets again From: hbo!huelsbec (David Huelsbeck) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Deven, thanks for the tip on %socketc. It did the trick. But I've now run in to a strange problem using the socket it creates. I've written a C program that's designed to be a daemon type server. It's supposed to be possible to start it manually or with inetd. Either inetd or the manually started parent server listen at a well known port number. When they receive a connection they dup2(2) the new socket to STDIN and STDOUT and then they fork a new server (in the case of inetd fork-exec) to handle the connection. Whether or not the new server was started by inetd or by a parent server it assumes that it's ready to talk on STDIN and STDOUT. All of this works fine when the client is another C program. When the client is a NeWS process, though, things are a bit different. I can connect and send information to the server just fine, but when I try to read the socket bad things happen. If I just do ' read' the NeWS server blows up completely, if I do a ' bytesavailable' I get zero back. I know the server is writing data to the socket (STDOUT) and the writes are successful. But there's nothing there as far as NeWS is concerned. Any ideas? I'd really rather not go back to the old method of having the NeWS process loop until it finds an open port to listen to, and then forking a "server" to talk to it. -dph David P. Huelsbeck Applied Computing Systems, Inc. (you...atlantis.ees.anl.gov!hbo!huelsbec) From don Tue Mar 27 08:04:06 1990 Date: Tue, 27 Mar 90 08:04:06 -0500 To: NeWS-makers@brillig.umd.edu Subject: GNU Emacs under Good/Hyper NeWS From: att!cbnewsh!ko@ucbvax.Berkeley.EDU (kostas.n.oikonomou) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Does anyone have GNU Emacs (18.54 or later) working under Good/Hyper NeWS 1.3? I have a modified version that runs under NeWS1.1, but doesn't work very well with GoodNeWS 1.3, mostly because the mouse gets messed up. The problem may really be to get Emacs to work under the NeWS part of X11/NeWS, since GoodNeWS runs on top of that. Any information will be appreciated. Kostas Oikonomou From don Wed Mar 28 04:26:27 1990 Date: Wed, 28 Mar 90 04:26:27 -0500 To: NeWS-makers@brillig.umd.edu Subject: Fun with NeWS and sockets (final word) From: hbo!cinemax!huelsbec (David Huelsbeck) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Well, I did some further investigation into the behavior of sockets in NeWS. It seems that I had the right idea but there is a bug in NeWS 1.1 that causes it not to work correctly. Perhaps that's why %socketc was left undocumented. The following shows the interaction between two psh's (not) communicating through a socket under NeWS 1.1 and X11/News 1.0.1: -------------------NeWS 1.1--------------------------------------------------- SERVER CLIENT ------------------------------------------------------------------------------ hbo.2.257% psh executive Welcome to NeWS Version 1.1 hbo.2.257% psh executive Welcome to NeWS Version 1.1 (%socketl3000) (r) file /port exch def port acceptconnection pstack (%socketc3000.hbo) (r) file /chan exch def file(?,W,R) /chan exch def chan (hello) writestring chan flushfile chan bytesavailable pstack 0 chan (didn't get your hello) writestring chan flushfile chan bytesavailable pstack 0 -------------------X11/NeWS--------------------------------------------------- SERVER CLIENT ------------------------------------------------------------------------------ hbo.3.257% psh executive Welcome to X11/NeWS Version 1.0.1 hbo.3.257% psh executive Welcome to X11/NeWS Version 1.0.1 (%socketl3000) (r) file /port exch def port acceptconnection pstack (%socketc3000.hbo) (r) file /chan exch def file(?,W,R) /chan exch def chan (hello) writestring chan flushfile chan bytesavailable pstack 5 string chan exch readstring pstack (hello) true pop pop chan (got your hello) writestring chan flushfile chan bytesavailable pstack 14 string chan exch readstring pstack (got your hello) true pop pop ----------------------------------------------------------------------------- -dph David P. Huelsbeck Applied Computing Systems, Inc. (you ... atlantis.ees.anl.gov!hbo!huelsbec) From don Wed Mar 28 04:27:25 1990 Date: Wed, 28 Mar 90 04:27:25 -0500 To: NeWS-makers@brillig.umd.edu Subject: Instancevariables. From: cs.utexas.edu!samsung!zaphod.mps.ohio-state.edu!rpi!uupsi!sunic!nuug!ifi!Lazy@tut.cis.ohio-state.edu Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) I've got some questions concering classes and it's instance- variables in NeWS 1.1. How come strings and other simple types seems to be unique for each instace, but arrays and dict's are not ? It looks like arrays (and dict's) are considered to be global. Have I missed something, or is this a feature or a bug ? Could someone please tell me what I'm doing wrong, or maybe suggest a workaround. Script started on Tue Mar 27 15:01:22 1990 15:01 Lazy@vak /auto/home/gille/b/lazy/src/cps >psh executive NeWS Version 1.1 /li 2 array def /foo Object 2 dict dup begin /ar 2 array def /name 20 string def end classbegin classend def li 0 /new foo send put li 1 /new foo send put {/name (Instance 1) def} li 0 get send {/name (Instance 2) def} li 1 get send li == [dict[ /ParentDictArray: [dictionary[30] dictionary[20]] /ParentDict: dictionary[20] /ar: [null null] /name: (Instance 1)] dict[ /ParentDictArray: [dictionary[30] dictionary[20]] /ParentDict: dictionary[20] /ar: [null null] /name: (Instance 2)]] {ar 0 123 put} li 0 get send {ar 0 456 put} li 1 get send li == [dict[ /ParentDictArray: [dictionary[30] dictionary[20]] /ParentDict: dictionary[20] /ar: [456 null] /name: (Instance 1)] dict[ /ParentDictArray: [dictionary[30] dictionary[20]] /ParentDict: dictionary[20] /ar: [456 null] /name: (Instance 2)]] quit psh: NeWS server disconnected 15:06 Lazy@vak /auto/home/gille/b/lazy/src/cps >exit script done on Tue Mar 27 15:07:33 199 Lasse Bjerde lazy@ifi.uio.no Department of Informatics University of Oslo, Norway From don Wed Mar 28 04:27:55 1990 Date: Wed, 28 Mar 90 04:27:55 -0500 To: NeWS-makers@brillig.umd.edu Subject: Re: Instancevariables. From: spectral!sjs@bellcore.com (Stan Switzer) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) In article Lasse Bjerde writes: > > I've got some questions concerning classes and it's instance- > variables in NeWS 1.1. > How come strings and other simple types seems to be unique > for each instance, but arrays and dict's are not ? The example, slightly edited, was: /foo Object dictbegin /ar 2 array def /name 20 string def dictend classbegin classend def Each object gets its own instance variables and these variables are initialized with the values specified in the initialization section you give. The value specified for "ar" is the particular array you create using "2 array." Bug or feature? Let's just say that you might want to share the same array sometimes. If you really want to have an array per item, you'll have to initialize it in the /new method: /new { /new super send begin /ar 2 array def /name 20 string def currentdict end } def Is this is nuisance? Yes, this is a nuisance. That's why the class mechanism in NeWS 2.0 provides a "/newinit" method to handle more complex initialization than can be accommodated in the instance variable initialization section. Stan Switzer sjs@bellcore.com From don Wed Mar 28 04:29:16 1990 Date: Wed, 28 Mar 90 04:29:16 -0500 To: NeWS-makers@brillig.umd.edu Subject: OpenLook pswm sub From: Robin Faichney Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) A question for all the OpenWindows 1.0 experts out there ;-) I'm a novice, so apologies for any stupidities. I have looked at both manuals and source, and am none the wiser. No doubt the answer is there (in the source, anyway), but I can't dive that deep as yet. I use an X window manager instead of pswm -- no accounting for taste, as they say. Unfortunately, I find that I can't move OL application windows around. The rubber banding works, but when I release the button, the window refuses to jump. There are apparently a number of ways of approaching this problem. As I don't use many OL applications, but have been building one, my first try was to subclass as follows: /MyOpenLookBaseFrame OpenLookBaseFrame [] classbegin % Override: have to do moves here as not using pswm /MakeInterests { % - => interests /MakeInterests super send PointButton { /movefromuser self send } /DownTransition Canvas /MakeInterest self send } def classend def (Actually, my very first try was to redefine OpenLookBaseFrame, but that was very nasty.) The window moves very nicely, but I'm left with a rubberbanded frame which follows the mouse pointer around until the application is killed. Even if DragFrame? is false. Fixes for either or both of these problems would be great. Doing two resizes (on opposite corners) for each move is a trifle tedious, especially where the application would rather disallow resizing altogether, like mine. R or F at your own discretion. Robin Faichney, Canon Research Centre Europe Ltd, NRS: rjf@uk.co.canon 17-20 Frederick Sanger Road, ARPA: rjf@canon.co.uk Surrey Research Park, Guildford. GU2 5YD UUCP: rjf@canon.uucp Tel (+44)||(0) 483 574325 Fax (+44)||(0) 483 574360 From don Wed Mar 28 04:29:40 1990 Date: Wed, 28 Mar 90 04:29:40 -0500 To: NeWS-makers@brillig.umd.edu Subject: finding memory sinks in X/NeWS From: kneller@cgl.ucsf.edu (Don Kneller) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) My application, which creates canvases under canvases under the framebuffer is using memory at a horrific rate. Almost certainly, some of my canvases aren't being GCed. As a note, my application is removed from the screen when the client quits. Are there any general techniques for locating un-garbage-collected objects in X/NeWS? Is there a canvas-browser (wishful ...)? On an allmost unrelated note, could someone explain "soften" to me? In which situations would I be likely to need it? Sorry for all the questions, but restarting X/NeWS is getting a little tedious. Oh, OpenWindows 1.0. ----- Don Kneller INTERNET: kneller@cgl.ucsf.edu UUCP: ...ucbvax!ucsfcgl!kneller BITNET: kneller@ucsfcgl.BITNET ----- Don Kneller UUCP: ...ucbvax!ucsfcgl!kneller INTERNET: kneller@cgl.ucsf.edu From don Wed Mar 28 23:13:40 1990 Date: Wed, 28 Mar 90 23:13:40 -0500 To: NeWS-makers@brillig.umd.edu Subject: SIGCHI From: korp@adelaide.ees.anl.gov Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) To all of you who are attending SIGCHI, send me mail. There is a big event that you will be interested in. Please mail me as soon as possible, I promise it will be good. Peter A. Korp Argonne National Lab korp@tripoli.ees.anl.gov If mail is too slow, call me! (708) 972-3109 From don Wed Mar 28 23:18:21 1990 Date: Wed, 28 Mar 90 23:18:21 -0500 To: NeWS-makers@brillig.umd.edu Subject: Re: Instancevariables. From: Rafael Bracho Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Indeed, Stan's answer is correct but it *is* a nuisance having to specialize the /new (or /newinit) method just to provide complex instance variables (in the PostScript sense). The class.ps provided with OpenWindows 1.0 (NeWS 2.0) has an initial stab at automatically copying complex variables at instantiation time (unfortunately, with a bug in the case of canvases). We load the following file (after class.ps) to provide an automatic creation of complex instance variables, plus two more things: (1) Give more structure to mixin classes (i.e., classes that don't descend from Object), and (2) provides a /construct method (similar to /new) which accepts a single argument, a dictionary with key/value pairs that will become instance variables -- this is similar to keyword arguments in Common Lisp; thus the following are equivalent (using the familiar LiteWindow classes): framebuffer /new DefaultWindow send dup /FrameTextColor 1 0 0 rgbcolor put and dictbegin /ParentCanvas framebuffer def /FrameTextColor 1 0 0 rgbcolor def dictend /construct DefaultWindow send (personally, I find the second option more elegant, plus it's easier to expand by including other keywords). I've sent this code to Sun and they're studying it to see if it can be merged in future versions of OpenWindows -- the file includes a few other utilities for dealing with objects. We routinely load this file and haven't gotten any problem with standard classes. -Rafael % % This is an extension to the standard class.ps provided with % X11/NeWS. % % It MUST be loaded after class.ps % % Rafael Bracho (RXB@ASC.SLB.COM) % %%% %%% Re-define classbegin so root-less classes get some more %%% stuff. %%% /classbegin { % classname superclass insvars => - ; Puts newclass on dictstack % Re-use previously defined class so subclassers point % to correct dict after a class is redefined. % The check for isclass? is for autoloads. currentdict 3 index known { % ..insvars dict currentdict 3 index get dup isclass? { % ..insvars dict' dup /SubClasses get exch % ..insvars array dict /cleanoutclass 1 index send begin % ..insvars array /SubClasses exch def % ..insvars } {pop dictbegin} ifelse } {dictbegin} ifelse % NewInsVars: convert array to dict, % noting whether a dict copy will work for the instance /DictCopyOK? true def dup isarray? { % name superclass insvars dup length 0 eq { pop nulldict } { dictbegin {null def} forall dictend % name superclass insvardict } ifelse } { % if it's already a dict, decide whether we can copy the values dup { ShouldCopyIns? { /DupInsVars ne { /DictCopyOK? false def exit } if } { pop } ifelse } forall } ifelse % insvardict % move DupInsVars to class. dup /DupInsVars known { % name superclass insvardict /DupInsVars 2 copy 2 copy % .. ivd /DIV ivd /DIV ivd /DIV get def exch undef % name superclass insvardict } { /DupInsVars nulldict def } ifelse % name superclass insvardict /NewInsVars exch def % name superclass % Convert ParentClasses to an array; null -> [] dup isarray? not {[exch dup null eq {pop} if]} if % If this is an unrooted class, give the poor orphan its own % version of utilities that Object provides to its legitimate % descendants. dup length 0 eq { % % These are some of my changes -- RXB % /createparentdictarray {CreateParentDictArray} def /superclasses { % - => array ;return inheritance array. ParentDictArray dup type /dicttype eq { dup /ParentDictArray get exch 1 array astore append } if } def /parentclasses { % - => array ; return the immediate parents ParentClasses } def /subclasses {SubClasses} def % - => array ;return subclass array. % % End of my changes -- RXB % /cleanoutclass {currentdict cleanoutdict} def /DefaultClass {self} def } if % Save ParentClasses & ClassName /ParentClasses exch def % name /ClassName exch def % - % Initialize SubClasses if not redefining the class. currentdict /SubClasses nullarray ?put % Figure the order of all the superclasses of this class. CreateParentDictArray % % More changes. --RXB % % We should rectify the value of DictCopyOK? since even though this % class doesn't have a complex instance variable, some of its % ancestors may have one or more. If so, we need to copy them % when making instances. DictCopyOK? { ParentDictArray { dup /DictCopyOK? known { /DictCopyOK? get not { /DictCopyOK? false def exit } if } { pop } ifelse } forall } if % % End of changes -- RXB % % Now set up the dictstack as though we'd done a send to this class. currentdict ParentDictArray end {begin} forall begin } def % I had to change these because there is no copycanvas!!!! -RXB % utilities for copying compound instance variables % first, the dict of which types to copy: /Temp 10 dict dup begin /arraytype {dup length array copy} def % /canvastype {dup /Parent get newcanvas copycanvas} def /dicttype {dup maxlength dict copy} def /eventtype {createevent copy} def /stringtype {dup length string copy} def end def % Test for whether an instance variable should be copied. /ShouldCopyIns? { % obj //Temp exch truetype known } def % Copy a compound instance variable. /CopyCompoundIns { % obj => obj' dup xcheck exch //Temp 1 index truetype get exec exch {cvx} if } def % End of changes -- RXB % A few utilties -- RXB %%% %%% (Re)Define a class or instance variable default value. %%% Note that this is different from the 'promote' methods. %%% /defaultvar { % class varname varvalue => - 2 index /InstanceVars known { 2 index /InstanceVars get dup % cl na va iv iv 3 index known { % cl na va iv bool 3 1 roll put pop } { pop put % Define a new class variable } ifelse } { put % Define a new instance variable } ifelse } def %%% %%% Utility -- return type of a random object %%% Dictionaries are checked to see if they are objects %%% if so their type name is returned. For classes, %%% we append "[class]" to the class name. /typeof { % randomthing => name dup truetype dup /dicttype eq { pop dup isobject? { dup isclass? { /ClassName get dup length string cvs ([class]) append cvx } { /ParentDictArray get /ClassName get cvx } ifelse } { truetype } ifelse } { exch pop } ifelse } def %%% %%% Utility -- typep %%% test whether thing is of the same type or inherits %%% from that type %%% /typep { % thing typename => bool 1 index typeof 1 index eq { pop pop true % easy, directly the same type } { 1 index isobject? { dup /dicttype eq % classes and instances are both this 2 index isclass? { /superclasses 3 index send { /name exch send 2 index eq or } forall % check for [class] names for classes } { /superclasses 3 index send { /classname exch send eq or } forall % check for class names for instances } ifelse 3 1 roll pop pop } { pop pop false % not a class/instance, so no } ifelse } ifelse } def %%% %%% Utility -- activeobject %%% scans the current send contexts to find an object %%% that is typep the given type and currently executing a %%% method, excluding the object which is most active. %%% (i.e. self will not be returned normally). %%% The most recent such suitable send is returned. /activeobject { % typename => object/null sendstack { dup 2 index typep {true exit} {pop} ifelse } forall type /booleantype eq {exch pop} {null} ifelse } def %%% %%% Utility -- receivers %%% Print the classes in object implementing the message %%% /receivers { % message-name object => - dup isobject? { console (%:\n) [4 index] fprintf dup 2 index known { console ( implemented by the object % itself\n) [ 3 index /name exch send ] fprintf } if /superclasses exch send { dup 2 index known { [ exch /classname exch send ] console ( by class %\n) 3 -1 roll fprintf } { pop } ifelse } forall pop } { console (% is not an Object\n) [3 index] fprintf pop pop } ifelse } def %% %% Modifications to the basic Object class. %% %% We don't use the /installmethod mostly for efficiency. Also, %% the definition of /makeanew would be hard to make. Make sure %% the definitions are done only once. %% Object /makeanew known not { Object begin %% %% CONSTRUCT takes a set of initial slot values in a dictionary, %% providing a keyword-like initializing phase to object creation; %% in turn useful for variable number and type of arguments. %% %% SuperClasses may re-define construct to tinker with this %% keyword dictionary on the way down. The /newinit protocol %% is still observed, of course. %% %% NOTE: %% We can't send self new (or newobject) here, as the new specializations %% often need arguments; instead, both newobject and construct use a %% basic underlying routine, makeanew. %% /makeanew /newobject load def /newobject { /makeanew self send } methodcompile def /construct { % initial-slot-dictionary Class => instance /makeanew self send % make a new one begin {def} forall % copy the initial slot values currentdict end {/newinit self send self} exch send } methodcompile def % This is similar to /superclasses but only returns immediate ancestors /parentclasses { % - => array ParentClasses } def %% Modify /destroy so it will print a warning when using the %% default destroy method. % /destroy { % console % /class? self send { % (Warning: % using the default /destroy\n) % [/classname self send] % } { % (Warning: %, instance of %, using the default /destroy\n) % [/name self send /classname self send] % } ifelse % fprintf % } methodcompile def end } if % Only define these if not known yet From don Wed Mar 28 23:19:24 1990 Date: Wed, 28 Mar 90 23:19:24 -0500 To: NeWS-makers@brillig.umd.edu Subject: Re: finding memory sinks in X/NeWS From: Rafael Bracho Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) You should use objectwatch to determine the types of objects you're leaving in the server (the manual entry is included in the OpenWindows directory hierarchy). We found (in NeWS 1.1) that we were leaving canvases in the operand stack of a process. These canvases were non-mapped (but retained) which meant that nothing was staying on the screen, yet the server would grow huge. A combination of psps and objectwatch would have made our sleuthing a lot more palatable (these tools are new with OpenWindows). As for soften, class.ps installs an Obsolete handler that will send an /obsolete message to the instance when there are only soft references to it. The default /obsolete message sends /destroy to itself but you could specialize /obsolete to get rid of other links, etc., before destroying the instance (by an '/obsolete super send'). As an example, one could allow a data object to be shared among different drawing objects (to avoid duplication of data in the server, which leads to fat servers); these would be hard links from the drawing object to the data object. In addition, you may want to collect all data objects in a global dictionary, for accounting, etc.; these would be soft links. Then, when a drawing object is destroyed, it nulls its reference to the data object so, when there are no more drawing objects needing a particular data object, the latter will receive an /obsolete message (due to the single soft link from the global dictionary). The handler would 'undef' the instance from such dictionary, before letting the default /obsolete destroy the instance. Clear as mud? -Rafael From don Wed Mar 28 23:19:57 1990 Date: Wed, 28 Mar 90 23:19:57 -0500 To: NeWS-makers@brillig.umd.edu Subject: InstnaceVariables (arrays/strings/dicts) From: hbo!espn!bice (Brent A. Bice) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) As I understand it, arrays, strings, and dictionaries are all pointers in NeWS. So when you define them in an instance dictionary, they appear to be non-unique. Since several instances of the same subclass with an array for instance in the instance dictionary would have the same pointer, they would both be pointing to the same array. My solution has been to make code that did somethin' like: /MyWin LiteWindow dictbegin /MyArray null def /MyDict null def /MyStr null def dictend classbegin /new { /new super send begin % open up the new instance /MyArray 20 array def % Make a unique array for this instance /MyDict 20 dict def % Make a unique dictionary for this instance /MyStr () def % you get the idea currentdict end } def classend def This way each instance has a unique set of pointers to their arrays or dictionaries. Hope this helps... From don Wed Mar 28 23:20:59 1990 Date: Wed, 28 Mar 90 23:20:59 -0500 To: NeWS-makers@brillig.umd.edu Subject: Is it possible to create a transparent bit-plane? From: zaphod.mps.ohio-state.edu!rpi!uupsi!sunic!dkuug!ambush!andrew@tut.cis.ohio-state.edu (Leif Andrew Rump) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Well somebody has to come with the silly questions - so why not me! I'm trying to develop what we call an annotation editor. This editor allow me to write and draw on top of something (pixel-graphics, objects (box, circle, ...), text, ...) _without_ destroying it! I'm trying to make it as easy for myself as possible. My dream is that I can put an tranparent bit-plane on top of an editor (which of course I have source code acces to) so the drawings I generate in the annotation editor is stored in this specific bit-plane _but_ shown on top of the other bit-plane that may actually be several levels deep (I only need one level: black or transparent, 1 and 0 or whatever). How do I do it or do _YOU_ have a better idea then please mail me... Leif Andrew Rump, AmbraSoft A/S, Stroedamvej 50, DK-2100 Copenhagen OE, Denmark UUCP: andrew@ambra.dk (Please note name change), phone: +45 39 27 11 77 Currently at SAS (Scandinavian Airline Systems), phone: +45 32 32 22 79 > > Read oe as: o / (slash) and OE as O / (slash) < < From don Wed Mar 28 23:21:33 1990 Date: Wed, 28 Mar 90 23:21:33 -0500 To: NeWS-makers@brillig.umd.edu Subject: Re: Is it possible to create a transparent bit-plane? From: wsl.dec.com!klee@decwrl.dec.com (Ken Lee) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) In article <1820@ambush.dk>, andrew@ambush.dk (Leif Andrew Rump) writes: > My dream is that > I can put an tranparent bit-plane on top of an editor (which of course > I have source code acces to) so the drawings I generate in the > annotation editor is stored in this specific bit-plane _but_ shown on > top of the other bit-plane that may actually be several levels deep (I > only need one level: black or transparent, 1 and 0 or whatever). A standard computer graphics technique for doing this is to reserver one bit from a multi-bit colormap for your overlay annotations. Allow your graphics editor to use any of the colors specified by the other bits. For example, on an 8 plane machine, make all colors with the first bit on be black. Then, write your overlays with a GC foreground of black and GC function of GXor. You can retreive/erase/copy/etc. the underlying graphics and the overlay annotations independently by simply specifying the proper planes in your GCs. Any computer graphics text should have example colormaps for doing this, possibly also examples with more than 2 independent images. Ken Lee DEC Western Software Laboratory, Palo Alto, Calif. Internet: klee@wsl.dec.com uucp: uunet!decwrl!klee From don Thu Mar 29 14:57:41 1990 Date: Thu, 29 Mar 90 14:57:41 -0500 To: NeWS-makers@brillig.umd.edu Subject: Re: InstnaceVariables (arrays/strings/dicts) From: zaphod.mps.ohio-state.edu!uwm.edu!rpi!uupsi!sunic!nuug!ifi!Lazy@tut.cis.ohio-state.edu Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) > As I understand it, arrays, strings, and dictionaries are all pointers >in NeWS. So when you define them in an instance dictionary, they appear to >be non-unique. As far as I have been able to test this only applies to arrays and dictionaries, not to strings. At least the string in my little example acted as if it was unique. >Hope this helps... It did, thanks. Lasse Bjerde lazy@ifi.uio.no Department of Informatics University of Oslo, Norway From don Thu Mar 29 22:47:31 1990 Date: Thu, 29 Mar 90 22:47:31 -0500 To: NeWS-makers@brillig.umd.edu Subject: Grabbing the Pointer From: zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!uflorida!haven!h.cs.wvu.wvnet.edu!cerc.wvu.wvnet.edu!panther.cerc.wvu.wvnet.edu!coop@tut.cis.ohio-state.edu (Cooperate) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) I am trying to develop an application to cut an arbitrary part of the screen from the SGI (News server, 4D). I have managed to do that by opening a little window on the screen, trapping the mouse-down event in it and then executing a fullscreen() to be able to follow the mouse around the screen to draw the rubber-band and eventually get the coordinates on the mouse-up. Now, the question is : can I do that without using the window, i.e. specify to the NeWS server that from now until later I want ALL the mouse events, something equivalent to the X call XGrabPointer (as you can see, I am an X man. Sorry to abuse you, folks) Boris Pelakh "Software - a spell one casts on a pelakh@cerc.wvu.wvnet.edu computer to transform input into coop@cerc.wvu.wvnet.edu errors." -- Me Disclaimer : If my employer knew what I did with the time I get paid for, I would be out of a job. Let's keep this between us, OK ? From don Thu Mar 29 22:48:56 1990 Date: Thu, 29 Mar 90 22:48:56 -0500 To: NeWS-makers@brillig.umd.edu Subject: Mouse Land Mines From: hbo!bice (Brent A. Bice) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Here's a quickie program I wrote fer NeWS 1.1. I decided that after workin' late on some war games that it was time to wage another kind of war... (grin!) Don't know if it works with NeWS/X-11, but it was kinda fun ta write, and seems ta work pretty well on NeWS 1.1. ---------------------------------- mine.ps --------------------------------- #!/usr/NeWS/bin/psh %! % NeWS mouse land mines. % Written by Brent Bice (Bugs-R-Us) 3-29-90 % bice@atlantis.ees.anl.gov % - or - % atlantis.ees.anl.gov!hbo!bice % % No Rights Reserved % No copyright % Do with it what ya will % /FillColor 1 0 0 rgbcolor def /OutlineColor 0 0 0 rgbcolor def % This call shakes the portion of the screen enclosed by current path /shake { % NumOfShakes => - /tempcan currentcanvas newcanvas def tempcan reshapecanvas tempcan getcanvaslocation /tempcany exch def /tempcanx exch def tempcan /Mapped true put tempcan /Retained true put gsave tempcan setcanvas { % start of repeat. Pulls NumOfShakes off the stack tempcanx 5 add tempcany 5 sub movecanvas pause tempcanx tempcany movecanvas } repeat tempcan /Mapped false put grestore % Yeah, I know, this isn't a real nice way to clean up, but it's just % a BUG fer cryin' out loud! currentdict /tempcan undef currentdict /tempcany undef currentdict /tempcanx undef } def /shapecanvas { % canvas x y => - /y exch def /x exch def gsave %{ 17 30 moveto 49 36 lineto 0 72 lineto 45 54 lineto 58 94 lineto 59 60 lineto 74 69 lineto 67 55 lineto 102 52 lineto 102 51 lineto 68 33 lineto 66 0 lineto 59 22 lineto 17 31 lineto dup reshapecanvas setcanvas x y movecanvas grestore %} } def { framebuffer setcanvas clippath pathbbox /ch exch 60 sub def /cw exch 60 sub def pop pop gsave %{ /mycan framebuffer newcanvas def mycan rand 2 31 exp 1 sub div cw mul cvi rand 2 31 exp 1 sub div cw mul cvi shapecanvas mycan /Mapped true put mycan /EventsConsumed /MatchedEvents put createevent dup begin /Name /EnterEvent def /Action null def /Canvas mycan def end expressinterest awaitevent pop framebuffer setcanvas newpath % shake mined part of scrn. mycan getcanvaslocation 100 100 rectpath 20 shake % show explosion mycan setcanvas newpath FillColor fillcanvas OutlineColor strokecanvas % Cause mouse cursor to "stagger" around { /r {rand 100000 div cvi} def /stoptime currenttime .2 add def { currentcursorlocation r 10 mod r 10 mod 5 gt {add} {sub} ifelse exch r 10 mod r 10 mod 5 gt {add} {sub} ifelse exch setcursorlocation 20 {pause} repeat % give up lotsa time .001 sleep currenttime stoptime gt {exit} if } loop currentdict /r undef currentdict /stoptime undef } fork pop % Wait fer a bit, then throw away the canvas .1 sleep mycan /Mapped false put currentdict /mycan undef grestore %} } fork pop ----------------------------------------------------------------------------- Brent Bice Applied Computing Systems 2075 Trinity Drive Suite Lower Level Los Alamos, NM 87544 (505) 662-3309 bice@atlantis.ees.anl.gov From don Fri Mar 30 02:53:30 1990 Date: Fri, 30 Mar 90 02:53:30 -0500 To: NeWS-makers@brillig.umd.edu Subject: Installing GoodNeWS/HyperNeWS 1.3 From: mcsun!ukc!icdoc!citycs!ba124@uunet.uu.net (K.A.Streater) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) I have just been installing GoodNeWS 1.3 on a Sun386i and all has gone well. The only proble is the .user.ps file. When starting XNeWS I keep getting lots of errors during the statup of .user.ps but the HyperNeWS title page comes up properly still. After then all I get is just the standard NeWS interface. The path is set up properly, and when I try any of the files in $GNHOME/bin-sun386-xnews I get errors from the NeWS Server complaining about /New and other definitions. Since I am new to GoodNeWS/HyperNeWS could someone please help. Kevin. -- K.A.Streater, BITNET: ba124%uk.ac.city.cs@uk.ac JANET: ba124@uk.ac.city.cs UUCP: ba124@citycs.UUCP or ..!mcvax!ukc!citycs!ba124 ARPA: ba124@cs.city.ac.uk "There was a point to this story, but it has temporarily escaped the Chronicler's mind.", Hitch-Hiker's Guide Part IV. From don Fri Mar 30 02:54:12 1990 Date: Fri, 30 Mar 90 02:54:12 -0500 To: NeWS-makers@brillig.umd.edu Subject: Re: GNU Emacs under Good/Hyper NeWS From: mcsun!ukc!strath-cs!turing.ac.uk!news@uunet.uu.net (Russell Ritchie) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) In article <9171@cbnewsh.ATT.COM> you write: |> Does anyone have GNU Emacs (18.54 or later) working under Good/Hyper |>NeWS 1.3? I have a modified version that runs under NeWS1.1, but doesn't |>work very well with GoodNeWS 1.3, mostly because the mouse gets messed up. |> The problem may really be to get Emacs to work under the NeWS part of |>X11/NeWS, since GoodNeWS runs on top of that. It depends what you mean by "working under Good/HyperNeWS"; if you are talking about Chris Maio's NeWS-extended Emacs, then the answer is ``Yes, unless you're still using a beta X/NeWS, in which case it works but the window doesn't go away after Emacs exits and you're left with an unsightly white rectangle that won't go away'', if you mean the X-extended Emacs from the FSF, then the answer is ``Yes, but using the X11 side of the X/NeWS'', if you mean as a "normal" Emacs inside a Good/HyperNeWS terminal, then the answer is ``Yes, but the "Meta" keys (the ones on either side of the space bar) don't work because GoodNeWS grabs them for use as keyboard accelerators for some of the menu options. This is a known problem, and will be solved by making the accelerator shift key user-configurable eventually (possibly by allowing the user to choose between the "Alt" and "Meta" keys). Since you talk about the mouse getting "messed up" I assume you don't mean the third case... In what way does the mouse get "messed up"? Russell Ritchie. From don Fri Mar 30 19:03:21 1990 Date: Fri, 30 Mar 90 19:03:21 -0500 To: NeWS-makers@brillig.umd.edu Subject: GoodNeWS documentation question From: software.org!marshall@uunet.uu.net (Eric Marshall) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) How are the goodnews.hn and user-guide.hn files formatted? I want to produce a hard copy. Thanks in advance. Eric Marshall Software Productivity Consortium SPC Building 2214 Rock Hill Road Herndon, VA 22070 (703) 742-7153 UUCP: ...!uunet!software!marshall ARPANET: marshall%software.org@relay.cs.net From don Mon Apr 9 19:43:00 1990 Date: Mon, 9 Apr 90 19:43:00 -0400 To: NeWS-makers@brillig.umd.edu Subject: buildimage From: ecn!wim@relay.EU.net (Wim Rijnsburger) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Does anyone knows a way to read the image of a canvas and convert it to arguments, in the format of the 'buildimage' operator? Wim. ---------- Netherlands Energy Research Foundation, ECN -------------- Wim Rijnsburger email: RIJNSBURGER@ECN.NL P.O. Box 1, 1755 ZG Petten, Holland phone: +31 2246 4673 From don Mon Apr 9 19:43:22 1990 Date: Mon, 9 Apr 90 19:43:22 -0400 To: NeWS-makers@brillig.umd.edu Subject: XVPS: NeWS PostScript output via XView subclass From: hvr@Eng.Sun.COM (Heather Rose) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) [ I thought this may be of interest to more people, so I'm Cc:'ing xpert and NeWS-makers --hvr ] > RE: xvps.... Tom Jacobs told me that you guys were working on something > like this. But how come its output only? Would the NeWS input-event > mechanism interfere with the Notifier (or some other X event mechanism)? > We *like* the NeWS input paradigm. And, is the xvps extension only > available in X/NeWS or would it available under some X11R4 extension? > And, would xvps work under olwm as well as pswm? Xvps is an XView subclass (using OOP terms) or package (using XView terms) which establishes a connection to a NeWS socket of the X11/NeWS server for PostScript output in an X11 window. Because an X11 window and a NeWS canvas are equivalent objects within the xnews server, one can output PostScript drawing commands on the NeWS socket using the X11 window created via XView. (Note: an X11 window is not a NeWS canvas, the relationship is lower level than that.) The X11 input model will detect the normal events such as resize, repaint, user input, etc. Thus the XView notifier will dispatch these events as it would for any other XView package. The difference is what commands one uses in the paint procedures. If one wanted to, one could write an xvps package which connected to a DPS connection in other environments; however, we have not yet tried it so I could not give any details on it. Xvps is not an X11 extension, just an XView subclass to handle PostScript output for NeWS. It creates an XView PostScript canvas class by taking advantage of the high synergy between X11 and NeWS in the xnews server. This is one way to experiment with a potential DPS extension mechanism and interfaces without having to wait for a DPS extension to be adopted by the standards committees. The reason behind output only has more to do with the xnews server than anything else. The server does not support two input models on the same window. Thus, one can either use NeWS input or X11 input, but not both. Creating an X11 window (via XView) implies the X11 input model. Currently, NeWS canvases are not "visible" to X11 programs i.e. NeWS canvases do not have an X11 id number, so there is no way to create a NeWS canvas which an X11 program could use. Since an X11 program cannot detect the NeWS canvas, it would be difficult for that program to use the canvas to get input on it. The XView notifier (in the next release) supports input for X11 extensions, and in the current release input on any file descriptor, so the limitation is in the server not in the toolkit. The other reason we don't want XView supporting NeWS input is that the X Consortium will eventually standardize on a PostScript server extension. And we don't know if it will include input. We will need to support what becomes the standard, and we don't want to be taking features (such as NeWS input) away from the users. In addition, the X11 community is working very hard on establishing ways to do more interesing input (Input Extension, etc). These extensions will be "good enough", and more important, portable across different X11 servers once each server implements the extension. If you use some facility that only NeWS provides (such as the input model), then you're limiting your application to an xnews server only. If NeWS is the only mechanism to provide what you need, then you should look into using a NeWS toolkit. Regards, Heather From don Mon Apr 9 19:43:40 1990 Date: Mon, 9 Apr 90 19:43:40 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: GoodNeWS documentation question From: eru!luth!sunic!mcsun!ukc!strath-cs!turing.ac.uk!news@bloom-beacon.mit.edu (Jim Rudolf) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) In article <865@software.software.org> marshall@software.org (Eric Marshall) writes: > > How are the goodnews.hn and user-guide.hn files formatted? >I want to produce a hard copy. The GoodNeWS and HyperNeWS manuals are generated using an in-house tool that will create hardcopy and hypertext versions from the same file. We are currently offering hardcopies of the documentation to those that wish to license HyperNeWS. -- Jim -- -- Jim Rudolf The Turing Institute rudolf@turing.ac.uk From don Mon Apr 9 19:59:22 1990 Date: Mon, 9 Apr 90 19:59:22 -0400 To: NeWS-makers@brillig.umd.edu Subject: NeWS ports From: hbo!bice (Brent A. Bice) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) I've heard a dirty rumor that NeWS has been ported to the Amiga and/or the Atari. Is this true? I've been workin' ta find a machine that isn't as expensive as a SPARC that I could run NeWS on at home. I'd even be happy with a NeWS 1.1 port if it existed.... Any ideas? Thanks in advance. Brent Bice Applied Computing Systems 2075 Trinity Drive Suite Lower Level Los Alamos, NM 87544 (505) 662-3309 bice@atlantis.ees.anl.gov From don Mon Apr 9 19:59:34 1990 Date: Mon, 9 Apr 90 19:59:34 -0400 To: NeWS-makers@brillig.umd.edu Subject: Geographical Maps in PostScript From: swrinde!cs.utexas.edu!sun-barr!newstop!texsun!letni!mic!egsner!ntpal!herrage@ucsd.edu (Robert Herrage) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Does anyone know of any public geographical maps in PostScript of the US, North America, the world, etc.? If any do exist, please let me know how I can obtain them. Thanks, Robert Herrage BNR, Inc. From don Mon Apr 9 19:59:46 1990 Date: Mon, 9 Apr 90 19:59:46 -0400 To: NeWS-makers@brillig.umd.edu Subject: How to change timeout value? From: mcsun!ukc!strath-cs!turing.ac.uk!news@uunet.uu.net (Jim Rudolf) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) I think this was covered about a year ago, but at the time I didn't think it was important...it figures... If I want a NeWS process to hog the CPU for a while, I get a timeout error. How do you increase the amount of time before this error occurs? Regards, -- Jim -- Jim Rudolf The Turing Institute rudolf@turing.ac.uk From don Mon Apr 9 20:16:48 1990 Date: Mon, 9 Apr 90 20:16:48 -0400 To: NeWS-makers@brillig.umd.edu Subject: Postscript to Rasterfile converter wanted From: mcsun!ukc!icdoc!citycs!ba124@uunet.uu.net (K.A.Streater) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) I have an urgent need for a program to convert EPS files produced by various drawing programs running under X/NeWS into Sun's rasterfile(5) format. Can anyone help, send source, point me to ftp host with program etc...? Kevin. -- K.A.Streater, BITNET: ba124%uk.ac.city.cs@uk.ac JANET: ba124@uk.ac.city.cs UUCP: ba124@citycs.UUCP or ..!mcvax!ukc!citycs!ba124 ARPA: ba124@cs.city.ac.uk "There was a point to this story, but it has temporarily escaped the Chronicler's mind.", Hitch-Hiker's Guide Part IV. From don Mon Apr 9 20:16:57 1990 Date: Mon, 9 Apr 90 20:16:57 -0400 To: NeWS-makers@brillig.umd.edu Subject: Problems adding keyboard interests in NeWS 2.0 From: zaphod.mps.ohio-state.edu!mips!prls!philabs!ppgbms!pablo@tut.cis.ohio-state.edu (Pablo Gonzalez) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) The Extended Input System (EIS) facilities under NeWS 2.0 does not express interests for any of the L1-L10 keys, Help key, Ins key, Meta key, and quite possibly others. Does anybody know what it is that I need to do inorder to have our classes/application receive events from those keys in NeWS 2.0? Under NeWS 1.1, our application is receiving events generated by these keys using NeWS 1.1 EIS. Thanks, ============================================================================ Pablo Gonzalez | One Campus Drive | path ppgbms!moe!pablo@philabs.philips.com Pleasantville, N.Y. 10570 | (914) 741-4626 | ============================================================================ From don Mon Apr 9 20:17:07 1990 Date: Mon, 9 Apr 90 20:17:07 -0400 To: NeWS-makers@brillig.umd.edu Subject: Port from NeWS1.1 to NeWS2.0 problems From: zaphod.mps.ohio-state.edu!mips!prls!philabs!ppgbms!pablo@tut.cis.ohio-state.edu (Pablo Gonzalez) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) The NeWS 1.1 compatability procedures that come with NeWS 2.0 are not 100% compatible! In particular, the forkeventmgr procedure and CurrentEvent procedure. The forkeventmgr procedure in NeWS 1.1 took the responsibilty of removing the event being processed from the stack after the event_procedure has been processed (actually any objects that were left on the stack since the event was processed). NeWS 2.0 forkeventmgr procedure does not do any popping of objects from the stack. The CurrentEvent procedure in NeWS 1.1 retreived the event object currently being processed from an EventMgr dictionary that forkeventmgr took the responsibility of maintaining. The NeWS 2.0 CurrentEvent procedure simply scans the Operand Stack last in first and returns a copy of the first event type object that it finds on the stack. We would like to start using the new classes supplied by NeWS 2.0(Event Manager Class, Interest Class, Keyboard Class, ...) but unfortunately we have no documentation on how to interface to these classes. I have read through the source code for the classes, and find it difficult to understand which methods to call for what. It would have been nice of they would have included a more descriptive header section in their source code that describes the methods and variables the application programmer can interface to. (The amount of commenting in their class code has greatly improved from their Lite Toolkit code). Does anybody have some demo code/documents that clearly describes using these classes? Any comments are welcome. ============================================================================ Pablo Gonzalez | One Campus Drive | path ppgbms!moe!pablo@philabs.philips.com Pleasantville, N.Y. 10570 | (914) 741-4626 | ============================================================================ From don Mon Apr 9 21:52:22 1990 Date: Mon, 9 Apr 90 21:52:22 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: Postscript to rasterfile converter From: mcsun!ukc!icdoc!citycs!ba124@uunet.uu.net (K.A.Streater) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Maybe I wasn't particularly clear when I posted my original request as the only answers I had suggested using snapshot and pageview. However, I am after something which is command line driven, and in effect does a postscript printer dump to a rasterfile rather than a printer. I already know about and are using pageview and snapshot, however both are interactive. I need something that is totally non-interactive, i.e command line driven as most of the raster to ... type convertors are. The big drawback of snapshot in particular is that it does the whole screen I have what ammounts to the equivalent sort of data as a page of data for a postscript printer, which I need to turn into a rasterfile rather than a printed page. Is there any hope ? Kevin. -- K.A.Streater, BITNET: ba124%uk.ac.city.cs@uk.ac JANET: ba124@uk.ac.city.cs UUCP: ba124@citycs.UUCP or ..!mcvax!ukc!citycs!ba124 ARPA: ba124@cs.city.ac.uk "There was a point to this story, but it has temporarily escaped the Chronicler's mind.", Hitch-Hiker's Guide Part IV. From don Mon Apr 9 21:52:30 1990 Date: Mon, 9 Apr 90 21:52:30 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: How to change timeout value? From: naughton%sun.com@sun.com (Patrick Naughton) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) >> If I want a NeWS process to hog the CPU for a while, I get a timeout >> error. How do you increase the amount of time before this error occurs? % psh executive Welcome to X11/NeWS Version 2 (Beta) (wind:0) statusdict begin jobtimeout == 15 60 setjobtimeout jobtimeout == 60 quit psh: NeWS server disconnected % ______________________________________________________________________ Patrick J. Naughton ARPA: naughton@sun.com Window Systems Group UUCP: ...!sun!naughton Sun Microsystems, Inc. AT&T: (415) 336 - 1080 From don Mon Apr 9 21:52:52 1990 Date: Mon, 9 Apr 90 21:52:52 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: Postscript to Rasterfile converter wanted From: wind!naughton@sun.com (Patrick Naughton) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) In article <1990Apr4.181921.16507@cs.city.ac.uk>, ba124@cs.city.ac.uk (K.A.Streater) writes: > I have an urgent need for a program to convert EPS files produced by > various drawing programs running under X/NeWS into Sun's rasterfile(5) > format. Here is a shell script which should do what you want... It will change somewhat when Version 2 ships, but this will work with 1.0 and 1.0.1. It writes one rasterfile per page, named "pspage.[1-n]" and it defaults to a 300 dpi 8.5x11 inch page. Have fun... -Patrick #! /bin/sh # @(#)ps2bits 1.2 89/12/12 # ps2bits - PostScript to Rasterfile converter. # USAGE="Usage: `basename ${0}` [-in s] [-out s] [-dpi x y] [-size w h] [-color]" OUT="pspage" IN="%stdin" DPIX=300 DPIY=300 XSIZE=8.5 YSIZE=11 DEPTH=1 export OPENWINHOME XNEWSHOME LD_LIBRARY_PATH OPENWINHOME="${OPENWINHOME-/usr/local/openwin}" XNEWSHOME=${OPENWINHOME} LD_LIBRARY_PATH=${OPENWINHOME}/lib:/lib if [ ! -f $OPENWINHOME/etc/NeWS/redbook.ps ]; then echo "`basename $0`: xnews is not installed correctly in $OPENWINHOME" 1>&2 echo " (set \$OPENWINHOME to where it is installed...)" 1>&2 exit 1 fi while [ ${#} -gt 0 ]; do case "${1}" in -color) shift; DEPTH=8 ;; -out) shift; OUT=${1} shift ;; -in) shift; IN=${1} shift ;; -size) shift; XSIZE=${1} shift; YSIZE=${1} shift ;; -dpi) shift; DPIX=${1} shift; DPIY=${1} shift ;; *) echo ${USAGE}; exit 0 ;; esac done $OPENWINHOME/bin/xnews " /currentpacking false def /setpacking { pop } def (NeWS/basics.ps) (r) file cvx exec (NeWS/redbook.ps) (r) file cvx exec 500 dict begin % start userdict false setautobind /bind {} def /showpage { copypage erasepage initgraphics } def /_pageno 0 def /copypage { /_pageno _pageno 1 add store (${OUT}.) _pageno 100 lt { (0) append } if _pageno 10 lt { (0) append } if _pageno 3 string cvs append clippath writecanvas } def ${DPIX} ${XSIZE} mul ${DPIY} ${YSIZE} mul ${DEPTH} [ ${DPIX} 72 div 0 0 ${DPIY} 72 div neg 0 7 index ] null buildimage setcanvas erasepage initgraphics % hack for bug in folio initialization code. /Courier findfont 10 scalefont setfont () stringwidth pop pop (${IN}) (r) file cvx exec shutdownserver " ______________________________________________________________________ Patrick J. Naughton ARPA: naughton@sun.com Window Systems Group UUCP: ...!sun!naughton Sun Microsystems, Inc. AT&T: (415) 336 - 1080 From don Mon Apr 9 21:53:08 1990 Date: Mon, 9 Apr 90 21:53:08 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: Postscript to rasterfile converter wanted From: mcsun!ukc!icdoc!citycs!ba124@uunet.uu.net (K.A.Streater) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) When repling to some news about NeWS under Open Windows I got the answer: > Here is a shell script which should do what you want... It will change > somewhat when Version 2 ships, but this will work with 1.0 and 1.0.1. What is this version 2 of XNeWS ? I am in regular contact with Sun(UK) since I am developing a large package due for release in 1992. It is entirely NeWS based, and I have not been warned of any major changes that are likely to come. Is Sun keeping us software developers in the dark again ???? -- K.A.Streater, BITNET: ba124%uk.ac.city.cs@uk.ac JANET: ba124@uk.ac.city.cs UUCP: ba124@citycs.UUCP or ..!mcvax!ukc!citycs!ba124 ARPA: ba124@cs.city.ac.uk "There was a point to this story, but it has temporarily escaped the Chronicler's mind.", Hitch-Hiker's Guide Part IV. From don Mon Apr 9 21:53:24 1990 Date: Mon, 9 Apr 90 21:53:24 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: Postscript to rasterfile converter wanted From: hercules!sparkyfs!zwicky@apple.com (Elizabeth Zwicky) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) In article <1990Apr7.114619.3106@cs.city.ac.uk> ba124@cs.city.ac.uk (K.A.Streater) writes: >What is this version 2 of XNeWS ? Version 2 is a new name for version 1.1; apparently Sun got tired of people confusing 1.1 and 1.0.1, and decided to solve the confusion by renaming 1.1. (The confusion was bad, especially because people confused the minor speedups in 1.0.1 with the promised major speedups in 1.1 (now 2), and complained that they were so small. Of course, it is now even worse, since people now tend to believe that 1.1 and 2 are different releases...) Elizabeth From don Wed Apr 11 12:15:52 1990 Date: Wed, 11 Apr 90 12:15:52 -0400 To: NeWS-makers@brillig.umd.edu Subject: what the hell happened to writecanvas in NeWS 2.0!!! From: philmtl!philabs!ppgbms!pablo@uunet.uu.net (Pablo Gonzalez) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Does anybody know if the raster file generated by the writecanvas primitive running under NeWS 2.0 is any different from NeWS 1.1.? If so, what is the difference. The reason I ask is that we have noticed a difference in the file sizes between rester files generated under NeWS 1.1 and the same image generated under NeWS 2.0. It appears that NeWS 2.0 is compressing it's data. Here's an example. Run the following code in an interactive psh under both NeWS's and compare for your self. /xx 300 300 1 [300 0 0 300 0 0] {<00>} buildimage def xx setcanvas (filename) writecanvas Thanks, Pablo P.S. Has any body successfully converted their NeWS 1.1 applications to NeWS 2.0? ============================================================================ Pablo Gonzalez | One Campus Drive | path ppgbms!moe!pablo@philabs.philips.com Pleasantville, N.Y. 10570 | (914) 741-4626 | ============================================================================ From don Wed Apr 11 17:04:18 1990 Date: Wed, 11 Apr 90 17:04:18 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: what the hell happened to writecanvas in NeWS 2.0!!! From: Rafael Bracho Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Pablo, NeWS 2.0 uses the run-length byte encoded format. Just run 'file' on the 1.1 and 2.0 rasterfiles and you'll see the difference. If you use the pixrect routines to read the file, this change is transparent to you. As for converting from NeWS 1.1 to NeWS 2.0, here's a message I posted a few months ago (about six). (Incidentally, I'm converting it again to NeWS 2.1 -- OpenWindows 2.0 -- as we speak and, yes, there are more differences. I'll post.) -Rafael >From NeWS-makers-request@cs.UMD.EDU Thu Oct 19 00:05:24 1989 >Date: Thu, 19 Oct 89 00:31:04 -0400 >To: NeWS-makers@brillig.umd.edu >Subject: Re: NeWS => X11/NeWS >From: Rafael Bracho >Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) > >I just finished porting a fairly complex NeWS application (close to 75K >lines of PostScript) to the merged server, taking me about two weeks of >work. These are a few of the issues I found: > >1. Input has changed somewhat; in particular, the function keys no >longer work with the litewindow toolkit -- we implement a window system >that is a descendant of litewindows. > >2. The focus (re: the Extended Input System chapter of NeWS 1.1) is no longer >and array of canvas and process but rather just a canvas. Some of our >code broke because of that. > >3. The merged server has the concept of "packed arrays". The command >setpacking may be used so the server packs all executable arrays. >Unfortunately, the buildimage operator doesn't work with packed arrays. > >4. X11/NeWS follows the red book a lot more closely so there were a >number of bugs we uncover in our code. For example, erasepage now >blanks out the whole canvas, irrespectively of any clipping path that >may be in effect. > >5. A host of bugs were related to the fact that canvases are, >internally, kept in the X11 coordinate system (upper-left corner is the >origin) and not in the PostScript one (the origin being the lower-left >one). Normally this shouldn't affect anyone since the defaultmatrix is >set properly everytime the canvas is reshaped -- previously it was >always the identity matrix. In NeWS 1.0, however, the default matrix >contained very small translation factors that would become significant >with large scaling. We got in the habit of doing "matrix setmatrix" >instead of "initmatrix" and in NeWS 1.1, these two were identical. This >is obviously no longer the case. > >6. Imagecanvas is much more consistent to the PostScript image >operator. Under NeWS 1.1, to "imagecanvas" a regular canvas -- i.e., >obtained via newcanvas -- the receiving canvas had to be scaled by the >size of the source canvas; even though the source canvas' coordinate >system was not the unit square. Doing this in X11/NeWS results in >double scaling so you'll probably won't get anything on the screen -- >the server refuses to "imagecanvas" anything that results in more than >32767 pixels in either dimension. Either make the source canvas be >mapped to the unit square, or the receiving canvas have pixel units. > >7. Readcanvas returns a canvas with its default coordinate system being >the unit square (more consistent with buildimage, and better for >imagecanvas, see above). Thus to "imagecanvas" it, one must scale the >receiving canvas by the size of the rasterfile read -- this was also >true in NeWS 1.1. Previously, however, one could "setcanvas" to the >result of readcanvas knowing that the default matrix was in pixels (like >a canvas obtained via newcanvas). > >In general the X11/NeWS server is much nicer than NeWS 1.1. There are a >few rough edges, particularly with the CG6 (GX or LEGO) board, and I >don't think performance is quite up to par with NeWS 1.1. In our case, >we had some bound-checking code in our inner loops to avoid crashing the >1.1 server that is no longer needed so we don't really see *drawing* >performance degradation. Interactions, particularly dragging, seem a >bit slower, though. > > Rafael Bracho > Schlumberger > Austin Systems Center > rxb@asc.slb.com > From don Wed Apr 11 17:05:17 1990 Date: Wed, 11 Apr 90 17:05:17 -0400 To: NeWS-makers@brillig.umd.edu Subject: getting args into NeWS apps From: Mark Smith Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Possibly Stupid Question #1: What's the easiest way to get command line arguments to a NeWS application written entirely in PostScript? Given that the first line of the application file is "#! /usr/openwin/bin/psh", I'd like to be able to invoke it as application arg1 arg2 ... Since the man entry for psh says all args to it are files sent to the server, I can't see an obvious way to make this work. Am I missing something obvious? Probably Not So Stupid Question #2: Has anyone seen any documentation for the protocol for supporting the drag&drop stuff from the File Manager to application windows? Again, I'd like to support this in a PostScript-only application. The only (maybe) reference I can find is the ACTION_DRAG_LOAD event in back of the XView manual. Is there a corresponding event in the NeWS input model? I have RTFM(s), honest. +-----------------------------------+------------------------------+ | Mark Smith | tel: +44 483 574 325 | | Canon Research Centre Europe Ltd. | fax: +44 483 574 360 | | 19 Frederick Sanger Road +------------------------------+ | Surrey Research Park | inet: smith@canon.co.uk | | Guildford Surrey UK GU2 5YD | uucp: ukc!uos-ee!canon!smith | +-----------------------------------+------------------------------+ From don Wed Apr 11 17:05:50 1990 Date: Wed, 11 Apr 90 17:05:50 -0400 To: NeWS-makers@brillig.umd.edu Subject: Using the FileManager with NeWS From: mcsun!ukc!cam-eng!!tpm@uunet.uu.net (tim marsland) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Hi. We're trying to use icons from the FileManager with a NeWS client (4.0.3c, OpenWindows 1.0fcs). Specifically we're trying to get the pathname of file when the cursor-icon that represents it is dropped onto a NeWS canvas. So far, despite valiant efforts, we've managed to detect a GrabEnterNotify sent to the canvas, but its /Action field is simply an integer. Presumably we have to register an interest with the FileManager to tell it that we`re prepared to handle the drop, but we can find no mention of how to do this (or anything else to do with using the FileManager in this way!) in the documentation. Has anyone managed to make a NeWS client interact properly with the FileManager? Please mail me, and I'll post a summary. tim marsland P.S. Anyone seen a [good] class browser for XNeWS? .. it's really very tiring when trying to understand the behaviour of a class hierarchy. From don Wed Apr 11 17:06:13 1990 Date: Wed, 11 Apr 90 17:06:13 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: what the hell happened to writecanvas in NeWS 2.0!!! From: naughton%wind.eng.sun.com@sun.com (Patrick Naughton) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) In article <29898@ppgbms.UUCP>, pablo@ppgbms (Pablo Gonzalez) writes: > Does anybody know if the raster file generated by the writecanvas primitive > running under NeWS 2.0 is any different from NeWS 1.1.? If so, what is the > difference. > > The reason I ask is that we have noticed a difference in the file sizes > between rester files generated under NeWS 1.1 and the same image generated > under NeWS 2.0. It appears that NeWS 2.0 is compressing it's data. > > Thanks, > Pablo Both NeWS 1.1 and NeWS 2.0 (OpenWindows) write compressed images, actually run-length byte encoded images. The size difference you are seeing is due to the inclusion of the colormap in the NeWS 1.1 image even though it is one bit deep. NeWS 2.0 leaves the colormap out of 1 bit deep images thus all mono images 2.0 writes will be 768 bytes smaller than the 1.1 equivalents. > P.S. Has any body successfully converted their NeWS 1.1 applications to > NeWS 2.0? yes... Many of the demos shipped with OpenWindows were converted directly from their NeWS 1.1 predecessors. ______________________________________________________________________ Patrick J. Naughton ARPA: naughton@sun.com Window Systems Group UUCP: ...!sun!naughton Sun Microsystems, Inc. AT&T: (415) 336 - 1080 From don Thu Apr 12 00:00:09 1990 Date: Thu, 12 Apr 90 00:00:09 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: getting args into NeWS apps From: naughton%wind.eng.sun.com@sun.com (Patrick Naughton) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) In article <9004111746.AA02461@hagen.canon>, smith@canon.UUCP (Mark Smith) writes: > Possibly Stupid Question #1: > > What's the easiest way to get command line arguments to a NeWS application > written entirely in PostScript? Given that the first line of the application > file is "#! /usr/openwin/bin/psh", I'd like to be able to invoke it as > > application arg1 arg2 ... > > Since the man entry for psh says all args to it are files sent to the server, > I can't see an obvious way to make this work. Am I missing something obvious? > The trick is to not use the #!/usr/openwin/bin/psh hack, but rather to use the Bourne shell. psh(1) does not do commandline substitution. Here is a small program using TNT 1.0 which takes a Sun rasterfile(5) on the command line and displays it in a window. #!/bin/sh # @(#)bitwin 1.1 90/04/11 if [ $# -ne 1 ]; then echo "usage: `basename $0` rasterfile" 1>&2 exit 1; fi pwd=`pwd` abspath () { case $1 in /*) echo $1 ;; *) echo $pwd/$1 ;; esac } checkfile () { if [ ! -f $1 ] ; then if [ ! -f $1.Z ] ; then echo "`basename $0`: can't open $1" 1>&2 exit 1 fi fi } checkfile $1 file=`abspath $1` base=`basename $1` psh << -eof- /win [ClassCanvas] [] framebuffer /newdefault ClassBaseFrame send def /can ($file) readcanvas def /ican 64 64 8 [] null buildimage def ican setcanvas can imagecanvas { gsave clippath pathbbox scale pop pop can imagecanvas grestore } /setpaintproc /client win send send { gsave 64 64 scale ican imagecanvas grestore } /seticon win send null /seticonlabel win send ($base) /setlabel win send /preferredsize [ can setcanvas matrix currentmatrix dup 0 get exch 5 get framebuffer setcanvas ] cvx /installmethod /client win send send /place win send /activate win send /map win send /flipiconic win send newprocessgroup currentfile closefile -eof- > Probably Not So Stupid Question #2: > > Has anyone seen any documentation for the protocol for supporting the drag&drop > stuff from the File Manager to application windows? Again, I'd like to support > this in a PostScript-only application. The only (maybe) reference I can find is the > ACTION_DRAG_LOAD event in back of the XView manual. Is there a corresponding event > in the NeWS input model? I have RTFM(s), honest. > > | Mark Smith | tel: +44 483 574 325 | Drag and Drop from the XView filemgr to a NeWS window is not supported in any released version of OpenWindows. It is being seriously looked at for the next release. ______________________________________________________________________ Patrick J. Naughton ARPA: naughton@sun.com Window Systems Group UUCP: ...!sun!naughton Sun Microsystems, Inc. AT&T: (415) 336 - 1080 From don Thu Apr 12 00:01:15 1990 Date: Thu, 12 Apr 90 00:01:15 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: Using the FileManager with NeWS From: bvs@Sun.COM (Bruce V. Schwartz - Marketing Technical Support) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Date: Wed, 11 Apr 90 17:05:50 -0400 Subject: Using the FileManager with NeWS From: mcsun!ukc!cam-eng!!tpm@uunet.uu.net (tim marsland) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) P.S. Anyone seen a [good] class browser for XNeWS? .. it's really very tiring when trying to understand the behaviour of a class hierarchy. Here's a class browser for XNeWS. You can decide if it's any good. -Bruce Schwartz Sun Microsystems #!/bin/sh # # This file is a product of Sun Microsystems, Inc. and is provided for # unrestricted use provided that this legend is included on all tape # media and as a part of the software program in whole or part. Users # may copy or modify this file without charge, but are not authorized to # license or distribute it to anyone else except as part of a product # or program developed by the user. # # THIS FILE IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE # WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR # PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. # # This file is provided with no support and without any obligation on the # part of Sun Microsystems, Inc. to assist in its use, correction, # modification or enhancement. # # SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE # INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY THIS FILE # OR ANY PART THEREOF. # # In no event will Sun Microsystems, Inc. be liable for any lost revenue # or profits or other special, indirect and consequential damages, even # if Sun has been advised of the possibility of such damages. # # Sun Microsystems, Inc. # 2550 Garcia Avenue # Mountain View, California 94043 # # (c) 1988, 1989, 1990 Sun Microsystems # psh << EOF % % This file contains a NeWS server class browser. % % The browser is built on the classes defined in pw.ps. The class % browser has 5 panes. It is similar in appearance to the Smalltalk % browser. The first pane on the top of the window contains the list of % classes in the server. The next 3 contain the list of methods, class % variables, and instance variables associated with the selected class in % the first pane. The bottom pane is used to display information about % the current selection. % % This code was mostly written in August 1987 but was revised to work with % NeWS 1.1 in May 1988. % % Many changes in November 1988. Integrated several of Richard Hess's % improvements. New features include improved scrolling, caching of browsed % classes, addition of the NoClass class for browsing the systemdict, better % decompilation of dictionaries, and process control (new request cancels % previous, better error handling, and looks better on B/W screen. % % Bruce V. Schwartz % Sun Microsystems % bvs@sun.com % % Reworked June 1989 to work with OpenWindows 1.0beta2 % Reworked March 1990 to work with OpenWindows 2.0beta % This file contains the classes used by the class browser. % The classes included are: % Picture -- an Item similar in concept to the NeWS1.1 textcanvas % PicWindow -- a LiteWindow that holds Pictures % PicScroll -- a SimpleScrollbar with a few modifications (auto scrolling) % % This code was mostly written in August 1987 but was revised to work with % NeWS 1.1 in May 1988. % % Bruce V. Schwartz % Sun Microsystems % bvs@sun.com % systemdict begin systemdict /Item known not { (NeWS/liteitem.ps) run } if systemdict /SimpleScrollbar known not { (NeWS/liteitem.ps) run } if end %% This file contains classes: PicWindow Picture PicScroll /PicWindow LiteWindow dictbegin /PicArray [] def dictend classbegin /BorderRight 1 def /BorderLeft 1 def /BorderBottom 1 def /PaintIcon { 1 fillcanvas 0 strokecanvas .8 setgray IconWidth 2 div 1 sub IconHeight 4 div 5 sub 5 Sunlogo 0 setgray IconWidth 2 div 3 moveto (Browse!) cshow } def /PaintClient { %% (paint client %\n) [ PicArray ] dbgprintf %% PicArray { ( %\n) [ 3 2 roll ] dbgprintf } forall PicArray paintitems } def /setpicarray { /PicArray exch def } def /destroy { %% (destroying arrays\n) [] dbgprintf PicArray { /destroy exch send } forall %% (destroying window\n) [] dbgprintf /destroy super send %% (destroyed window\n) [] dbgprintf } def % OPEN LOOK-ize: use select button to move window /CreateFrameInterests { % - => - (Create frame control interests) /CreateFrameInterests super send FrameInterests begin /FrameMoveEvent PointButton {/slide self send pause /totop self send pop} /DownTransition FrameCanvas eventmgrinterest def FrameMoveEvent /Exclusivity true put /FrameAdjustEvent AdjustButton {pop} null FrameCanvas eventmgrinterest def FrameAdjustEvent /Exclusivity true put end } def /CreateIconInterests { % - => - (Create icon control interests) /CreateIconInterests super send FrameInterests begin /IconOpenEvent null def /IconMoveEvent PointButton {/slide self send pause /totop self send pop} /DownTransition IconCanvas eventmgrinterest def IconMoveEvent /Exclusivity true put /IconAdjustEvent AdjustButton {pop} null IconCanvas eventmgrinterest def IconAdjustEvent /Exclusivity true put end } def /flipiconic { % - => - (swaps between open & closed) /unmap self send /Iconic? Iconic? not def IconX null eq { FrameX FrameY FrameHeight add IconHeight sub /move self send } if ZoomProc /totop self send /map self send } def classend def /PicScrollbar SimpleScrollbar dictbegin /Owner null def /LastX null def /LastY null def dictend classbegin /ItemShadeColor .5 def /setowner { /Owner exch def } def /ClientDown { /ClientDown super send } def /ClientUp { % - => - /ClientUp super send ItemValue ItemInitialValue ne { /Notify Owner send } if } def /PaintBar { } def /EraseBox { } def /PaintButtons { BarViewPercent 1 gt true or { /PaintButtons super send } if } def /PaintBox { % - => - (paint box) %(PaintBox %\n) [ BarViewPercent ] dbgprintf %(pause...) [] dbgprintf 1 60 div sleep (!!\n) [] dbgprintf gsave 10 dict begin /x 1 def /w ItemWidth 1 sub def BarViewPercent 1 le { 1 setgray x ButtonSize w ItemHeight ButtonSize dup add sub rectpath fill } { 1 1 BarViewPercent div sub 1 ItemValue sub mul ItemHeight ButtonSize dup add sub mul ButtonSize add /y exch def 1 BarViewPercent div ItemHeight ButtonSize dup add sub mul /h exch def % % do the normal bar % ItemFillColor setcolor x ButtonSize w y ButtonSize sub rectpath fill x y h add w ItemHeight ButtonSize sub y sub h sub rectpath fill % % do the big scroll box % /ybut ItemValue ValueToY def ItemShadeColor setgray x y w ybut y sub rectpath fill x ybut ButtonSize add w h ButtonSize sub ybut sub y add rectpath fill % % do the little scroll box % ItemValue BoxPath BoxFillColor setcolor gsave fill grestore } ifelse end /ItemPaintedValue ItemValue def grestore /Notify Owner send } def /HiliteItem { ScrollMotion { /ScrollAbsolute { } /ScrollPageForward { } /ScrollPageBackward { } /ScrollLineForward % top { 0 ItemHeight ButtonSize ButtonSize neg rectpath 5 setrasteropcode fill } /ScrollLineBackward % bottom { 0 0 ButtonSize ButtonSize rectpath 5 setrasteropcode fill } } case } def /UnhiliteItem { gsave ScrollMotion { /ScrollAbsolute {} /ScrollPageForward {} /ScrollPageBackward {} /ScrollLineForward % top { 0 ItemHeight ButtonSize sub ButtonSize ButtonSize rectpath clip PaintButtons } /ScrollLineBackward % bottom { 0 0 ButtonSize ButtonSize rectpath clip PaintButtons } } case grestore } def classend def /Picture Item dictbegin /BufferCanvas null def /BufferWidth 0 def /BufferHeight 0 def /HScrollbar null def /VScrollbar null def /HScrollbar? true def /VScrollbar? true def /HScrollWidth 0 def /VScrollWidth 0 def /ScrollWidth 16 def /NotifyUserDown { pop pop } def % x y => - /NotifyUserUp { pop pop } def % x y => - /NotifyUserDrag { pop pop } def % x y => - /NotifyUserEnter { pop pop } def % x y => - /NotifyUserExit { pop pop } def % x y => - dictend classbegin /new { % parentcanvas width height => instance % (new begin\n) [] dbgprintf /new super send begin /BufferHeight ItemHeight def /BufferWidth ItemWidth def CreateScrollbars CreateBuffer currentdict end % (new end\n) [] dbgprintf } def /destroy { HScrollbar null ne { null /setowner HScrollbar send } if VScrollbar null ne { null /setowner VScrollbar send } if %% BufferCanvas /Mapped false put %% /BufferCanvas null def } def /reshape { % x y w h => - /reshape super send ReshapeScrollbars } def /reshapebuffer { % w h => - /BufferHeight exch ItemHeight HScrollbar? { HScrollWidth sub } if max def /BufferWidth exch ItemWidth VScrollbar? { VScrollWidth sub } if max def ReshapeBuffer %ReshapeScrollbars AdjustScrollbars } def /getcanvas { BufferCanvas } def /updatecanvas { PaintBuffer } def /makestartinterests { /makestartinterests HScrollbar send /makestartinterests VScrollbar send [ exch aload length 2 add -1 roll aload pop ] % join 2 arrays /makestartinterests super send [ exch aload length 2 add -1 roll aload pop ] % join 2 arrays } def /PaintItem { %% (PaintItem begin\n) [] dbgprintf PaintBuffer /paint VScrollbar send /paint HScrollbar send %% (PaintItem end\n) [] dbgprintf } def /Notify { % (picture got notified\n) [] dbgprintf NotifyUser PaintBuffer } def /PaintBuffer { % (PaintBuffer begin \n) [ ] dbgprintf gsave ItemCanvas setcanvas % % Stroke canvas % 0 setgray 0 HScrollWidth ItemWidth VScrollWidth sub ItemHeight HScrollWidth sub rectpath stroke % % compute clipping region % 1 HScrollWidth 1 add ItemWidth VScrollWidth sub 2 sub ItemHeight HScrollWidth sub 2 sub rectpath % (clip to % % % %\n) [ pathbbox ] dbgprintf clip % % compute translation % BufferWidth ItemWidth sub VScrollWidth add neg dup 0 lt { 1 /getvalue HScrollbar send sub mul } { pop 0 } ifelse BufferHeight ItemHeight sub HScrollWidth add neg dup 0 lt { 1 /getvalue VScrollbar send sub mul } { } ifelse HScrollWidth add % 2 copy (translate by % %\n) [ 4 2 roll ] dbgprintf translate % XNeWS fix % BufferWidth BufferHeight % 2 copy (scale by % %\n) [ 4 2 roll ] dbgprintf % scale % (currentmatrix % % % % % %\n) [ matrix currentmatrix aload pop ] dbgprintf pause BufferCanvas imagecanvas pause grestore % (PaintBuffer end\n) [ ] dbgprintf } def /CreateBuffer { % - => - /BufferCanvas framebuffer newcanvas def BufferCanvas /Retained true put BufferCanvas /Mapped false put ReshapeBuffer } def /ReshapeBuffer { % - => - gsave framebuffer setcanvas 0 0 BufferWidth BufferHeight rectpath BufferCanvas reshapecanvas grestore } def /CreateScrollbars { % - => - % (begin CreateScrollbars\n) [] dbgprintf /HScrollWidth HScrollbar? { ScrollWidth } { 0 } ifelse def /VScrollWidth VScrollbar? { ScrollWidth } { 0 } ifelse def ItemWidth VScrollWidth le { /VScrollWidth ScrollWidth 2 div def } if ItemHeight HScrollWidth le { /HScrollWidth ScrollWidth 2 div def } if /HScrollbar [1 0 .01 .1 BufferWidth ItemWidth VScrollWidth sub div ] 1 {} ItemCanvas /new PicScrollbar send dup /BarVertical? false put def /VScrollbar [1 0 .01 .1 BufferHeight ItemHeight HScrollWidth sub div ] 1 {} ItemCanvas /new PicScrollbar send def self /setowner HScrollbar send self /setowner VScrollbar send % (end CreateScrollbars\n) [] dbgprintf } def % Set the range for the scrollbars % /AdjustScrollbars { [1 0 .01 .1 BufferWidth ItemWidth VScrollWidth sub div ] /setrange HScrollbar send [1 0 .01 .1 BufferHeight ItemHeight HScrollWidth sub div ] /setrange VScrollbar send } def /ReshapeScrollbars { /HScrollWidth HScrollbar? { ScrollWidth } { 0 } ifelse def /VScrollWidth VScrollbar? { ScrollWidth } { 0 } ifelse def AdjustScrollbars 10 dict begin /h ItemHeight def /w ItemWidth def /s ScrollWidth def HScrollbar? { 0 0 w VScrollWidth sub s } { 0 0 0 0 } ifelse % 4 copy (hscroll % % % %\n) [ 6 2 roll ] dbgprintf /reshape HScrollbar send VScrollbar? { w s sub HScrollWidth s h HScrollWidth sub } { 0 0 0 0 } ifelse % 4 copy (vscroll % % % %\n) [ 6 2 roll ] dbgprintf /reshape VScrollbar send end } def /ClientDown { % (Picture ClientDown\n) [] dbgprintf % compute translation % BufferWidth ItemWidth sub VScrollWidth add neg dup 0 lt { 1 /getvalue HScrollbar send sub mul } { pop 0 } ifelse BufferHeight ItemHeight sub HScrollWidth add neg dup 0 lt { 1 /getvalue VScrollbar send sub mul } { } ifelse HScrollWidth add % translatex translatey CurrentEvent /YLocation get sub neg exch CurrentEvent /XLocation get sub neg exch % (n: %\n) [ NotifyUserDown ] dbgprintf { NotifyUserDown } fork } def /ClientUp { % (Picture ClientUp\n) [] dbgprintf CurrentEvent begin XLocation YLocation end NotifyUserUp } def /ClientDrag { % (client drag\n) [] dbgprintf CurrentEvent begin XLocation YLocation end NotifyUserDrag } def /ClientEnter { %% (client enter\n) [] dbgprintf CurrentEvent begin XLocation YLocation end NotifyUserEnter } def /ClientExit { %% (client exit\n) [] dbgprintf CurrentEvent begin XLocation YLocation end NotifyUserExit } def classend def %%%%%%%%%%%%%%%%Browser code%%%%%%%%%%%%%%% /Font15 /Times-Roman findfont 15 scalefont def /PickProcess null def /PicArray [ ] def /win framebuffer /new PicWindow send def { /FrameLabel (Class Browser for X11/NeWS) def } /doit win send /can win /ClientCanvas get def /LastClassPick null def /LastInstPick null def /LastMethodPick null def /LastVarPick null def /ClassKeys [] def /InstKeys [] def /MethodKeys [] def /VarKeys [] def /W 200 def /H 300 def /TextW 800 def /TextH 300 def 100 100 TextW TextH H add 16 add /reshape win send /ClassPic win /ClientCanvas get W H /new Picture send def % classes /MethodPic win /ClientCanvas get W H /new Picture send def % methods /VarPic win /ClientCanvas get W H /new Picture send def % class var /InstPic win /ClientCanvas get W H /new Picture send def % ints var /TextPic win /ClientCanvas get TextW TextH /new Picture send def % text /PicArray [ ClassPic InstPic MethodPic VarPic TextPic ] def PicArray /setpicarray win send ClassPic /HScrollbar? false put InstPic /HScrollbar? false put MethodPic /HScrollbar? false put VarPic /HScrollbar? false put TextPic /HScrollbar? false put 000 TextH W H /reshape ClassPic send 200 TextH W H /reshape MethodPic send 400 TextH W H /reshape VarPic send 600 TextH W H /reshape InstPic send 0 0 TextW TextH /reshape TextPic send 0 /setvalue ClassPic /VScrollbar get send pop % pop the null ret value 0 /setvalue InstPic /VScrollbar get send pop % pop the null ret value 0 /setvalue MethodPic /VScrollbar get send pop % pop the null ret value 0 /setvalue VarPic /VScrollbar get send pop % pop the null ret value 0 /setvalue TextPic /VScrollbar get send pop % pop the null ret value ColorDisplay? { /ClassColor 1 .8 .8 rgbcolor def /InstColor 1 .8 1 rgbcolor def /MethodColor .8 1 .8 rgbcolor def /VarColor .8 .8 1 rgbcolor def /TextColor 1 1 1 rgbcolor def } { /ClassColor 1 1 1 rgbcolor def /InstColor 1 1 1 rgbcolor def /MethodColor 1 1 1 rgbcolor def /VarColor 1 1 1 rgbcolor def /TextColor 1 1 1 rgbcolor def } ifelse ClassPic /NotifyUserDown { { ClassPick } HandlePick } put InstPic /NotifyUserDown { { InstPick } HandlePick } put MethodPic /NotifyUserDown { { MethodPick } HandlePick } put VarPic /NotifyUserDown { { VarPick } HandlePick } put %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % Utilities for expanding NeWS object types /String256 256 string def /Expand % thing -> - { ExpandDict begin 10 dict begin /ArrayDepth 0 def /TabWidth ( ) stringwidth pop def () exch dup type exec end end } def /StartArray % string array -> string (string) array { /tmparray exch def StartLine ([) AddString /tmparray load /ArrayDepth ArrayDepth 1 add def } def /EndArray % string -> string (string) { /ArrayDepth ArrayDepth 1 sub def (] ) append StartLine } def /StartXArray % string array -> string (string) array { /tmparray exch def StartLine ({) AddString /tmparray load /ArrayDepth ArrayDepth 1 add def } def /EndXArray % string -> string (string) { /ArrayDepth ArrayDepth 1 sub def (} ) append StartLine } def /StartLine % string -> string (string) { dup stringwidth pop TabWidth ArrayDepth mul gt { () ArrayDepth { ( ) append } repeat } if } def /AddString % string string -> string (string) { append ( ) append dup stringwidth pop 700 gt { StartLine } if pause } def /ExpandDict 35 dict begin /arraytype %% Should handle auto-loaded classes here { dup xcheck { StartXArray { dup type exec } forall EndXArray } { StartArray { dup type exec } forall EndArray } ifelse } def /packedarraytype //arraytype def /dicttype % note that this is overridden below { dup /ClassName known { /ClassName get String256 cvs AddString } { /tmp exch def StartLine (<>) AddString StartLine tmp { /tmp exch def dup type exec ( ) AddString /tmp load dup type exec StartLine } forall StartLine (<>) AddString StartLine } ifelse } def % /dicttype % { % dup /ClassName known % { % /ClassName get % } if % String256 cvs AddString % } def /booleantype { String256 cvs AddString} def /filetype { String256 cvs AddString} def /fonttype { String256 cvs AddString} def /integertype { String256 cvs AddString} def /marktype { ([ ) AddString} def /nametype { dup String256 cvs exch xcheck not { (/) exch append } if AddString } def /nulltype { String256 cvs AddString} def /operatortype { String256 cvs dup length 2 sub 1 exch getinterval AddString} def /realtype { String256 cvs AddString} def /savetype { String256 cvs AddString} def /stringtype { String256 cvs (\() exch append (\)) append AddString} def %% NeWS types /vmtype { String256 cvs AddString} def /canvastype { String256 cvs AddString} def /colortype { String256 cvs AddString} def /eventtype { String256 cvs AddString} def /graphicsstatetype { String256 cvs AddString} def /monitortype { String256 cvs AddString} def /processtype { String256 cvs AddString} def /shapetype { String256 cvs AddString} def currentdict end def %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % Sorting Utilities /FindSmall % proc array -> int { 10 dict begin /a exch def /proc exch def /result 0 def /key a 0 get def /i 0 def 0 1 a length 1 sub { /j exch def key a j get proc { /i j def /key a j get def } if } for i end } def /FasterSort % proc array -> array { 10 dict begin /arrayin exch def /arrayout [] def /proc exch def { arrayin length 0 eq { arrayout exit } if /proc load arrayin FindSmall /i exch def arrayout arrayout length arrayin i get arrayinsert /arrayout exch def /arrayin arrayin i arraydelete def pause } loop end } def /Sort % array -> array { { gt } exch FasterSort } def /BubbleSort % array -> array { 20 dict begin /keys exch def /bound keys length 1 sub def /check 0 def { /t -1 def 0 1 bound 1 sub { /i exch def /j i 1 add def /keysi keys i get def /keysj keys j get def keysi keysj gt { keys i keysj put keys j keysi put /t j def } if } for t -1 eq { exit } { /bound t def } ifelse pause } loop keys end %% EndWait } def %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % Main Class code /ShowArray { % array color pic % (showarray: count %\n) [ count ] dbgprintf 10 dict begin /pic exch def /color exch def /a exch def Font15 setfont W a length 18 mul 15 add /reshapebuffer pic send % { /paint VScrollbar send /paint HScrollbar send } pic send /getcanvas pic send setcanvas color fillcanvas mark /PaintItem pic send cleartomark % PaintItem seems to leave 2 things on the stack 0 0 0 rgbcolor setcolor /k pic /BufferHeight get def a { /k k 18 sub def 5 k moveto show } forall /updatecanvas pic send end } def /DoClasses { [ systemdict { /val exch cvlit def /key exch cvlit def val type /dicttype eq { val /ClassName known { key val /ClassName get eq { % leave this on the stack key 256 string cvs } if } if } if pause } forall ] Sort userdict begin /ClassKeys exch def end ClassKeys ClassColor ClassPic ShowArray userdict /ClassesDict ClassKeys length dict put [] MethodColor MethodPic ShowArray [] VarColor VarPic ShowArray [] InstColor InstPic ShowArray [] TextColor TextPic ShowArray % fork off a process to fill the ClassesDict for % all classes % { ClassKeys { DoClass } forall } fork } def /DoClass % classname -> - (sorts all class attributes) { 10 dict begin /classname exch def ClassesDict classname known not { /classarrays 3 dict def /classdict systemdict classname get def classdict GetSortedMethods classdict GetSortedClassVars classdict GetSortedInstVars classarrays begin /InstVars exch def /ClassVars exch def /Methods exch def end ClassesDict classname classarrays put } if end } def /GetSortedMethods { % classdict => - [ exch { /val exch def /key exch def /val load type dup /arraytype eq exch /packedarraytype eq or /val load xcheck and { key 256 string cvs } if pause } forall ] Sort } def /GetSortedClassVars { % classdict => - [ exch { /val exch def /key exch def /val load type { /arraytype /packedarraytype { /val load xcheck not } /operatortype { false } /dicttype { /val load /ClassName known not } /Default { true } } case { key 256 string cvs } if pause } forall ] Sort } def /GetSortedInstVars { % classdict => - [ exch /InstanceVars get dup null eq { pop [] } if { /val exch def /key exch def key 256 string cvs pause } forall ] Sort } def /DoMethods % classname => - { ClassesDict exch get /Methods get userdict begin /MethodKeys exch def end MethodKeys MethodColor MethodPic ShowArray } def /DoVars % classname => - { ClassesDict exch get /ClassVars get userdict begin /VarKeys exch def end VarKeys VarColor VarPic ShowArray } def /DoInsts % classname => - { ClassesDict exch get /InstVars get userdict begin /InstKeys exch def end InstKeys InstColor InstPic ShowArray } def /ClassPick % x y => - { 10 dict begin /y exch def /x exch def /k ClassPic /BufferHeight get y sub 18 div floor cvi def /lastpick LastClassPick def userdict /LastClassPick k put Font15 setfont lastpick null ne { null SetMethodPick null SetVarPick null SetInstPick gsave %(unhilite %\n) [ lastpick ] dbgprintf /getcanvas ClassPic send setcanvas 0 ClassPic /BufferHeight get lastpick 1 add 18 mul sub 3 sub W 18 rectpath ClassColor setcolor fill 0 0 0 rgbcolor setcolor 5 ClassPic /BufferHeight get lastpick 1 add 18 mul sub moveto ClassKeys lastpick get show grestore } if lastpick null ne lastpick k ne and { %% put scroll bars back to top 0 /setvalue InstPic /VScrollbar get send 0 /setvalue MethodPic /VScrollbar get send 0 /setvalue VarPic /VScrollbar get send 0 /setvalue TextPic /VScrollbar get send } if %(pick is % \n ) [ k ] dbgprintf k ClassKeys length 1 sub le { % (pick is % '%' \n ) [ ClassKeys k get k ] dbgprintf % (Lastpick was '%' \n ) [ lastpick ] dbgprintf /getcanvas ClassPic send setcanvas % (hilite %\n) [ k ] dbgprintf 0 ClassPic /BufferHeight get k 1 add 18 mul sub 3 sub W 18 rectpath 0 0 0 rgbcolor setcolor fill ClassColor setcolor 0 5 ClassPic /BufferHeight get k 1 add 18 mul sub moveto ClassKeys k get show /updatecanvas ClassPic send lastpick k ne { [(Loading Menus...)] TextColor TextPic ShowArray [] MethodColor MethodPic ShowArray [] VarColor VarPic ShowArray [] InstColor InstPic ShowArray ClassKeys k get cvn dup DoClass dup DoMethods dup DoVars dup DoInsts pop } if [ (CLASS ") ClassKeys k get 256 string cvs (") append append systemdict ClassKeys k get cvn get /ParentDictArray known { systemdict ClassKeys k get cvn get /ParentDictArray get { /ClassName get 256 string cvs ( ) exch append } forall } if ] TextColor TextPic ShowArray k } { /updatecanvas ClassPic send null } ifelse end } def /SetInstPick % newpick => - { 10 dict begin Font15 setfont LastInstPick null ne { gsave /getcanvas InstPic send setcanvas 0 InstPic /BufferHeight get LastInstPick 1 add 18 mul sub 3 sub W 18 rectpath InstColor setcolor fill 0 0 0 rgbcolor setcolor 5 InstPic /BufferHeight get LastInstPick 1 add 18 mul sub moveto InstKeys LastInstPick get show grestore } if userdict begin /LastInstPick exch def end % pick up newpick %% (new InstPick is % \n ) [ LastInstPick ] dbgprintf LastInstPick null ne { /getcanvas InstPic send setcanvas 0 InstPic /BufferHeight get LastInstPick 1 add 18 mul sub 3 sub W 18 rectpath 0 0 0 rgbcolor setcolor fill InstColor setcolor 0 5 InstPic /BufferHeight get LastInstPick 1 add 18 mul sub moveto InstKeys LastInstPick get show } if /updatecanvas InstPic send LastInstPick null ne { /val systemdict ClassKeys LastClassPick get cvn get % class /InstanceVars get % instdict InstKeys LastInstPick get % class variable get def [] TextColor TextPic ShowArray [ (INSTANCE VARIABLE) ( ") InstKeys LastInstPick get 256 string cvs (") append append append val Expand ] TextColor TextPic ShowArray } if end } def /InstPick { null SetMethodPick null SetVarPick 10 dict begin /y exch def /x exch def /k InstPic /BufferHeight get y sub 18 div floor cvi def %% (pick is % \n ) [ k ] dbgprintf k dup end InstKeys length 1 sub le { SetInstPick } { pop } ifelse } def /SetMethodPick % newpick => - { Font15 setfont LastMethodPick null ne { gsave /getcanvas MethodPic send setcanvas 0 MethodPic /BufferHeight get LastMethodPick 1 add 18 mul sub 3 sub W 18 rectpath MethodColor setcolor fill 0 0 0 rgbcolor setcolor 5 MethodPic /BufferHeight get LastMethodPick 1 add 18 mul sub moveto MethodKeys LastMethodPick get show grestore } if userdict begin /LastMethodPick exch def end % pick up newpick %% (new MethodPick is % \n ) [ LastMethodPick ] dbgprintf LastMethodPick null ne { /getcanvas MethodPic send setcanvas 0 MethodPic /BufferHeight get LastMethodPick 1 add 18 mul sub 3 sub W 18 rectpath 0 0 0 rgbcolor setcolor fill MethodColor setcolor 0 5 MethodPic /BufferHeight get LastMethodPick 1 add 18 mul sub moveto MethodKeys LastMethodPick get show } if /updatecanvas MethodPic send LastMethodPick null ne { [] TextColor TextPic ShowArray [ (METHOD ") MethodKeys LastMethodPick get 256 string cvs (") append append systemdict ClassKeys LastClassPick get cvn get % class MethodKeys LastMethodPick get % class method get Expand ] TextColor TextPic ShowArray } if } def /MethodPick { null SetVarPick null SetInstPick 10 dict begin /y exch def /x exch def /k MethodPic /BufferHeight get y sub 18 div floor cvi def %% (pick is % \n ) [ k ] dbgprintf k dup end MethodKeys length 1 sub le { SetMethodPick } { pop } ifelse } def /SetVarPick % newpick => - { 10 dict begin Font15 setfont LastVarPick null ne { gsave /getcanvas VarPic send setcanvas 0 VarPic /BufferHeight get LastVarPick 1 add 18 mul sub 3 sub W 18 rectpath VarColor setcolor fill 0 0 0 rgbcolor setcolor 5 VarPic /BufferHeight get LastVarPick 1 add 18 mul sub moveto VarKeys LastVarPick get show grestore } if userdict begin /LastVarPick exch def end % pick up newpick %% (new VarPick is % \n ) [ LastVarPick ] dbgprintf LastVarPick null ne { /getcanvas VarPic send setcanvas %(hilite %\n) [ LastVarPick ] dbgprintf 0 VarPic /BufferHeight get LastVarPick 1 add 18 mul sub 3 sub W 18 rectpath 0 0 0 rgbcolor setcolor fill VarColor setcolor 0 5 VarPic /BufferHeight get LastVarPick 1 add 18 mul sub moveto VarKeys LastVarPick get show } if /updatecanvas VarPic send LastVarPick null ne { /val systemdict ClassKeys LastClassPick get cvn get % class VarKeys LastVarPick get % class variable get def [] TextColor TextPic ShowArray [ { (CLASS VARIABLE) ( ") VarKeys LastVarPick get 256 string cvs (") append append append val Expand } errored { cleartomark [ (CLASS VARIABLE) ( ") VarKeys LastVarPick get 256 string cvs (") append append append (Error in CLASS VARIABLE) () $error Expand } if ] TextColor TextPic ShowArray } if end } def /VarPick { null SetMethodPick null SetInstPick 10 dict begin /y exch def /x exch def /k VarPic /BufferHeight get y sub 18 div floor cvi def % (pick is % %\n ) [ k VarKeys] dbgprintf k dup end VarKeys length 1 sub le { SetVarPick } { pop } ifelse } def /SetupNoClass { % - -> - Set up systemdict to look like a class % systemdict /NoClass systemdict put systemdict /NoClass dictbegin systemdict { dup type /dicttype ne { def } { dup /ClassName known { pop pop } { def } ifelse } ifelse } forall dictend put NoClass /InstanceVars 0 dict put % systemdict /ClassName (NoClass) put NoClass /ClassName (NoClass) put } def /HandlePick { % procedure -> - PickProcess null ne { PickProcess killprocess } if fork userdict begin /PickProcess exch def end } def SetupNoClass DoClasses PicArray forkitems pop /map win send % /win null def % newprocessgroup % currentfile closefile EOF From don Thu Apr 12 19:59:42 1990 Date: Thu, 12 Apr 90 19:59:42 -0400 To: NeWS-makers@brillig.umd.edu Subject: passing arguments to NeWS progs. From: hbo!bice (Brent A. Bice) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Here is a quickie program I did to demonstrate passing command-line params to NeWS code... ------------------------------------- send ---------------------------------- #!/bin/csh -f # # usage: t.ps word # # This is a useless postscript program that takes a given arg. and uses # popmsg to show it on the screen. cat << FINIS | psh # pass the following through cat, then to psh % here is where my postscript code would go gsave framebuffer setcanvas clippath pathbbox 4 -2 roll pop pop 2 div exch 2 div exch grestore ($1) popmsg pop FINIS ----------------------------------------------------------------------------- Note that it really is a csh script, but uses psh to execute the generated code. Hope this helps... Brent Bice From don Thu Apr 12 20:00:27 1990 Date: Thu, 12 Apr 90 20:00:27 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: Using the FileManager with NeWS (+ a query of my own) From: "Michael_Powers.Roch817"@Xerox.COM Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) The source code that come with OpenWindows contain examples of how to recieve the file from a drag-n-drop. You basically need to recieve an ACTION_DRAG_LOAD (I don't have the book in front of me so the names mentioned here are from memory) and then get the relevent string from the selection service. The name will be the full path name of the file of interest. You can also find and example in the O'Reilly book on XView (#6?) under drag-n-drop. Now to satisfy my curiosity....Why is there no mention in either the O'Reilly book or the News manuals of the proper way to be the sender of an ACTION_DRAG_LOAD (eg. like the file manager)? Way back when I dug through some of the source and found out how the text editor did it with text. It was somewhat unwieldy, using the send_message call but it worked and I now have a file manager equivalent for image databases. Would someone from Sun like to publish a "nice" and perhaps "standard" way of doing this. If not or if people are just curious I'm willing to send out the snippet of code I use. Just drop me a note, if there is enough interest I'll post. Michael powers.roch817@xerox.com From don Fri Apr 13 11:33:43 1990 Date: Fri, 13 Apr 90 11:33:43 -0400 To: NeWS-makers@brillig.umd.edu Subject: Ports of Sun's NeWS From: rbogen@dreams.EBay.Sun.COM (Richard Bogen) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) In response to bice@atlantis.ees.anl.gov asking about NeWS ports, here is a message that was sent to this alias some time back. As the author previous said: "I make no claim about the completeness or correctness of this list..." --- Lator, Satisfaction altogether Guaranteed by Doctor Tarr and Professor Fether... Jeffrey B. McGough WR-ALC UNIX Systems Administrator (mcgough@wrdis01.af.mil) ------List Follows------ NewScript, a NeWS interaction clone for MS/DOS by TAG inc. Technology Application Group inc. 10621 Bloomfield St., Suite 33 Los Alamitos, CA 90720 USA 213 430-9792 NewScript(tm) is a compact, high performance emulation of the NeWS, for 286 and 386 machines running DOS or OS/2(tm). NewScript offers an interactive user interface design environment for the development and prototyping of NeWS compatible graphical interfaces. Perfect for PostScript and NeWS class teaching! NewScript is based on the PostScript language as defined by Adobe Systems Inc. with Events, canvases, monitors, processes, and object PostScript extensions specified by NeWS. NewScript emulates a subset of NeWS and PostScript. CPS, network communications, and stroke fonts are not supported in version 1.0. Non-Commercial Ports: Columbia University Department of Computer Science 450 Computer Science Bldg. 500 W. 120th St. New York, NY 10027-6699 Contact: Chris Maio 212 854-2736 NeWS port to HP workstation model 9000, Series 300 Los Alamos National Laboratory Los Alamos, New Mexico Contacts: Richard Phillips David Forslund 505 667-5061 NeWS port to a Cray Supercomputer, model XMP-24 University of California at Santa Cruz Computer Science Dept. Santa Cruz, CA 95060 Contact: Al Conrad 408 429-2370 Ported NeWS 1.1 to the Integrated Solutions Inc., model V8 Other Ports: TGV has ported X11/NeWS to a VAXstation(tm) 2000 running VMS. Productization and distribution arrangements are currently being addressed by Sun Microsystems and TGV. For information contact Steve Messino, Windows Licensing Manager, at 415 960-1300. Bundled Commercial Products: Silicon Graphics Computer Systems Inc. 2011 N. Shoreline Blvd. P.O. Box 7311 Mountain View, CA 94039-7311 415 964-1459 NeWS 1.1 ships with all Silicon Graphics Workstations. Unbundled Commercial Products: NeWS/2 for OS/2 by Architech 80 E. 11th St., Suite 222 New York, NY 10003 212 979-5337 NeWS is up and running on OS/2! Networking to other machines on your LAN Manager net is just like using your own machine now! PNeWS for Sun VMEbus machines by Parallax 2500 Condensa St. Santa Clara, CA 95051 408 727-2220 PNeWS is a NeWS port extended to deal with live video! Using display systems from Parallax, any NTSC signal can be fed into a window on your Sun workstation, for display or digitizing. MacNews for A/UX on Apple Macintosh by Grasshopper Group 1996 Hayes St. San Francisco, CA 94117 To order: 408 266-4783 Technical Support: 415 668-5998 MacNews is a full NeWS port, running on Apples UNIX port with full Berkeley TCP/IP networking. MacNews Version 1.1.10 supports standard Macintosh color displays. Runs in 4 megabytes of RAM. Version 1.1.10 runs only on A/UX version 1.1, MacNews 1.1.01 runs only on A/UX 1.0. Shipped on floppies. Price: MacNews 1.1.10, $300. MacNews 1.1.01, $225. NeWS for SunOS by Sun Microsystems Inc. I2550 Garcia Avenue, Mt. View, CA 94043 USA 415 960-1300 The original NeWS port is for Sun Workstations. It is available >from Sun for $125, including the binaries on tape cartridge or reel-to-reel, NeWS manual and installation instructions, and the Adobe PostScript Reference Manual and tutorial. cd From susan@gotham.East Wed Sep 20 16:46:09 1989 Date: Wed, 20 Sep 89 18:19:46 EDT From: susan@gotham.East (Susan A. Bickford - NYC SE) To: openwindow-interest@Sun.COM, todd@sunbird.Central Subject: Re: PC/NeWS > Is there a PC based NeWS implementation out there? NeWScript NeWS on MS-DOS Technology Application Group Los Alamitos, CA (213) 430-9792 Up until about 5 months ago, I used to actively collect this stuff and maintain the list below. I'm not sure how uptodate it is. The comments are not mine - just yanked from various messages on the net. Susan ------------------------------------------ Silicon Graphics: NeWS (4Sight) SGI workstations Mountain View, CA Silicon Graphics Computer Systems Inc. 2011 N. Shoreline Blvd. P.O. Box 7311 Mountain View, CA 94039-7311 415 964-1459 NeWS 1.1 ships with all Silicon Graphics Workstations. PNeWS Parallax Graphics: Video Windows via NeWS 2500 Condensa St. Santa Clara, CA 95051 (408) 727-2228 Architech: NeWS on OS/2 Sal Catudella, Anthony Flynn, Maurice Ballick NYC (212) 979-5337 MacNeWS Grasshopper Group: NeWS on a MacII, A/UX Hugh Daniel 1996 Hayes Street San Fransisco CA 94117 +1 408 266-4783 grasshopper@toad.com $225 Wedge Computer, Inc. NeWS on a MacII, Mac OS 2 Winter Street Waltham, MA 02154 (617)891-1313 Whitechapel Workstations: NeWS for Whitechapel Workstations London, England Acorn Computer: NeWS for Acorn Computers Cambridge, England Raster Technologies: NeWS for the GX4000 Westford, MA Ameristar Technologies: NeWS for the Amiga 2000 Long Island, NY Celerity: NeWS client-side for Celerity San Diego, CA Alliant: NeWS client-side for Alliant Littleton, MA Liason 42 Robert Esbury Unit 2 433 Miller Street Cammeray, New South Wales, 2062, Australia +61 612 922-7099 University of California at Santa Cruz Computer Science Dept. Santa Cruz, CA 95060 Contact: Al Conrad 408 429-2370 Ported NeWS 1.1 to the Integrated Solutions Inc., model V8 NeWS on HP Chris Maio 212 584 2736 Columbia University Department of Computer Science 450 Computer Science Bldg. 500 W. 120th St. New York, NY 10027-6699 Cogent Research: NeWS on a Parallel Processor Beaverton, Oregon 97006-6998 Wm Leler 503-690-1450 NeWScript NeWS on MS-DOS Technology Application Group Los Alamitos, CA (213) 430-9792 Apollo NeWS: U of Michigan did a NeWS 1.0 port a while back. It performs quite well on mono systems (only on mono, actually). If you find yourself in a situation where demonstrating an apollo port would be of use (like in selling NeWS source), it's possible to get permission from U of M to show it. ------------------------------- The Grasshopper Group in San Francisco has a NeWS implementation for the mac. It is retailing for 225$ (I think - it is not too pricey). They have a booth at USENIX right now and it demos pretty nicely. ------------------------ Wedge Computer, Inc. 2 Winter Street Waltham, MA 02154 (617)891-1313 ---------------------------- MacNews fro the Grasshopper Group o Runs under A/UX 1.0 with A/UX supported monitors. A minimum of 4 megs of RAM and 5 Megs of disk is recommeded. o MacNews release 1.1.01 is $225(U.S.) direct from the Grasshopper Group. o Complete client source is included. o NeWS servers from Sun, Silicon Graphics, WhiteChapel Workstations and Acorn Computers work with MacNews. o To order call +1 408 266 4738 between 8am & 5pm PST or contact them via the net at grasshopper@toad.com ------------ There are three companies doing NeWS for Macintoshes today: Grasshopper Group Hugh Daniel 212 Clayton Street San Fransisco CA 94117 +1 408 266-4783 grasshopper@toad.com They do NeWS for A/UX on Macintosh. Some excerpts from their brouschure: * Works with NeWS servers from SUN, Silicon Graphics, Whitechapel, Acorn * OPENLook will run under NeWS * "Complete client source is, of course, included" * run under A/UX 1.0 with A/UX supported monitors. minimum 4MB RAM and 5MB disk is recommended. * $225 for release 1.1.01 extra machine on the same network $150 extra manual $25 Wedge Computer Dick Bonsai 2 Winter Street Waltham, MA 02154 +1 617 891-1313 They do NeWS for MacOS. I called them and they said they have "released" a beta-version with communicates with a SUN (yes it must be a SUN) via the seral line (no TCP/IP or netting so far). They are considering a TCP/IP version by the end of the year. The big release of the seral-line-version should be out by the end of this summer. Liason 42 Robert Esbury Australia +61 612 922-7099 Contact Rob Esbury, Liason 42, Unit 2, 433 Miller Street, Cammeray, New South Wales, 2062, Australia. They do NeWS for MacOS. Due to time differenses (+9h) I have not been able to reach them. maybe someone else on the net (in Australia!) could give it a try? ------------ a comment: I used to work for Wedge when they were porting NeWS to the Mac under MacOS. I'd say that the product is reasonable, but it's slow. This is mostly due to the Macintosh itself. Paricularly, if you wanted to read something off the local (Mac) disk. They did a multiplexor that simulates sockets across a serial line. Basically, a process on the Unix machine (it can be any 4.2 BSD machine, it does not have to be a Sun) accepts connections on a port and packetizes the data between the Macintosh and the client machine over the serial line. This works rather well with NeWS, since most of the time, the volume of data passed between client and server is not much. There is nothing in 'product' form yet, but White Pine Software (P.O. Box 1108 Amherst, N.H. 03031, 603-886-9050) has a prototype they are working on. It has the requirements you are looking for (although it runs only on a II currently, and uses Apples Ethertalk card, it could use other communication drivers, and may run on other machines if there is demand). Apple also has a server that runs under MacOS, but it is not an announced product, and may or may not be released. I saw a demo at Xhibition, but Apple wasn't free to discuss what was going to be done with it. ------------------------------ Cogent Research: NeWS on a Parallel Processor Beaverton, Oregon 97006-6998 Wm Leler 503-690-1450 We invited these folks down to a local graphics conference to show their version of NeWS, which has been adapted to run in a parallel processing environment. Their box is transputer based; they sell it, but the company is primarily geared toward research in parallel processing at this time. They're NeWS enthusiasts, although they don't have NeWS source yet. Wm has a couple of papers out on their NeWS implementation, and is currently doing some work on PostScript semantics for file systems and such. NUT: NeWS User Terminal Sun Microstems ESS group The fabled Atari port of NeWS has been redone as a prototype of a NeWS user terminal. It runs in about 4MB (they're trying to cut that) and over an RS323 line from 2400-19.2Kb. It performs acceptably; at low Baud rates it takes a while to transfer the ps code over to run. It's kind of fun to see things like CG3270 run on an Atari, though. They've done a 2 page scrollable display to get around resolution problems, and it works well. This isn't a product yet, and would not be competing with NeWS ports on existing machines (DOS, Mac, etc.). They will be showing it at Connectathon this week. Apollo NeWS: U of Michigan did a NeWS 1.0 port a while back. It performs quite well on mono systems (only on mono, actually). If you find yourself in a situation where demonstrating an apollo port would be of use (like in selling NeWS source), it's possible to get permission from U of M to show it. NeWS/2 for OS/2 by Architec +1 718 622 8577 FAX +1 718 622 9205 850 Carroll St., Brooklyn, New York 11215 USA NeWS is up and running on OS/2! Networking to other machines on your LAN Manager net is just like using your own machine now! Unfortunately OS/2 doesn't support TCP/IP yet, so it doesn't yet network to your Suns, Macs, etc. PNeWS for Sun VMEbus machines by Parallax +1 408 727 2228 PNeWS is a NeWS port extended to deal with live video! Using display systems from Parallax, any NTSC signal can be fed into a window on your Sun system, for display or digitizing. MacNews for A/UX on Apple Macintosh by Grasshopper Group <...!{uunet, sun, apple}!hoptoad!tech> Orders: +1 408 266 4783 Tech: +1 415 668 5998 1996 Hayes St., San Francisco CA 94117 USA MacNews is a full NeWS port, running on Apple's Unix port with full Berkeley TCP/IP networking. MacNews Version 1.1.10 supports standard (reasonable) Macintosh color displays. Runs in 4 megs of RAM, works best with more RAM, of course! Version 1.1.10 runs only on A/UX version 1.1, MacNews 1.1.01 runs only on A/UX 1.0. Shipped on floppies. Price: MacNews 1.1.10, $300 US. MacNews 1.1.01, $225 USA NeWS for SunOS by Sun Microsystems +1 415 960 1300 Inquiries: 2550 Garcia Avenue, Mt. View, CA 94043 USA Orders: call your local Sun sales office The original NeWS port is for Sun Workstations. It is available from Sun for $100, including the binaries on tape (cartridge or reel-to-reel), NeWS manual and installation instructions, and the Adobe PostScript reference manual and tutorial. An outstanding value for $100! NewScript, a NeWS interaction clone for MS/DOS by TAG inc. Technology Application Group inc. +1 213 430 9792 FAX +1 714 995 7980 10621 Bloomfield Street, Suite 33 Los Alamitos, California 90720 USA NewScript(tm) is a compact, high performance emulation of the NeWS window system, for 286 and 386 machines running DOS or OS/2(tm). NewScript offers an interactive user interface design environment for the development and prototyping of NeWS compatible graphical interfaces. Perfect for PostScript and NeWS class teaching! NewScript is based on the PostScript(R) language as defined by Adobe Systems Inc. with Events, Canvases, Monitors, Processes, and Object PostScript extensions specified by NeWS. NewScript emulates a subset of NeWS and PostScript. CPS, network communications, and stroke fonts are not supported in version 1.0. Los Alamos National Laboratory Los Alamos, New Mexico Contacts: Richard Phillips David Forslund 505 667-5061 NeWS port to a Cray Supercomputer, model XMP-24 NeWS related Products for MacNews -------------------------------------------- softquad Publishing Software -- Product Summary +1 800 387 2777, +1 416 963 8337 SoftQuad Inc., 720 Spadina Avenue,Toronto, Ontario, Canada M5S 2T9 Device-independent text and graphic processing for laserprinters, typesetters, and impact printers. Powerful and flexible, SoftQuad Publishing Software is a high performance derivation of AT&T's Documenter's Workbench, complete with troff, eqn, tbl, pic and grap processors for text, equations, tables, graphics and graphs. SoftQuad Publishing Software is a cost-effective solution for most publishing and in-house publishing tasks: manuals, reports, books, proposals, price lists, newsletters, and memos. The software provides the tools to simply and methodically create macro formatting packages to produce typeset quality output, taking full advantage of the capabilities of all popular printing devices for those users who have neither the time nor the expertise to painstakingly design each page. Because of its heritage as a true building-block program within UNIX, SoftQuad Publishing Software can format and print text files from any source, including word processor, database and spreadsheet applications. It can run alone or invisibly, behind other applications, to create fine quality, reproducible laserprinter output or inexpensive proofs which emulate the line and page breaks of high-cost typeset galleys. Features include typeface and point size changes, justification, centering, hyphenation, page and section numbering, multiple columns, proper character fit (kerning) and user definable hyphenation exception dictionary. Newly added features include bitmap inclusion, white lettering on dark background, and landscape printing. Detailed, readable manuals are included. Screen previewers for NeWS and X-windows are also available for a variety of machines. SoftQuad Publishing Software is available for virtually all UNIX and MS-DOS computers, including, of course, the Apple Macintosh II and IIX running A/UX. PostScript Clip Art Images from 3G Graphics +1 800 456 0234 +1 206 823 8198 11410 N.E. 124th St., Suite 6155 Kirkland, Washinton 98034 USA 3G sells a growing line of over 200 pieces of PostScript Clip Art Images. These images come on MacOS floppies that can be read with the A/UX 'hfx' toolbox utility into AppleDouble format files. The data fork of the AppleDouble file (you can throw away the half that starts with a %) can be previewed with 'paper'. 3G has graciously provided some sample images; they are viewable under the Demos => Previewer => Paper menu in MacNews 1.1.10. From don Mon Apr 16 01:00:55 1990 Date: Mon, 16 Apr 90 01:00:55 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: what the hell happened to writecanvas in NeWS 2.0!!! From: philmtl!philabs!ppgbms!pablo@uunet.uu.net (Pablo Gonzalez) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) In article <134314@sun.Eng.Sun.COM>, naughton@wind.eng.sun.com (Patrick Naughton) writes: > > Both NeWS 1.1 and NeWS 2.0 (OpenWindows) write compressed images, > actually run-length byte encoded images. The size difference you are > seeing is due to the inclusion of the colormap in the NeWS 1.1 image > even though it is one bit deep. NeWS 2.0 leaves the colormap out of > 1 bit deep images thus all mono images 2.0 writes will be 768 bytes > smaller than the 1.1 equivalents. > I would like to first thank you for replying to our article. We agree with your point regarding the colormap omission in NeWS 2.0. However, the NeWS 1.1 that we are running does not write the image data in compressed format. We have verified this by checking the rasterfile type. NeWS 1.1 rasterfile type is equal to 1 while NeWS 2.0 type is equal to 2. P.S. I would like to apologize for the nasty wording in the subject line. It was just one of those days. Thanks again, Pablo ============================================================================ Pablo Gonzalez | One Campus Drive | path ppgbms!moe!pablo@philabs.philips.com Pleasantville, N.Y. 10570 | (914) 741-4626 | ============================================================================ From don Mon Apr 16 01:01:07 1990 Date: Mon, 16 Apr 90 01:01:07 -0400 To: NeWS-makers@brillig.umd.edu Subject: Public domain classing tools From: decwrl.dec.com!kent@decwrl.dec.com Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Does anyone have a set of classing tools (equivalent to class.ps) that are free of Sun licensing constraints? Chris Kent Western Software Laboratory Digital Equipment Corporation kent@decwrl.dec.com decwrl!kent (415) 853-6639 From don Mon Apr 16 22:20:48 1990 Date: Mon, 16 Apr 90 22:20:48 -0400 To: NeWS-makers@brillig.umd.edu Subject: HELP! Bug in NeWS 1.1 From: haven!ncifcrf!toms@purdue.edu (Tom Schneider) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) I was trying to make characters change their size depending on a variable. It won't work unless I rotate the image! The program is: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% /Times-Roman findfont 30 scalefont setfont erasepage 100 100 translate /square {newpath 0 0 moveto 90 0 lineto 90 90 lineto 0 90 lineto closepath stroke 6 92 moveto (A box) show } def gsave 20 20 translate 5 2 scale 0.1 rotate square grestore gsave 20 20 translate 5 2 scale % IF YOU DON'T ROTATE, THE SCALE FAILS square grestore showpage %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% It works fine on my Apple LaserWriter, but fails if I psh it to the server. I found that even a 0.001 scale (but not 0.0001!) will fix the problem, but a 0.1 scale -0.1 scale still has a bug. Is there a way around this without rotating? If not, has it been fixed in the upgrade (ie, should I try to convince our manager to get the upgrade and install it?) Thanks for your help! Tom Schneider National Cancer Institute Laboratory of Mathematical Biology Frederick, Maryland 21701-1013 toms@ncifcrf.gov From don Tue Apr 17 06:09:33 1990 Date: Tue, 17 Apr 90 06:09:33 -0400 To: NeWS-makers@brillig.umd.edu Subject: arcsin From: zaphod.mps.ohio-state.edu!brutus.cs.uiuc.edu!rpi!uupsi!sunic!nuug!ifi!Lazy@tut.cis.ohio-state.edu Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) There seems to bee a bug in arcsin in NeWS 1.1: Script started on Tue Apr 17 09:43:07 1990 9:43 Lazy@gille ~ >psh executive NeWS Version 1.1 90 sin arcsin == 90 60 sin arcsin == 60 30 sin arcsin == 30.002 25 sin arcsin == 25.0073 20 sin arcsin == 20.274 15 sin arcsin == 15.62 12 sin arcsin == 12.373 10 sin arcsin == 10.089 8 sin arcsin == 9.4114 6 sin arcsin == 7.118 4 sin arcsin == 7.054 2 sin arcsin == 7.0153 1 sin arcsin == 7.006 0.5 sin arcsin == 7.0032 quit psh: NeWS server disconnected 9:46 Lazy@gille ~ >exit exit script done on Tue Apr 17 09:47:01 1990 Here is a little hack I wrote, but has somebody written a better one ? Or have suggestions to make it faster ? /myasin { dup /test exch def test 1 eq { 90 } { test -1 eq { 270 } { test 0.5 lt { dup 2 exp neg 1 add sqrt div arctan } { dup dup abs neg 1 add 2 mul exch abs neg 1 add 2 exp sub sqrt div arctan } ifelse } ifelse } ifelse } def Lasse Bjerde lazy@ifi.uio.no Department of Informatics University of Oslo, Norway From don Tue Apr 17 12:49:22 1990 Date: Tue, 17 Apr 90 12:49:22 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: HELP! Bug in NeWS 1.1 From: Rafael Bracho Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) There is no problem with OpenWindows (either V1.0 or V2.0). Move to it! -Rafael From don Wed Apr 18 06:29:55 1990 Date: Wed, 18 Apr 90 06:29:55 -0400 To: NeWS-makers@brillig.umd.edu Subject: Problem with NeWS 'charpath' From: alexandr%cadillac.cad.mcc.com@mcc.com (Mark Alexandre) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Running X11/NeWS Version 1.0, I found an unexpected behavior when using 'charpath' to get the bounding rectangle of the path for a string (a difference between NeWS and PostScript). I had assumed that the bounding rectangle would be "minimal" in some sense, i.e. that it would be just large enough to surround the path of the given string. Usually this is in fact the case. However, it is not so whenever the current transformation matrix has been rotated. The charpath given around a rotated string is for some reason more generous than it need be along the rotated y axis. This would seem to be a bug to me (it is definitely not what I need right now). Does anybody know if this is considered a bug? Does anybody know of a workaround? Does anybody really know what time it is? ;-) The following illustrates the problem: 100 75 moveto (charpath bug) gsave dup false charpath stroke grestore show gsave 100 100 moveto (charpath bug) 10 rotate % <--- gsave dup false charpath stroke grestore show grestore gsave 100 150 moveto (charpath bug) 30 rotate % <--- gsave dup false charpath stroke grestore show grestore gsave 100 225 moveto (charpath bug) 60 rotate % <--- gsave dup false charpath stroke grestore show grestore From don Wed Apr 18 06:30:52 1990 Date: Wed, 18 Apr 90 06:30:52 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: HELP! Bug in NeWS 1.1 From: wind!naughton@sun.com (Patrick Naughton) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) This is fixed in OpenWindows... The following code shows anamorphic scaling on OW1.0 without needing rotate to work around any bugs... -Patrick %!PS-Adobe-1.0 /Times-Roman findfont 30 scalefont setfont /square { 0 0 moveto 90 0 lineto 90 90 lineto 0 90 lineto closepath stroke 6 92 moveto (A box) show } def 120 120 translate 1 1 5 { gsave dup 5 div 2 mul scale square grestore } for showpage ______________________________________________________________________ Patrick J. Naughton ARPA: naughton@sun.com Window Systems Group UUCP: ...!sun!naughton Sun Microsystems, Inc. AT&T: (415) 336 - 1080 From don Wed Apr 18 06:31:02 1990 Date: Wed, 18 Apr 90 06:31:02 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: arcsin From: wind!naughton@sun.com (Patrick Naughton) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) arcsin works a little better in OpenWindows: wind % psh executive Welcome to X11/NeWS Version 2 (Post-Beta) (wind:0) 90 sin arcsin == 90.0 60 sin arcsin == 59.9992 30 sin arcsin == 30.0008 25 sin arcsin == 25.0022 20 sin arcsin == 19.9992 15 sin arcsin == 15.0009 12 sin arcsin == 12.0006 10 sin arcsin == 10.0013 8 sin arcsin == 7.9977 6 sin arcsin == 5.9984 4 sin arcsin == 3.9985 2 sin arcsin == 1.9983 1 sin arcsin == 0.9982 0.5 sin arcsin == 0.4991 ______________________________________________________________________ Patrick J. Naughton ARPA: naughton@sun.com Window Systems Group UUCP: ...!sun!naughton Sun Microsystems, Inc. AT&T: (415) 336 - 1080 From don Wed Apr 18 16:22:32 1990 Date: Wed, 18 Apr 90 16:22:32 -0400 To: NeWS-makers@brillig.umd.edu Subject: moveinteractive From: korp@tripoli.ees.anl.gov Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) In porting some of our code to OpenWindows we have found that moveinteractive does not work correctly. The item just seems to move wherever it pleases. If anyone else has had this experience porting 1.1 lite toolkit code could you please let me know. Thanks. Peter A. Korp Argonne National Laboratory korp@tripoli.ees.anl.gov From don Wed Apr 18 16:22:48 1990 Date: Wed, 18 Apr 90 16:22:48 -0400 To: NeWS-makers@brillig.umd.edu Subject: Mac Postscript Preview with OpenWindows? From: ndcheg!kellow@iuvax.cs.indiana.edu (John Kellow) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Is it possible to preview Macintosh postscript output (created with LaserWriter 6.0) using pageview under OpenWindows? So far I haven't had any luck. I've tried dumping the Mac output to a file with command-K (which includes the AppleDict or whatever its called) and I've also tried using the output that gets spooled to a Sun running CAP (which prepends a slightly modified AppleDict that removes some of Apple's weird operators). The command-K method just causes pageview to print an error message, while with the CAP method pageview seems to digest the file but nothing ever shows up. John Kellow kellow@ndcheg.cheg.nd.edu From don Fri Apr 20 10:34:47 1990 Date: Fri, 20 Apr 90 10:34:47 -0400 To: NeWS-makers@brillig.umd.edu Subject: example stacks for HyperNeWS (long shar file) From: philmtl!philabs!derek!per@uunet.uu.net (Paul E. Rutter) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) # The rest of this file is a shell script which will extract: # README Pexamples.stack PexamplesHNButtons.stack PexamplesHNSliders.stack PexamplesHNText.stack PexamplesIntro.stack PexamplesMultiShapes.stack PexamplesParentScripts.stack PexamplesScripts.stack PexamplesShapes.stack # Suggested restore procedure: # Edit off anything above these comment lines, # save this file in an empty directory, # then say: sh < file echo x - README cat >README <<'!Funky!Stuff!' These HyperNeWS stacks contain some examples of HyperNeWS objects, and how to tie them together with simple scripts. I hope you find them useful (especially if you are new to HyperNeWS). These stacks have been tested on both Sun3 and SparcStation hardware, using HyperNeWS 1.3 under OpenWindows 1.0. They should also work under earlier and later versions of both HyperNeWS and xnews, but there are no guarantees. After unsharing these stacks, put them in your HyperNeWS "Stacks" directory, and start by opening the "Pexamples.stack" stack. Paul Rutter Philips Labs per@philabs.philips.com philabs!per@uunet !Funky!Stuff! echo x - Pexamples.stack cat >Pexamples.stack <<'!Funky!Stuff!' % HyperNeWS data file, (c)1989 Turing Institute % creator: per 1.2 HNBegin /Stack(Pexamples)BO DS (Thu 30 Nov 1989 13:20)(Wed 18 Apr 1990 10:47)0 591 true false false true (per)null 5 8 BD MX 0 0 360 296 false BL false WH 1 DR [ MX 0 0 360 296 false BL false WH 1 DR [ MX 0 0 360 296 false BL true 0.7419 0.7419 0.7419 0.7419 1 [[0 0] [0 0] [96 296] [360 296] [304 144] [144 136] [160 192] [240 192] [256 240] [200 240] [128 0]] SP ] ME ] ME ED [/Card(#5)BO /BackGround(#0)BO []DO $ [/EditText(Title)BO 110 255 100 30 /Helvetica-BoldOblique 18 WH 0.8 0.8 0.8 0.8 true false [(Pexamples)]()/Center false 0 0 0 0 0 1 [[0 9 0 ]]true false false false true 0.6 0.6 0.6 0.6 BL 1 0.72 0.65 1 0 0 0 10 DO /OnOpen { MyStack /ObjectName get 32 string cvs SetValue } def $ /Button(IntroButton)BO 215 255 120 30 /Times-BoldItalic 18 BL 0.8 0.8 0.8 0.8 true false 0 (Click Me First)10 14 /Push null DO /Action { /PexamplesIntro ShowStack } def $ /Button(#13)BO 265 225 60 20 /Times-Roman 12 BL 0.7 0.7 0.7 0.7 true false 0 (HN Text)5 14 /Push null DO /Action { /PexamplesHNText ShowStack } def $ /Button(HNSlidersButton)BO 250 190 65 20 /Times-Roman 12 BL 0.7 0.7 0.7 0.7 true false 0 (HN Sliders)5 14 /Push null DO /Action { /PexamplesHNSliders ShowStack } def $ /Button(HNButtonsButton)BO 220 155 70 20 /Times-Roman 12 BL 0.7 0.7 0.7 0.7 true false 0 (HN Buttons)5 14 /Push null DO /Action { /PexamplesHNButtons ShowStack } def $ /Button(ShapesButton)BO 95 225 100 25 /Times-BoldItalic 18 BL 0.8 0.8 0.8 0.8 true false 0 (Shapes)10 14 /Push null DO /Action { /PexamplesShapes ShowStack } def $ /Button(MultiButton)BO 75 185 105 25 /Times-BoldItalic 18 BL 0.8 0.8 0.8 0.8 true false 0 (MultiShapes)10 14 /Push null DO /Action { /PexamplesMultiShapes ShowStack } def $ /Button(ScriptsButton)BO 65 145 105 25 /Times-BoldItalic 18 BL 0.8 0.8 0.8 0.8 true false 0 (Scripts)5 14 /Push null DO /Action { /PexamplesScripts ShowStack } def $ /Button(#14)BO 45 105 110 25 /Times-BoldItalic 18 BL 0.8 0.8 0.8 0.8 true false 0 (ParentScripts)5 14 /Push null DO /Action { /PexamplesParentScripts ShowStack } def $ /EditText(#6)BO 20 5 100 50 /Helvetica-Oblique 12 0.6 0.6 0.6 0.6 0.8 0.8 0.8 0.8 true false [(Paul Rutter)(Philips)(January, 1990)]()/Center false 0 0 0 0 0 3 [[0 11 0 ][0 7 1 ][0 13 2 ]]true false false false true 0.6 0.6 0.6 0.6 BL WH 0 0 0 10 DO $ /Button(#2)BO 215 200 20 20 /Times-Roman 18 BL WH true false 0 (PushButton)10 14 /Drawing BD MX 0 0 16 16 false BL false WH 1 DR [ MX 0 0 16 16 false BL false WH 1 DR [ MX 0 8 8 8 true BL false WH 1 0 LI MX 0 4 12 12 true BL false WH 1 0 LI MX 4 0 12 12 true BL false WH 1 0 LI MX 8 0 8 8 true BL false WH 1 0 LI MX 4 4 8 8 true BL false WH 1 0 LI ] ME ] ME ED DO /Action { NIL /CloseStack MyStack Send } def $ /Button(#7)BO 215 200 20 20 /Times-Roman 18 BL WH true false 0 (PushButton)10 14 /Drawing BD MX 0 0 16 16 false BL false WH 1 DR [ 18 #g ] ME ED DO /Action { NIL /CloseStack MyStack Send } def $ /Button(#8)BO 80 65 20 25 /Times-Roman 18 BL WH true false 0 (PushButton)10 14 /Drawing BD MX 0 0 16 16 false BL false WH 1 DR [ 18 #g ] ME ED DO /Action { NIL /CloseStack MyStack Send } def $ ]DO $ ][]{closepath 64 0 moveto 0 1 0 1 0 1 curveto 0 1 0 1 48 149 curveto 96 297 96 297 228 297 curveto 360 297 360 297 332 221 curveto 304 145 304 145 224 141 curveto 144 137 144 137 152 165 curveto 160 193 160 193 200 193 curveto 240 193 240 193 248 217 curveto 256 241 256 241 228 241 curveto 200 241 200 241 164 121 curveto 128 1 128 1 64 1 curveto closepath closepath } DO /SaveStack { /SaveStack SuperDo NIL /OnOpen /Title Send } def $ HNEnd !Funky!Stuff! echo x - PexamplesHNButtons.stack cat >PexamplesHNButtons.stack <<'!Funky!Stuff!' % HyperNeWS data file, (c)1989 Turing Institute % creator: per 1.2 HNBegin /Stack(PexamplesHNButtons)BO DS (Thu 16 Nov 1989 12:46)(Tue 28 Nov 1989 16:16)573 -3 true false false true (per)null 5 8 BD MX 0 0 576 320 false BL false WH 1 DR [ MX 0 0 576 320 true BL true WH 1 [[0 224] [0 64] [96 320] [544 320] [576 160] [544 0] [96 0]] PO ] ME ED [/Card(#5)BO /BackGround(#0)BO [/Button(PreviousButton)BO 490 140 35 40 /Times-Roman 18 BL WH true false 0 (PreviousButton)10 14 /Drawing BD MX 0 0 32 36 false BL false WH 1 DR [ MX 0 0 32 36 false BL false WH 1 DR [ MX 0 0 32 32 false BL true 0.511 0.511 0.511 0.511 1 [[24 32] [24 24] [32 24] [32 8] [24 8] [24 0] [0 16]] PO MX 0 4 32 32 true BL true WH 1 [[24 32] [24 24] [32 24] [32 8] [24 8] [24 0] [0 16]] PO ] ME ] ME ED DO /Action { NIL /GoPreviousCard ParentSend } def $ /Button(NextButton)BO 530 140 35 40 /Times-Roman 18 BL WH true false 0 (NextButton)10 14 /Drawing BD MX 0 0 32 36 false BL false WH 1 DR [ MX 0 0 32 36 false BL false WH 1 DR [ MX 0 0 32 32 false BL true 0.511 0.511 0.511 0.511 1 [[0 24] [8 24] [8 32] [32 16] [8 0] [8 8] [0 8]] PO MX 0 4 32 32 true BL true WH 1 [[0 24] [8 24] [8 32] [32 16] [8 0] [8 8] [0 8]] PO ] ME ] ME ED DO /Action { NIL /GoNextCard ParentSend } def $ ]DO $ [/Button(#28)BO 90 60 45 45 /Times-Roman 18 BL WH true false 0 (Button)10 14 /Drawing BD MX 0 0 40 40 false BL false WH 1 DR [ MX 0 0 40 40 false BL false WH 1 DR [ MX 4 0 32 20 true BL true WH 1 RE MX 0 20 40 20 true BL true 0.742 0.742 0.742 0.742 1 [[0 0] [40 0] [28 20] [12 20]] PO MX 8 0 4 12 true BL true BL 1 RE MX 20 8 12 4 true BL true 0.613 0.613 0.613 0.613 1 RE ] ME ] ME ED DO /Action { NIL /GoHomeCard ParentSend } def $ /Button(#29)BO 145 20 30 30 /Times-Roman 18 BL WH true false 0 (Button)10 14 /Drawing BD MX 0 0 24 24 false BL false WH 1 DR [ 0.6 0 0 0.6 0 0 40 40 false BL false WH 1 DR [ 18 #g 19 #g 20 #g 21 #g ] ME ] ME ED DO /Action { NIL /GoHomeCard ParentSend } def $ /Button(#38)BO 560 -1 20 20 /Times-Roman 18 BL WH true false 0 ()10 14 /Drawing BD MX 0 0 16 16 false BL false WH 1 DR [ MX 0 0 16 16 true BL true 1 0.5 0.56 1 1 [[0 0] [16 0] [16 0] [16 16] [8 16] [8 8] [0 8]] PO ] ME ED DO /OnMouse { /OnSizeObj MyStack QuickSend } def /OnStackSize { null -1 -3 null Position } def $ /Button(#6)BO 560 -1 20 20 /Times-Roman 18 BL WH true false 0 ()10 14 /Drawing BD MX 0 0 16 16 false BL false WH 1 DR [ 27 #g ] ME ED DO /OnMouse { /OnSizeObj MyStack QuickSend } def /OnStackSize { null -1 -3 null Position } def $ /Button(ReadyButton)BO 281 20 130 25 /Helvetica 18 BL 0.8 0.8 0.8 0.8 true false 0 (HideStack)0 14 /Push null DO /Action { MyStack HideStack } def $ /Button(CheckBox)BO 105 210 100 25 /Times-Roman 18 BL WH true false 0 (CheckBox)10 14 /Check null DO /Action { Value 0 ne { SysBeep } if } def $ /Button(#7)BO 60 130 230 50 /Times-Roman 32 0.5 0.5 0.5 0.5 0.7 0.7 0.7 0.7 true false 1 (Big CheckBox)10 30 /Check null DO /Action { Value 0 ne { SysBeep } if } def $ /Button(#36)BO 325 75 100 25 /Times-Roman 18 BL WH true false 0 (GoLastCard)10 14 /Push null DO /Action { NIL /GoLastCard ParentSend } def $ /Button(#11)BO 330 145 105 30 /Times-Roman 18 BL WH true false 0 (Beep Button)10 14 /Push null DO /Action { SysBeep } def $ /PullDown(#8)BO 245 225 160 35 /Helvetica-Oblique 14 WH 0.5 0.5 0.5 0.5 true false [(This one is a)(PullDown)(Menu,)(Not)(a)(button.)(-)(Last Choice.)](This one is a)5 0.3 0.3 0.3 0.3 true DO $ ]DO $ ][/Button(#2)BO 5 142 20 20 /Times-Roman 18 BL WH true false 0 (PushButton)10 14 /Drawing BD MX 0 0 16 16 false BL false WH 1 DR [ MX 0 0 16 16 false BL false WH 1 DR [ MX 0 8 8 8 true BL false WH 1 0 LI MX 0 4 12 12 true BL false WH 1 0 LI MX 4 0 12 12 true BL false WH 1 0 LI MX 8 0 8 8 true BL false WH 1 0 LI MX 4 4 8 8 true BL false WH 1 0 LI ] ME ] ME ED DO /Action { NIL /CloseStack MyStack Send } def $ /EditText(Title)BO 365 290 175 25 /Helvetica-BoldOblique 16 0.7 0.7 0.7 0.7 WH true false [(PexamplesHNButtons)]()/Left false 0 0 0 0 0 1 [[0 18 0 ]]true false false false false 0.6 0.6 0.6 0.6 BL 1 0.72 0.65 1 0 0 0 10 DO /OnOpen { MyStack /ObjectName get 32 string cvs SetValue } def $ ]{0 225 moveto 0 65 lineto 96 321 lineto 545 321 lineto 577 161 lineto 545 0 lineto 96 0 lineto 0 225 lineto closepath closepath } DO /SaveStack { /SaveStack SuperDo NIL /OnOpen /Title Send } def $ HNEnd !Funky!Stuff! echo x - PexamplesHNSliders.stack cat >PexamplesHNSliders.stack <<'!Funky!Stuff!' % HyperNeWS data file, (c)1989 Turing Institute % creator: per 1.2 HNBegin /Stack(PexamplesHNSliders)BO DS (Thu 16 Nov 1989 13:08)(Thu 16 Nov 1989 14:42)251 -3 true false false true (per)null 5 7 BD MX 0 0 256 736 false BL false WH 1 DR [ MX 0 0 256 736 false BL false WH 1 DR [ MX 0 0 256 736 true BL true 0.8065 0.8065 0.8065 0.8065 1 RE MX 1 480 255 255 false BL true 0.6774 0.6774 0.6774 0.6774 1 RE ] ME ] ME ED [/Card(#5)BO /BackGround(#0)BO [/Slider(#7)BO 5 25 250 110 /Times-Roman 18 0.5 0.5 0.5 0.5 0.8 0.8 0.8 0.8 true false 41 ()false false false true 10 100 WH WH /Scroll DO $ ]DO $ [/Slider(ScrollBar)BO 35 530 20 180 /Times-Roman 18 BL WH true false 90 ()true true true true 10 100 BL 0.7 0.7 0.7 0.7 /Scroll DO $ /Slider(#15)BO 80 530 20 180 /Times-Roman 18 BL BL true false 54 ()false false true true 10 100 WH 0.7 0.7 0.7 0.7 /Scroll DO $ /Slider(#16)BO 135 530 20 180 /Times-Roman 18 BL 0.7 0.7 0.7 0.7 true false 27 ()true true true true 10 100 WH 0.7 0.7 0.7 0.7 /Scroll DO $ /Slider(#6)BO 195 530 20 180 /Times-Roman 18 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 true false 43 ()true false true true 10 100 WH 0.7 0.7 0.7 0.7 /Scroll DO $ /Slider(#19)BO 182 185 25 180 /Times-Roman 18 BL WH true false 94 ()true false true true 0 100 BL 0.7 0.7 0.7 0.7 /Bar DO $ /Slider(#17)BO 117 185 25 180 /Times-Roman 18 BL WH true false 65 ()false true true true 0 100 BL 0.7 0.7 0.7 0.7 /Bar DO $ /Slider(ValueSlider)BO 52 185 25 180 /Times-Roman 18 BL WH true false 33 ()true true true true 0 100 BL 0.7 0.7 0.7 0.7 /Bar DO $ ]DO $ ][/Button(#2)BO 227 474 20 20 /Times-Roman 18 BL WH true false 0 (PushButton)10 14 /Drawing BD MX 0 0 16 16 false BL false WH 1 DR [ MX 0 0 16 16 false BL false WH 1 DR [ MX 0 8 8 8 true BL false WH 1 0 LI MX 0 4 12 12 true BL false WH 1 0 LI MX 4 0 12 12 true BL false WH 1 0 LI MX 8 0 8 8 true BL false WH 1 0 LI MX 4 4 8 8 true BL false WH 1 0 LI ] ME ] ME ED DO /Action { NIL /CloseStack MyStack Send } def $ /EditText(Title)BO 25 465 190 30 /Helvetica-BoldOblique 18 0.9355 0.9355 0.9355 0.9355 0.8 0.8 0.8 0.8 true false [(PexamplesHNSliders)]()/Center false 0 0 0 0 0 1 [[0 18 0 ]]true false false false true 0.6 0.6 0.6 0.6 BL 1 0.72 0.65 1 0 0 0 10 DO /OnOpen { MyStack /ObjectName get 32 string cvs SetValue } def $ ]{closepath 0 0 moveto 0 737 lineto 257 737 lineto 257 0 lineto closepath closepath 1 481 moveto 1 736 lineto 257 736 lineto 257 481 lineto closepath closepath } DO /SaveStack { /SaveStack SuperDo NIL /OnOpen /Title Send } def $ HNEnd !Funky!Stuff! echo x - PexamplesHNText.stack cat >PexamplesHNText.stack <<'!Funky!Stuff!' % HyperNeWS data file, (c)1989 Turing Institute % creator: per 1.2 HNBegin /Stack(PexamplesHNText)BO DS (Thu 16 Nov 1989 14:05)(Wed 18 Apr 1990 10:28)569 285 true false false true (per)/EditText(#30)BO 180 75 220 100 /Helvetica 18 BL 0.896 0.896 0.896 1 true true [(Editable text,)( scrollable,)( Initialized by OnOpen)(Script)(1)(2)(3)(END.)]()/Left true 0 0 0 0 0 4 [[0 14 0 ][0 12 1 ][0 23 2 ][0 6 3 ][0 1 4 ][0 1 5 ][0 1 6 ][0 4 7 ]]true false true true false 0.596 0.596 0.596 0.596 BL WH 0 4 0 10 DO /OnOpen { [ (Editable text,\n scrollable,\n Initialized by OnOpen\nScript\n1\n2\n3\nEND.) ] /SetValue Self Send 0 SetEditTop } def $ 5 7 BD MX 0 0 576 608 false BL false WH 1 DR [ MX 0 0 576 608 true BL true 0.9032 0.9032 0.9032 0.9032 1 [[0 608] [0 608] [576 608] [576 384] [416 384] [416 0] [160 0] [160 384] [0 384]] PO ] ME ED [/Card(#5)BO /BackGround(#0)BO []DO $ [/Button(#40)BO 264 400 55 45 /Times-Roman 18 BL WH true false 0 (Button)10 14 /Drawing BD MX 0 0 49 39.998 false BL false WH 1 DR [ MX 0 0 49 39.998 false BL false WH 1 DR [ 0.5 0 0 0.435 25 39.998 48 -40 true BL false WH 4 0 AR 0.5 0 0 0.435 25 39.998 -50 -39.0819 true BL false WH 4 0 AR 0.5 0 0 0.435 23 8.695 52 32 true BL false WH 4 0 AR 0.5 0 0 0.435 15.001 9.434 -30 32.1859 true BL false WH 4 0 AR 0.5 0 0 0.435 7.001 0 32 20 true BL false WH 4 0 AR 0.5 0 0 0.435 7.001 0 16 20.691 true BL false WH 4 0 AR ] ME ] ME ED DO /Action { [] /Show /HNTextPopText Send } def $ /EditText(#26)BO 45 545 110 25 /Times-Roman 18 BL 0.896 0.896 0.896 1 true false [(Static Text)]()/Left false 0 0 0 0 0 1 [[0 11 0 ]]true false false false true 0.6 0.6 0.6 0.6 BL WH 0 0 0 10 DO $ /EditText(#27)BO 20 485 145 30 /Times-Roman 18 0.3 0.3 0.3 0.3 0.7 0.7 0.7 0.7 true false [(Static Text, Boxed)]()/Left false 0 0 0 0 0 1 [[0 18 0 ]]true false false true false 0.6 0.6 0.6 0.6 BL WH 0 0 0 10 DO $ /EditText(#29)BO 25 415 210 30 /Times-Roman 18 WH BL true false [(Static Text, White on Black)]()/Left false 0 0 0 0 0 1 [[0 27 0 ]]true false false false false 0.6 0.6 0.6 0.6 BL WH 0 0 0 10 DO $ /EditText(EditText)BO 180 235 220 55 /Helvetica 18 BL 0.896 0.896 0.896 1 true false [(Editable text,)( Initialized by OnOpen)]()/Left false 0 0 0 0 0 2 [[0 14 0 ][0 22 1 ]]true false true true false 0.596 0.596 0.596 0.596 BL WH 0 -4 -4 10 DO /OnOpen { [ (Editable text,\n Initialized by OnOpen) ] /SetValue Self Send } def $ 1 #g /PullDown(FontSelector)BO 215 500 140 25 /Times-Roman 18 BL WH true false [(Helvetica)(Helvetica-Oblique)(Helvetica-Bold)(Helvetica-BoldOblique)(-)(Times-Roman)(Times-Bold)(Times-Italic)(Times-BoldItalic)(-)(Courier)(Courier-Bold)(Courier-Oblique)(Courier-BoldOblique)(-)(Symbol)(Screen)](Times-BoldItalic)0 0.4 0.4 0.4 0.4 true DO $ /EditText(#6)BO 415 490 100 20 /Times-BoldItalic 12 WH 0.5 0.5 0.5 0.5 true false [(Small Static Text)]()/Left false 0 0 0 0 0 1 [[0 17 0 ]]true false false false true 0.6 0.6 0.6 0.6 BL WH 0 0 0 10 DO $ /EditText(#7)BO 320 420 220 35 /Times-BoldItalic 24 0.9355 0.9355 0.9355 0.9355 0.9355 0.9355 0.9355 0.9355 true false [(Unreadable Text)]()/Center false 0 0 0 0 0 1 [[0 15 0 ]]true false false false true 0.6 0.6 0.6 0.6 BL WH 0 0 0 10 DO $ /EditText(HNTextPopText)BO 20 415 530 150 /Helvetica-Oblique 24 BL 0.896 0.896 0.896 1 true false [(HyperNews provides a nice set of options for text, some of which are demonstrated here.)()(One can set the color for stroke and fill to achieve various effects.)]()/Center false 0 0 0 0 0 5 [[0 51 0 ][51 36 0 ][0 0 1 ][0 53 2 ][53 16 2 ]]true false false true false 0.6 0.6 0.6 0.6 BL WH 0 0 0 10 DO /Action { Hide } def /OnOpen { Hide } def $ ]DO $ ][/Button(#2)BO 545 579 20 20 /Times-Roman 18 BL WH true false 0 (PushButton)10 14 /Drawing BD MX 0 0 16 16 false BL false WH 1 DR [ MX 0 0 16 16 false BL false WH 1 DR [ MX 0 8 8 8 true BL false WH 1 0 LI MX 0 4 12 12 true BL false WH 1 0 LI MX 4 0 12 12 true BL false WH 1 0 LI MX 8 0 8 8 true BL false WH 1 0 LI MX 4 4 8 8 true BL false WH 1 0 LI ] ME ] ME ED DO /Action { NIL /CloseStack MyStack Send } def $ /EditText(Title)BO 210 580 150 25 /Helvetica-BoldOblique 16 WH 0.9 0.9 0.9 0.9 true false [(PexamplesHNText)]()/Left false 0 0 0 0 0 1 [[0 15 0 ]]true false false false false 0.6 0.6 0.6 0.6 BL 1 0.72 0.65 1 0 0 0 10 DO /OnOpen { MyStack /ObjectName get 32 string cvs SetValue } def $ ]{0 609 moveto 0 609 lineto 577 609 lineto 577 384 lineto 417 384 lineto 417 0 lineto 160 0 lineto 160 384 lineto 0 384 lineto 0 609 lineto closepath closepath } DO /SaveStack { /SaveStack SuperDo NIL /OnOpen /Title Send } def $ HNEnd !Funky!Stuff! echo x - PexamplesIntro.stack cat >PexamplesIntro.stack <<'!Funky!Stuff!' % HyperNeWS data file, (c)1989 Turing Institute % creator: per 1.2 HNBegin /Stack(PexamplesIntro)BO DS (Wed 15 Nov 1989 16:46)(Wed 18 Apr 1990 11:09)510 503 true false false true (per)null 5 9 BD MX 0 0 636 392 false BL false WH 1 DR [ MX 0 0 636 392 true BL true 0.2258 0.2258 0.2258 0.2258 1 RE MX 12 8 616 376 true BL true 0.2258 0.2258 0.2258 0.2258 1 /Palatino-Italic /Left [(Intro)] TE ] ME ED [/Card(#5)BO /BackGround(#0)BO []DO $ [/EditText(StaticText)BO From don Fri Apr 20 10:35:58 1990 Date: Fri, 20 Apr 90 10:35:58 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: Mac Postscript Preview with OpenWindows? From: lorelei.Eng.Sun.COM!lemay@sun.com (Laura Lemay) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) In article <1214@ndcheg.cheg.nd.edu> kellow@ndcheg.cheg.nd.edu (John Kellow) writes: > Is it possible to preview Macintosh postscript output (created with > LaserWriter 6.0) using pageview under OpenWindows? So far I > haven't had any luck. I've tried dumping the Mac output to a file > with command-K (which includes the AppleDict or whatever its called) You've done the right things. Unfortunately, there are some basic differences in fonts between LaserWriter postscript (i.e, Adobe) and NeWS postscript. OW uses folio fonts, our own technology, which in my opinion, is nicer. However, the macintosh laser prep assumes the existence of Adobe fonts. More specifically, it assumes the existance of the CharStrings array in the font dictionaries, which contain the character descriptions in Adobe-encoded format. Folio fonts don't even have this array -- they use different methods. Since pageview obviously uses the folio font formats to preview postscript, the code from the macintosh won't work, regardless of how you try and do it. (I've tried. Believe me, I've tried.) The Macintosh isn't the only culprit, however. There are many programs out there using postscript that assumes the existence of CharStrings. I have cross-posted this message to comp.lang.postscript to point this out -- if you make use of CharStrings, you will not be NeWS compatible. Don't do it. This has been filed as a bug in OpenWindows. But don't hold your breath. The above are my opinions to the best of my knowledge. Please don't fire me! :-) ********************************************************* Laura Lemay lemay@sun.com Redhead. Drummer. Geek. sun!lemay ********************************************************* From don Fri Apr 20 10:36:19 1990 Date: Fri, 20 Apr 90 10:36:19 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: HELP! Bug in NeWS 1.1 From: haven!ncifcrf!toms@ames.arc.nasa.gov (Tom Schneider) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) In article <134524@sun.Eng.Sun.COM> naughton@wind.Eng.Sun.COM (Patrick Naughton) writes: >This is fixed in OpenWindows... (code followed) Patrick's program WORKED on NeWS 1.1! So something is subtly different between the two programs... Tom From don Fri Apr 20 14:05:29 1990 Date: Fri, 20 Apr 90 14:05:29 -0400 To: NeWS-makers@brillig.umd.edu Subject: example stacks for HyperNeWS (long shar file) From: per@derek.Philips.Com (Paul E. Rutter) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) [I am resending this message to the NeWS-makers mailing list, because my original attempt seems to have gotten truncated. -Don] # The rest of this file is a shell script which will extract: # README Pexamples.stack PexamplesHNButtons.stack PexamplesHNSliders.stack PexamplesHNText.stack PexamplesIntro.stack PexamplesMultiShapes.stack PexamplesParentScripts.stack PexamplesScripts.stack PexamplesShapes.stack # Suggested restore procedure: # Edit off anything above these comment lines, # save this file in an empty directory, # then say: sh < file echo x - README cat >README <<'!Funky!Stuff!' These HyperNeWS stacks contain some examples of HyperNeWS objects, and how to tie them together with simple scripts. I hope you find them useful (especially if you are new to HyperNeWS). These stacks have been tested on both Sun3 and SparcStation hardware, using HyperNeWS 1.3 under OpenWindows 1.0. They should also work under earlier and later versions of both HyperNeWS and xnews, but there are no guarantees. After unsharing these stacks, put them in your HyperNeWS "Stacks" directory, and start by opening the "Pexamples.stack" stack. Paul Rutter Philips Labs per@philabs.philips.com philabs!per@uunet !Funky!Stuff! echo x - Pexamples.stack cat >Pexamples.stack <<'!Funky!Stuff!' % HyperNeWS data file, (c)1989 Turing Institute % creator: per 1.2 HNBegin /Stack(Pexamples)BO DS (Thu 30 Nov 1989 13:20)(Wed 18 Apr 1990 10:47)0 591 true false false true (per)null 5 8 BD MX 0 0 360 296 false BL false WH 1 DR [ MX 0 0 360 296 false BL false WH 1 DR [ MX 0 0 360 296 false BL true 0.7419 0.7419 0.7419 0.7419 1 [[0 0] [0 0] [96 296] [360 296] [304 144] [144 136] [160 192] [240 192] [256 240] [200 240] [128 0]] SP ] ME ] ME ED [/Card(#5)BO /BackGround(#0)BO []DO $ [/EditText(Title)BO 110 255 100 30 /Helvetica-BoldOblique 18 WH 0.8 0.8 0.8 0.8 true false [(Pexamples)]()/Center false 0 0 0 0 0 1 [[0 9 0 ]]true false false false true 0.6 0.6 0.6 0.6 BL 1 0.72 0.65 1 0 0 0 10 DO /OnOpen { MyStack /ObjectName get 32 string cvs SetValue } def $ /Button(IntroButton)BO 215 255 120 30 /Times-BoldItalic 18 BL 0.8 0.8 0.8 0.8 true false 0 (Click Me First)10 14 /Push null DO /Action { /PexamplesIntro ShowStack } def $ /Button(#13)BO 265 225 60 20 /Times-Roman 12 BL 0.7 0.7 0.7 0.7 true false 0 (HN Text)5 14 /Push null DO /Action { /PexamplesHNText ShowStack } def $ /Button(HNSlidersButton)BO 250 190 65 20 /Times-Roman 12 BL 0.7 0.7 0.7 0.7 true false 0 (HN Sliders)5 14 /Push null DO /Action { /PexamplesHNSliders ShowStack } def $ /Button(HNButtonsButton)BO 220 155 70 20 /Times-Roman 12 BL 0.7 0.7 0.7 0.7 true false 0 (HN Buttons)5 14 /Push null DO /Action { /PexamplesHNButtons ShowStack } def $ /Button(ShapesButton)BO 95 225 100 25 /Times-BoldItalic 18 BL 0.8 0.8 0.8 0.8 true false 0 (Shapes)10 14 /Push null DO /Action { /PexamplesShapes ShowStack } def $ /Button(MultiButton)BO 75 185 105 25 /Times-BoldItalic 18 BL 0.8 0.8 0.8 0.8 true false 0 (MultiShapes)10 14 /Push null DO /Action { /PexamplesMultiShapes ShowStack } def $ /Button(ScriptsButton)BO 65 145 105 25 /Times-BoldItalic 18 BL 0.8 0.8 0.8 0.8 true false 0 (Scripts)5 14 /Push null DO /Action { /PexamplesScripts ShowStack } def $ /Button(#14)BO 45 105 110 25 /Times-BoldItalic 18 BL 0.8 0.8 0.8 0.8 true false 0 (ParentScripts)5 14 /Push null DO /Action { /PexamplesParentScripts ShowStack } def $ /EditText(#6)BO 20 5 100 50 /Helvetica-Oblique 12 0.6 0.6 0.6 0.6 0.8 0.8 0.8 0.8 true false [(Paul Rutter)(Philips)(January, 1990)]()/Center false 0 0 0 0 0 3 [[0 11 0 ][0 7 1 ][0 13 2 ]]true false false false true 0.6 0.6 0.6 0.6 BL WH 0 0 0 10 DO $ /Button(#2)BO 215 200 20 20 /Times-Roman 18 BL WH true false 0 (PushButton)10 14 /Drawing BD MX 0 0 16 16 false BL false WH 1 DR [ MX 0 0 16 16 false BL false WH 1 DR [ MX 0 8 8 8 true BL false WH 1 0 LI MX 0 4 12 12 true BL false WH 1 0 LI MX 4 0 12 12 true BL false WH 1 0 LI MX 8 0 8 8 true BL false WH 1 0 LI MX 4 4 8 8 true BL false WH 1 0 LI ] ME ] ME ED DO /Action { NIL /CloseStack MyStack Send } def $ /Button(#7)BO 215 200 20 20 /Times-Roman 18 BL WH true false 0 (PushButton)10 14 /Drawing BD MX 0 0 16 16 false BL false WH 1 DR [ 18 #g ] ME ED DO /Action { NIL /CloseStack MyStack Send } def $ /Button(#8)BO 80 65 20 25 /Times-Roman 18 BL WH true false 0 (PushButton)10 14 /Drawing BD MX 0 0 16 16 false BL false WH 1 DR [ 18 #g ] ME ED DO /Action { NIL /CloseStack MyStack Send } def $ ]DO $ ][]{closepath 64 0 moveto 0 1 0 1 0 1 curveto 0 1 0 1 48 149 curveto 96 297 96 297 228 297 curveto 360 297 360 297 332 221 curveto 304 145 304 145 224 141 curveto 144 137 144 137 152 165 curveto 160 193 160 193 200 193 curveto 240 193 240 193 248 217 curv eto 256 241 256 241 228 241 curveto 200 241 200 241 164 121 curveto 128 1 128 1 64 1 curveto closepath closepath } DO /SaveStack { /SaveStack SuperDo NIL /OnOpen /Title Send } def $ HNEnd !Funky!Stuff! echo x - PexamplesHNButtons.stack cat >PexamplesHNButtons.stack <<'!Funky!Stuff!' % HyperNeWS data file, (c)1989 Turing Institute % creator: per 1.2 HNBegin /Stack(PexamplesHNButtons)BO DS (Thu 16 Nov 1989 12:46)(Tue 28 Nov 1989 16:16)573 -3 true false false true (per)null 5 8 BD MX 0 0 576 320 false BL false WH 1 DR [ MX 0 0 576 320 true BL true WH 1 [[0 224] [0 64] [96 320] [544 320] [576 160] [544 0] [96 0]] PO ] ME ED [/Card(#5)BO /BackGround(#0)BO [/Button(PreviousButton)BO 490 140 35 40 /Times-Roman 18 BL WH true false 0 (PreviousButton)10 14 /Drawing BD MX 0 0 32 36 false BL false WH 1 DR [ MX 0 0 32 36 false BL false WH 1 DR [ MX 0 0 32 32 false BL true 0.511 0.511 0.511 0.511 1 [[24 32] [24 24] [32 24] [32 8] [24 8] [24 0] [0 16]] PO MX 0 4 32 32 true BL true WH 1 [[24 32] [24 24] [32 24] [32 8] [24 8] [24 0] [0 16]] PO ] ME ] ME ED DO /Action { NIL /GoPreviousCard ParentSend } def $ /Button(NextButton)BO 530 140 35 40 /Times-Roman 18 BL WH true false 0 (NextButton)10 14 /Drawing BD MX 0 0 32 36 false BL false WH 1 DR [ MX 0 0 32 36 false BL false WH 1 DR [ MX 0 0 32 32 false BL true 0.511 0.511 0.511 0.511 1 [[0 24] [8 24] [8 32] [32 16] [8 0] [8 8] [0 8]] PO MX 0 4 32 32 true BL true WH 1 [[0 24] [8 24] [8 32] [32 16] [8 0] [8 8] [0 8]] PO ] ME ] ME ED DO /Action { NIL /GoNextCard ParentSend } def $ ]DO $ [/Button(#28)BO 90 60 45 45 /Times-Roman 18 BL WH true false 0 (Button)10 14 /Drawing BD MX 0 0 40 40 false BL false WH 1 DR [ MX 0 0 40 40 false BL false WH 1 DR [ MX 4 0 32 20 true BL true WH 1 RE MX 0 20 40 20 true BL true 0.742 0.742 0.742 0.742 1 [[0 0] [40 0] [28 20] [12 20]] PO MX 8 0 4 12 true BL true BL 1 RE MX 20 8 12 4 true BL true 0.613 0.613 0.613 0.613 1 RE ] ME ] ME ED DO /Action { NIL /GoHomeCard ParentSend } def $ /Button(#29)BO 145 20 30 30 /Times-Roman 18 BL WH true false 0 (Button)10 14 /Drawing BD MX 0 0 24 24 false BL false WH 1 DR [ 0.6 0 0 0.6 0 0 40 40 false BL false WH 1 DR [ 18 #g 19 #g 20 #g 21 #g ] ME ] ME ED DO /Action { NIL /GoHomeCard ParentSend } def $ /Button(#38)BO 560 -1 20 20 /Times-Roman 18 BL WH true false 0 ()10 14 /Drawing BD MX 0 0 16 16 false BL false WH 1 DR [ MX 0 0 16 16 true BL true 1 0.5 0.56 1 1 [[0 0] [16 0] [16 0] [16 16] [8 16] [8 8] [0 8]] PO ] ME ED DO /OnMouse { /OnSizeObj MyStack QuickSend } def /OnStackSize { null -1 -3 null Position } def $ /Button(#6)BO 560 -1 20 20 /Times-Roman 18 BL WH true false 0 ()10 14 /Drawing BD MX 0 0 16 16 false BL false WH 1 DR [ 27 #g ] ME ED DO /OnMouse { /OnSizeObj MyStack QuickSend } def /OnStackSize { null -1 -3 null Position } def $ /Button(ReadyButton)BO 281 20 130 25 /Helvetica 18 BL 0.8 0.8 0.8 0.8 true false 0 (HideStack)0 14 /Push null DO /Action { MyStack HideStack } def $ /Button(CheckBox)BO 105 210 100 25 /Times-Roman 18 BL WH true false 0 (CheckBox)10 14 /Check null DO /Action { Value 0 ne { SysBeep } if } def $ /Button(#7)BO 60 130 230 50 /Times-Roman 32 0.5 0.5 0.5 0.5 0.7 0.7 0.7 0.7 true false 1 (Big CheckBox)10 30 /Check null DO /Action { Value 0 ne { SysBeep } if } def $ /Button(#36)BO 325 75 100 25 /Times-Roman 18 BL WH true false 0 (GoLastCard)10 14 /Push null DO /Action { NIL /GoLastCard ParentSend } def $ /Button(#11)BO 330 145 105 30 /Times-Roman 18 BL WH true false 0 (Beep Button)10 14 /Push null DO /Action { SysBeep } def $ /PullDown(#8)BO 245 225 160 35 /Helvetica-Oblique 14 WH 0.5 0.5 0.5 0.5 true false [(This one is a)(PullDown)(Menu,)(Not)(a)(button.)(-)(Last Choice.)](This one is a)5 0.3 0.3 0.3 0.3 true DO $ ]DO $ ][/Button(#2)BO 5 142 20 20 /Times-Roman 18 BL WH true false 0 (PushButton)10 14 /Drawing BD MX 0 0 16 16 false BL false WH 1 DR [ MX 0 0 16 16 false BL false WH 1 DR [ MX 0 8 8 8 true BL false WH 1 0 LI MX 0 4 12 12 true BL false WH 1 0 LI MX 4 0 12 12 true BL false WH 1 0 LI MX 8 0 8 8 true BL false WH 1 0 LI MX 4 4 8 8 true BL false WH 1 0 LI ] ME ] ME ED DO /Action { NIL /CloseStack MyStack Send } def $ /EditText(Title)BO 365 290 175 25 /Helvetica-BoldOblique 16 0.7 0.7 0.7 0.7 WH true false [(PexamplesHNButtons)]()/Left false 0 0 0 0 0 1 [[0 18 0 ]]true false false false false 0.6 0.6 0.6 0.6 BL 1 0.72 0.65 1 0 0 0 10 DO /OnOpen { MyStack /ObjectName get 32 string cvs SetValue } def $ ]{0 225 moveto 0 65 lineto 96 321 lineto 545 321 lineto 577 161 lineto 545 0 lineto 96 0 lineto 0 225 lineto closepath closepath } DO /SaveStack { /SaveStack SuperDo NIL /OnOpen /Title Send } def $ HNEnd !Funky!Stuff! echo x - PexamplesHNSliders.stack cat >PexamplesHNSliders.stack <<'!Funky!Stuff!' % HyperNeWS data file, (c)1989 Turing Institute % creator: per 1.2 HNBegin /Stack(PexamplesHNSliders)BO DS (Thu 16 Nov 1989 13:08)(Thu 16 Nov 1989 14:42)251 -3 true false false true (per)null 5 7 BD MX 0 0 256 736 false BL false WH 1 DR [ MX 0 0 256 736 false BL false WH 1 DR [ MX 0 0 256 736 true BL true 0.8065 0.8065 0.8065 0.8065 1 RE MX 1 480 255 255 false BL true 0.6774 0.6774 0.6774 0.6774 1 RE ] ME ] ME ED [/Card(#5)BO /BackGround(#0)BO [/Slider(#7)BO 5 25 250 110 /Times-Roman 18 0.5 0.5 0.5 0.5 0.8 0.8 0.8 0.8 true false 41 ()false false false true 10 100 WH WH /Scroll DO $ ]DO $ [/Slider(ScrollBar)BO 35 530 20 180 /Times-Roman 18 BL WH true false 90 ()true true true true 10 100 BL 0.7 0.7 0.7 0.7 /Scroll DO $ /Slider(#15)BO 80 530 20 180 /Times-Roman 18 BL BL true false 54 ()false false true true 10 100 WH 0.7 0.7 0.7 0.7 /Scroll DO $ /Slider(#16)BO 135 530 20 180 /Times-Roman 18 BL 0.7 0.7 0.7 0.7 true false 27 ()true true true true 10 100 WH 0.7 0.7 0.7 0.7 /Scroll DO $ /Slider(#6)BO 195 530 20 180 /Times-Roman 18 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 true false 43 ()true false true true 10 100 WH 0.7 0.7 0.7 0.7 /Scroll DO $ /Slider(#19)BO 182 185 25 180 /Times-Roman 18 BL WH true false 94 ()true false true true 0 100 BL 0.7 0.7 0.7 0.7 /Bar DO $ /Slider(#17)BO 117 185 25 180 /Times-Roman 18 BL WH true false 65 ()false true true true 0 100 BL 0.7 0.7 0.7 0.7 /Bar DO $ /Slider(ValueSlider)BO 52 185 25 180 /Times-Roman 18 BL WH true false 33 ()true true true true 0 100 BL 0.7 0.7 0.7 0.7 /Bar DO $ ]DO $ ][/Button(#2)BO 227 474 20 20 /Times-Roman 18 BL WH true false 0 (PushButton)10 14 /Drawing BD MX 0 0 16 16 false BL false WH 1 DR [ MX 0 0 16 16 false BL false WH 1 DR [ MX 0 8 8 8 true BL false WH 1 0 LI MX 0 4 12 12 true BL false WH 1 0 LI MX 4 0 12 12 true BL false WH 1 0 LI MX 8 0 8 8 true BL false WH 1 0 LI MX 4 4 8 8 true BL false WH 1 0 LI ] ME ] ME ED DO /Action { NIL /CloseStack MyStack Send } def $ /EditText(Title)BO 25 465 190 30 /Helvetica-BoldOblique 18 0.9355 0.9355 0.9355 0.9355 0.8 0.8 0.8 0.8 true false [(PexamplesHNSliders)]()/Center false 0 0 0 0 0 1 [[0 18 0 ]]true false false false true 0.6 0.6 0.6 0.6 BL 1 0.72 0.65 1 0 0 0 10 DO /OnOpen { MyStack /ObjectName get 32 string cvs SetValue } def $ ]{closepath 0 0 moveto 0 737 lineto 257 737 lineto 257 0 lineto closepath closepath 1 481 moveto 1 736 lineto 257 736 lineto 257 481 lineto closepath closepath } DO /SaveStack { /SaveStack SuperDo NIL /OnOpen /Title Send } def $ HNEnd !Funky!Stuff! echo x - PexamplesHNText.stack cat >PexamplesHNText.stack <<'!Funky!Stuff!' % HyperNeWS data file, (c)1989 Turing Institute % creator: per 1.2 HNBegin /Stack(PexamplesHNText)BO DS (Thu 16 Nov 1989 14:05)(Wed 18 Apr 1990 10:28)569 285 true false false true (per)/EditText(#30)BO 180 75 220 100 /Helvetica 18 BL 0.896 0.896 0.896 1 true true [(Editable text,)( scrollable,)( Initialized by OnOpen)(Script)(1)(2)(3)(END.)]()/Left true 0 0 0 0 0 4 [[0 14 0 ][0 12 1 ][0 23 2 ][0 6 3 ][0 1 4 ][0 1 5 ][0 1 6 ][0 4 7 ]]true false true tru e false 0.596 0.596 0.596 0.596 BL WH 0 4 0 10 DO /OnOpen { [ (Editable text,\n scrollable,\n Initialized by OnOpen\nScript\n1\n2\n3\nEND.) ] /SetValue Self Send 0 SetEditTop } def $ 5 7 BD MX 0 0 576 608 false BL false WH 1 DR [ MX 0 0 576 608 true BL true 0.9032 0.9032 0.9032 0.9032 1 [[0 608] [0 608] [576 608] [576 384] [416 384] [416 0] [160 0] [160 384] [0 384]] PO ] ME ED [/Card(#5)BO /BackGround(#0)BO []DO $ [/Button(#40)BO 264 400 55 45 /Times-Roman 18 BL WH true false 0 (Button)10 14 /Drawing BD MX 0 0 49 39.998 false BL false WH 1 DR [ MX 0 0 49 39.998 false BL false WH 1 DR [ 0.5 0 0 0.435 25 39.998 48 -40 true BL false WH 4 0 AR 0.5 0 0 0.435 25 39.998 -50 -39.0819 true BL false WH 4 0 AR 0.5 0 0 0.435 23 8.695 52 32 true BL false WH 4 0 AR 0.5 0 0 0.435 15.001 9.434 -30 32.1859 true BL false WH 4 0 AR 0.5 0 0 0.435 7.001 0 32 20 true BL false WH 4 0 AR 0.5 0 0 0.435 7.001 0 16 20.691 true BL false WH 4 0 AR ] ME ] ME ED DO /Action { [] /Show /HNTextPopText Send } def $ /EditText(#26)BO 45 545 110 25 /Times-Roman 18 BL 0.896 0.896 0.896 1 true false [(Static Text)]()/Left false 0 0 0 0 0 1 [[0 11 0 ]]true false false false true 0.6 0.6 0.6 0.6 BL WH 0 0 0 10 DO $ /EditText(#27)BO 20 485 145 30 /Times-Roman 18 0.3 0.3 0.3 0.3 0.7 0.7 0.7 0.7 true false [(Static Text, Boxed)]()/Left false 0 0 0 0 0 1 [[0 18 0 ]]true false false true false 0.6 0.6 0.6 0.6 BL WH 0 0 0 10 DO $ /EditText(#29)BO 25 415 210 30 /Times-Roman 18 WH BL true false [(Static Text, White on Black)]()/Left false 0 0 0 0 0 1 [[0 27 0 ]]true false false false false 0.6 0.6 0.6 0.6 BL WH 0 0 0 10 DO $ /EditText(EditText)BO 180 235 220 55 /Helvetica 18 BL 0.896 0.896 0.896 1 true false [(Editable text,)( Initialized by OnOpen)]()/Left false 0 0 0 0 0 2 [[0 14 0 ][0 22 1 ]]true false true true false 0.596 0.596 0.596 0.596 BL WH 0 -4 -4 10 DO /OnOpen { [ (Editable text,\n Initialized by OnOpen) ] /SetValue Self Send } def $ 1 #g /PullDown(FontSelector)BO 215 500 140 25 /Times-Roman 18 BL WH true false [(Helvetica)(Helvetica-Oblique)(Helvetica-Bold)(Helvetica-BoldOblique)(-)(Times-Roman)(Times-Bold)(Times-Italic)(Times-BoldItalic)(-)(Courier)(Courier-Bold)(Courier-Oblique)(Courier-BoldOblique)(-)(Symbol)(S creen)](Times-BoldItalic)0 0.4 0.4 0.4 0.4 true DO $ /EditText(#6)BO 415 490 100 20 /Times-BoldItalic 12 WH 0.5 0.5 0.5 0.5 true false [(Small Static Text)]()/Left false 0 0 0 0 0 1 [[0 17 0 ]]true false false false true 0.6 0.6 0.6 0.6 BL WH 0 0 0 10 DO $ /EditText(#7)BO 320 420 220 35 /Times-BoldItalic 24 0.9355 0.9355 0.9355 0.9355 0.9355 0.9355 0.9355 0.9355 true false [(Unreadable Text)]()/Center false 0 0 0 0 0 1 [[0 15 0 ]]true false false false true 0.6 0.6 0.6 0.6 BL WH 0 0 0 10 DO $ /EditText(HNTextPopText)BO 20 415 530 150 /Helvetica-Oblique 24 BL 0.896 0.896 0.896 1 true false [(HyperNews provides a nice set of options for text, some of which are demonstrated here.)()(One can set the color for stroke and fill to achieve various effects.)]()/Center false 0 0 0 0 0 5 [[0 51 0 ][51 36 0 ][0 0 1 ][0 53 2 ][53 16 2 ]]true false false true false 0.6 0.6 0.6 0.6 BL WH 0 0 0 10 DO /Action { Hide } def /OnOpen { Hide } def $ ]DO $ ][/Button(#2)BO 545 579 20 20 /Times-Roman 18 BL WH true false 0 (PushButton)10 14 /Drawing BD MX 0 0 16 16 false BL false WH 1 DR [ MX 0 0 16 16 false BL false WH 1 DR [ MX 0 8 8 8 true BL false WH 1 0 LI MX 0 4 12 12 true BL false WH 1 0 LI MX 4 0 12 12 true BL false WH 1 0 LI MX 8 0 8 8 true BL false WH 1 0 LI MX 4 4 8 8 true BL false WH 1 0 LI ] ME ] ME ED DO /Action { NIL /CloseStack MyStack Send } def $ /EditText(Title)BO 210 580 150 25 /Helvetica-BoldOblique 16 WH 0.9 0.9 0.9 0.9 true false [(PexamplesHNText)]()/Left false 0 0 0 0 0 1 [[0 15 0 ]]true false false false false 0.6 0.6 0.6 0.6 BL 1 0.72 0.65 1 0 0 0 10 DO /OnOpen { MyStack /ObjectName get 32 string cvs SetValue } def $ ]{0 609 moveto 0 609 lineto 577 609 lineto 577 384 lineto 417 384 lineto 417 0 lineto 160 0 lineto 160 384 lineto 0 384 lineto 0 609 lineto closepath closepath } DO /SaveStack { /SaveStack SuperDo NIL /OnOpen /Title Send } def $ HNEnd !Funky!Stuff! echo x - PexamplesIntro.stack cat >PexamplesIntro.stack <<'!Funky!Stuff!' % HyperNeWS data file, (c)1989 Turing Institute % creator: per 1.2 HNBegin /Stack(PexamplesIntro)BO DS (Wed 15 Nov 1989 16:46)(Wed 18 Apr 1990 11:09)510 503 true false false true (per)null 5 9 BD MX 0 0 636 392 false BL false WH 1 DR [ MX 0 0 636 392 true BL true 0.2258 0.2258 0.2258 0.2258 1 RE MX 12 8 616 376 true BL true 0.2258 0.2258 0.2258 0.2258 1 /Palatino-Italic /Left [(Intro)] TE ] ME ED [/Card(#5)BO /BackGround(#0)BO []DO $ [/EditText(StaticText)BO 20 165 575 195 /Times-Roman 24 0.8 0.8 0.8 0.8 0.896 0.896 0.896 1 true false [(These stacks show some objects built with HyperNeWS. If you see something you like, enter edit mode to copy it or to see how it was made. When you see a ballon icon , click on it for additional information.)()(\(Of course, these stacks are not "finished" -- but I hope you find them useful.\))]()/Left false 0 0 0 0 0 7 [[0 54 0 ][54 58 0 ][112 59 0 ][171 45 0 ][0 0 1 ][0 58 2 ][58 22 2 ]]true false false false tr 0.6 0.6 0.6 BL WH 0 0 0 10 DO $ /EditText(#6)BO 40 95 530 70 /Times-Roman 18 0.7 0.7 0.7 0.7 0.896 0.896 0.896 1 true false [(Notes: HyperNews supports color, but these stacks were made on a color Sun pretending to be 16 level grayscale. HyperNeWS Version 1.3)(Tested on Sun 3 and SparcStation, under O penWindows 1.0)()]()/Left false 0 0 0 0 0 3 [[0 65 0 ][65 69 0 ][0 55 1 ][0 0 2 ]]true false false false true 0.6 0.6 0.6 0.6 BL WH 0 0 0 10 DO /OnOpen { { 0.006 sleep 3 { Hide 0.0005 sleep Show 0.004 sleep } repeat } fork pop } def $ /Button(#7)BO 520 275 45 30 /Times-Roman 18 BL WH true false 0 (Button)10 14 /Drawing BD MX 0 0 39.998 24 false BL false WH 1 DR [ 0.8333 0 0 0.75 0 0 48 32 false BL false WH 1 DR [ MX 0 0 48 32 false BL true 0.5484 0.5484 0.5484 0.5484 1 RE MX 9.0009 3.501 32.001 23.998 false BL false WH 1 DR [ 0.3333 0 0 0.261 16.001 23.998 48 -40 true BL false WH 4 0 AR 0.3333 0 0 0.261 16.001 23.998 -48 -40 true BL false WH 4 0 AR 0.3333 0 0 0.261 14.6678 5.217 52 32 true BL false WH 4 0 AR 0.3333 0 0 0.261 9.335 6.2607 -28 28 true BL false WH 4 0 AR 0.3333 0 0 0.261 4.001 0 32 20 true BL false WH 4 0 AR 0.3333 0 0 0.261 4.001 0 16 24 true BL false WH 4 0 AR ] ME ] ME ] ME ED DO /Action { [] /Show /IntroPopText Send } def $ /EditText(IntroPopText)BO 70 95 475 75 /Times-Roman 24 BL 0.896 0.896 0.896 1 false false [()(Not THIS one, wiseguy!)]()/Center false 0 0 0 0 0 2 [[0 0 0 ][0 22 1 ]]true false false true false 0.6 0.6 0.6 0.6 BL WH 0 0 0 10 DO /Action { Hide } def /OnOpen { Hide } def $ /EditText(#8)BO 40 10 520 60 /Times-Roman 14 0.6 0.6 0.6 0.6 0.896 0.896 0.896 1 true false [(Copyright \(c\) 1990 by North American Philips.)(License is hereby freely granted to copy all or part of this software, as long as this notice remains intact. Philips disclaims all responsibility for the use of this software.)]()/Left false 0 0 0 0 0 3 [[0 45 0 ][0 94 1 ][94 83 1 ]]true false false false true 0.6 0.6 0.6 0.6 BL WH 0 0 0 10 DO $ /EditText(#9)BO 510 15 105 15 /Times-Roman 8 0.5 0.5 0.5 0.5 0.896 0.896 0.896 1 true false [(The lawyers made me do it!)]()/Left false 0 0 0 0 0 1 [[0 26 0 ]]true false false false true 0.6 0.6 0.6 0.6 BL WH 0 0 0 10 DO $ ]DO $ ][/Button(#2)BO 600 359 30 30 /Times-Roman 18 BL WH true false 0 (PushButton)10 15 /Drawing BD MX 0 0 24 24 false BL false WH 1 DR [ MX 0 0 24 24 false BL false WH 1 DR [ MX 0 0 24 24 true BL true 0.6129 0.6129 0.6129 0.6129 1 12 RR MX 5 12 8 8 true BL false WH 1 0 LI MX 5 8 12 12 true BL false WH 1 0 LI MX 9 4 12 12 true BL false WH 1 0 LI MX 13 4 8 8 true BL false WH 1 0 LI MX 9 8 8 8 true BL false WH 1 0 LI ] ME ] ME ED DO /Action { NIL /CloseStack MyStack Send } def $ /EditText(Title)BO 5 360 145 25 /Helvetica-BoldOblique 16 0.5 0.5 0.5 0.5 0.2258 0.2258 0.2258 0.2258 true false [(PexamplesIntro)]()/Center false 0 0 0 0 0 1 [[0 14 0 ]]true false false false false 0.6 0.6 0.6 0.6 BL 1 0.72 0.65 1 0 0 0 10 DO /OnOpen { MyStack /ObjectName get 32 string cvs SetValue } def $ ]{0 0 moveto 0 393 lineto 637 393 lineto 637 0 lineto closepath closepath } DO /SaveStack { /SaveStack SuperDo NIL /OnOpen /Title Send } def $ HNEnd !Funky!Stuff! echo x - PexamplesMultiShapes.stack cat >PexamplesMultiShapes.stack <<'!Funky!Stuff!' % HyperNeWS data file, (c)1989 Turing Institute % creator: per 1.2 HNBegin /Stack(PexamplesMultiShapes)BO DS (Wed 15 Nov 1989 18:11)(Wed 29 Nov 1989 9:37)583 0 true false false true (per)null 5 29 BD MX 0 0 568 460 false BL false WH 1 DR [ MX 0 0 568 460 true BL true 0.8387 0.8387 0.8387 0.8387 1 RE ] ME ED [/Card(#5)BO /BackGround(#0)BO [/Button(PreviousButton)BO 470 10 35 40 /Times-Roman 18 BL WH true false 0 (PreviousButton)10 14 /Drawing BD MX 0 0 32 36 false BL false WH 1 DR [ MX 0 0 32 36 false BL false WH 1 DR [ MX 0 0 32 32 false BL true 0.511 0.511 0.511 0.511 1 [[24 32] [24 24] [32 24] [32 8] [24 8] [24 0] [0 16]] PO MX 0 4 32 32 true BL true WH 1 [[24 32] [24 24] [32 24] [32 8] [24 8] [24 0] [0 16]] PO ] ME ] ME ED DO /Action { NIL /GoPreviousCard ParentSend } def $ /Button(NextButton)BO 515 10 35 40 /Times-Roman 18 BL WH true false 0 (NextButton)10 14 /Drawing BD MX 0 0 32 36 false BL false WH 1 DR [ MX 0 0 32 36 false BL false WH 1 DR [ MX 0 0 32 32 false BL true 0.511 0.511 0.511 0.511 1 [[0 24] [8 24] [8 32] [32 16] [8 0] [8 8] [0 8]] PO MX 0 4 32 32 true BL true WH 1 [[0 24] [8 24] [8 32] [32 16] [8 0] [8 8] [0 8]] PO ] ME ] ME ED DO /Action { [MyStack /CurrentCard get IndexCard] /SetValue /xx Send NIL /GoNextCard ParentSend } def $ ]DO $ [/Button(#40)BO 484 355 55 45 /Times-Roman 18 BL WH true false 0 (Button)10 14 /Drawing BD MX 0 0 49 39.998 false BL false WH 1 DR [ MX 0 0 49 39.998 false BL false WH 1 DR [ 0.5 0 0 0.435 25 39.998 48 -40 true BL false WH 4 0 AR 0.5 0 0 0.435 25 39.998 -50 -39.0819 true BL false WH 4 0 AR 0.5 0 0 0.435 23 8.695 52 32 true BL false WH 4 0 AR 0.5 0 0 0.435 15.001 9.434 -30 32.1857 true BL false WH 4 0 AR 0.5 0 0 0.435 7.001 0 32 20 true BL false WH 4 0 AR 0.5 0 0 0.435 7.001 0 16 20.691 true BL false WH 4 0 AR ] ME ] ME ED DO /Action { [] /Show /MultiShapesPopText Send } def $ /Button(#6)BO 450 5 60 55 /Times-Roman 18 BL WH true false 0 (Button)10 14 /Drawing BD MX 0 0 56 52 false BL false WH 1 DR [ MX 0 0 56 52 false BL true 0.8387 0.8387 0.8387 0.8387 1 RE ] ME ED DO $ /Button(#10)BO 45 290 170 80 /Times-Roman 18 BL WH true false 1 (Button)10 14 /Drawing BD MX 0 0 180 188 false BL false WH 1 DR [ MX 4 0 176 80 false BL false WH 1 DR [ MX 0 0 176 80 false BL true 0.8065 0.8065 0.8065 0.8065 1 RE MX 12 12 152 60 false BL false WH 1 DR [ MX 4 4 144 48 false BL true 0.5807 0.5807 0.5807 0.5807 1 RE -0.6316 0 0 0 116 60 152 4 false BL false WH 1 DR [ MX 0 0 152 4 false BL true BL 1 [[0 0] [0 0] [4 4] [152 4] [152 0]] PO ] ME MX 0 0 152 4 false BL true WH 1 [[4 4] [4 4] [0 0] [152 0] [152 4]] PO MX 148 4 4 52 false BL true WH 1 [[0 48] [0 48] [4 52] [4 0] [0 0]] PO MX 0 0 4 56 false BL true BL 1 [[0 0] [0 0] [4 4] [4 56] [0 56]] PO MX 4 52 148 4 false BL true BL 1 [[0 4] [0 4] [0 0] [144 0] [148 4]] PO ] ME ] ME MX 0 108 176 80 false BL false WH 1 DR [ MX 0 0 176 80 false BL true 0.8065 0.8065 0.8065 0.8065 1 RE MX 12 12 152 56 false BL false WH 1 DR [ MX 4 4 144 48 false BL true 0.5807 0.5807 0.5807 0.5807 1 RE MX 0 0 152 4 false BL true BL 1 [[0 0] [0 0] [4 4] [152 4] [152 0]] PO MX 148 4 4 52 false BL true BL 1 [[0 48] [0 48] [4 52] [4 0] [0 0]] PO MX 0 0 4 56 false BL true WH 1 [[0 0] [0 0] [4 4] [4 56] [0 56]] PO MX 4 52 148 4 false BL true WH 1 [[0 4] [0 4] [0 0] [144 0] [148 4]] PO ] ME ] ME ] ME ED DO $ /Button(#12)BO 385 65 30 30 /Times-Roman 18 BL WH true false 4 (Button)10 14 /Drawing BD MX 0 0 192 80 false BL false WH 1 DR [ MX 0 48 32 32 false BL true WH 1 RE MX 48 48 32 32 false BL true 0.9032 0.9032 0.9032 0.9032 1 RE MX 104 48 32 32 false BL true 0.7742 0.7742 0.7742 0.7742 1 RE MX 160 48 32 32 false BL true 0.6452 0.6452 0.6452 0.6452 1 RE MX 0 0 32 32 false BL true 0.5161 0.5161 0.5161 0.5161 1 RE MX 48 0 32 32 false BL true 0.3871 0.3871 0.3871 0.3871 1 RE MX 104 0 32 32 false BL true 0.2581 0.2581 0.2581 0.2581 1 RE MX 160 0 32 32 false BL true 0.129 0.129 0.129 0.129 1 RE ] ME ED DO $ /Button(#18)BO 250 65 35 35 /Times-Roman 18 BL BL true false 1 (Button)10 14 /Drawing BD MX 0 0 392 40 false BL false WH 1 DR [ MX 0 8 32 32 false BL false WH 1 DR [ MX 0 0 32 32 true BL true WH 2 OV MX 16 16 0 16 true BL true WH 8 0 LI ] ME MX 128 8 32 32 false BL false WH 1 DR [ MX 0 0 32 32 true BL true WH 2 OV MX 16 16 16 0 true BL true WH 8 0 LI ] ME MX 248 8 32 32 false BL false WH 1 DR [ MX 0 0 32 32 true BL true WH 2 OV MX 16 16 0 -16 true BL true WH 8 0 LI ] ME MX 360 0 32 32 false BL false WH 1 DR [ MX 0 0 32 32 true BL true WH 2 OV MX 0 16 16 0 true BL true WH 8 0 LI ] ME ] ME ED DO $ /Button(PushButton)BO 75 50 70 70 /Times-Roman 18 BL WH true false 0 (PushButton)10 14 /Drawing BD MX 0 0 164 300 false BL false WH 1 DR [ MX 100 236 64 64 false BL false WH 1 DR [ MX 0 0 64 64 true BL true WH 2 RE MX 0 32 64 0 true BL true WH 1 0 LI MX 32 64 0 -64 true BL true WH 1 0 LI ] ME MX 0 200 64 64 false BL false WH 1 DR [ MX 0 0 64 64 true BL true WH 2 RE MX 0 48 64 0 true BL true WH 1 0 LI MX 0 32 64 0 true BL true WH 1 0 LI MX 0 16 64 0 true BL true WH 1 0 LI MX 16 64 0 -64 true BL true WH 1 0 LI MX 48 64 0 -64 true BL true WH 1 0 LI MX 32 64 0 -64 true BL true WH 1 0 LI ] ME MX 0 104 64 64 false BL false WH 1 DR [ MX 0 0 64 64 true BL true WH 2 RE MX 0 48 64 0 true BL true WH 1 0 LI MX 0 32 64 0 true BL true WH 1 0 LI MX 0 16 64 0 true BL true WH 1 0 LI MX 16 64 0 -64 true BL true WH 1 0 LI MX 48 64 0 -64 true BL true WH 1 0 LI MX 32 64 0 -64 true BL true WH 1 0 LI MX 0 56 64 0 true BL true WH 1 0 LI MX 0 40 64 0 true BL true WH 1 0 LI MX 0 24 64 0 true BL true WH 1 0 LI MX 0 8 64 0 true BL true WH 1 0 LI MX 8 64 0 -64 true BL true WH 1 0 LI MX 24 64 0 -64 true BL true WH 1 0 LI MX 40 64 0 -64 true BL true WH 1 0 LI MX 56 64 0 -64 true BL true WH 1 0 LI ] ME MX 0 0 64 64 false BL false WH 1 DR [ MX 0 0 64 64 true BL true WH 2 RE MX 0 48 64 0 true BL true WH 1 0 LI MX 0 32 64 0 true BL true WH 1 0 LI MX 0 16 64 0 true BL true WH 1 0 LI MX 16 64 0 -64 true BL true WH 1 0 LI MX 48 64 0 -64 true BL true WH 1 0 LI MX 32 64 0 -64 true BL true WH 1 0 LI MX 0 56 64 0 true BL true WH 1 0 LI MX 0 40 64 0 true BL true WH 1 0 LI MX 0 24 64 0 true BL true WH 1 0 LI MX 0 8 64 0 true BL true WH 1 0 LI MX 8 64 0 -64 true BL true WH 1 0 LI MX 24 64 0 -64 true BL true WH 1 0 LI MX 40 64 0 -64 true BL true WH 1 0 LI MX 56 64 0 -64 true BL true WH 1 0 LI MX 0 60 64 0 true BL true WH 1 0 LI MX 0 52 64 0 true BL true WH 1 0 LI MX 0 44 64 0 true BL true WH 1 0 LI MX 0 36 64 0 true BL true WH 1 0 LI MX 0 28 64 0 true BL true WH 1 0 LI MX 0 20 64 0 true BL true WH 1 0 LI MX 0 12 64 0 true BL true WH 1 0 LI MX 0 4 64 0 true BL true WH 1 0 LI MX 4 64 0 -64 true BL true WH 1 0 LI MX 12 64 0 -64 true BL true WH 1 0 LI MX 20 64 0 -64 true BL true WH 1 0 LI MX 28 64 0 -64 true BL true WH 1 0 LI MX 36 64 0 -64 true BL true WH 1 0 LI MX 44 64 0 -64 true BL true WH 1 0 LI MX 52 64 0 -64 true BL true WH 1 0 LI MX 60 64 0 -64 true BL true WH 1 0 LI ] ME ] ME ED DO $ /Button(#15)BO 225 160 85 90 /Times-Roman 18 BL WH true false 1 (Button)10 14 /Drawing BD MX 0 0 304 88 false BL false WH 1 DR [ MX 0 0 88 88 false BL false WH 1 DR [ MX 0 0 88 88 false BL true 0.8387 0.8387 0.8387 0.8387 1 RE MX 8 8 72 72 true BL true 0.3871 0.3871 0.3871 0.3871 1 OV 0 -1 1 0 8 60 32 72 false BL true 0.5807 0.5807 0.5807 0.5807 1 OV MX 15 31 24 26 false BL true 0.2258 0.2258 0.2258 0.2258 1 OV ] ME MX 216 0 88 88 false BL false WH 1 DR [ MX 0 0 88 88 false BL true 0.8387 0.8387 0.8387 0.8387 1 RE MX 8 8 72 72 true BL true 0.3871 0.3871 0.3871 0.3871 1 OV 0 -1 1 0 8 60 32 72 false BL true 0.5807 0.5807 0.5807 0.5807 1 OV MX 47 31 24 26 false BL true 0.2258 0.2258 0.2258 0.2258 1 OV ] ME MX 108 0 88 88 false BL false WH 1 DR [ MX 0 0 88 88 false BL true 0.8387 0.8387 0.8387 0.8387 1 RE MX 8 8 72 72 true BL true 0.3871 0.3871 0.3871 0.3871 1 OV 0 -1 1 0 8 60 32 72 false BL true 0.5807 0.5807 0.5807 0.5807 1 OV MX 31 27 24 26 false BL true 0.2258 0.2258 0.2258 0.2258 1 OV ] ME ] ME ED DO $ /EditText(MultiShapesPopText)BO 15 110 520 285 /Helvetica 24 BL 0.896 0.896 0.896 1 true false [()(If more than one shape is pasted in a button from the draw tool, the shapes are cycled through with each mouse click.)()(This stack is just a collection of buttons with multiple shapes. T here are some display bugs \(white areas and things jumping around\).)()(\(There are no button scripts here\).)()]()/Center false 0 0 0 0 0 10 [[0 0 0 ][0 45 1 ][45 42 1 ][87 30 1 ][0 0 2 ][0 48 3 ][48 46 3 ][94 40 3 ][0 0 4 ][0 35 5 ][0 0 6 ]]true f alse true false 0.6 0.6 0.6 0.6 BL WH 0 0 0 10 DO /Action { Hide } def /OnOpen { Hide } def $ ]DO $ /Card(#28)BO 4 #g [/Button(#27)BO 285 115 150 180 /Times-Roman 18 BL WH true false 1 (Button)10 14 /Drawing BD MX 0 0 896 176 false BL false WH 1 DR [ MX 0 0 144 176 false BL false WH 1 DR [ MX 0 0 144 176 false BL true 0.9032 0.9032 0.9032 0.9032 1 RE MX 16 16 112 144 false BL false WH 1 DR [ MX 0 0 112 144 true BL true 0.8065 0.8065 0.8065 0.8065 1 [[0 0] [0 0] [112 0] [112 112] [80 128] [80 144] [32 144] [32 128] [0 112]] PO ] ME ] ME MX 196 0 144 176 false BL false WH 1 DR [ MX 0 0 144 176 false BL true 0.9032 0.9032 0.9032 0.9032 1 RE MX 16 16 112 144 false BL false WH 1 DR [ MX 0 0 112 144 true BL true 0.8065 0.8065 0.8065 0.8065 1 [[0 0] [0 0] [112 0] [112 112] [80 128] [80 144] [32 144] [32 128] [0 112]] PO MX 28 20 16 16 true BL true BL 1 OV MX 40 0 16 16 true BL true BL 1 OV MX 8 20 16 16 true BL true BL 1 OV MX 20 4 16 16 true BL true BL 1 OV MX 0 0 16 16 true BL true BL 1 OV MX 44 28 16 16 true BL true BL 1 OV MX 52 12 16 16 true BL true BL 1 OV MX 72 16 16 16 true BL true BL 1 OV MX 92 4 16 16 true BL true BL 1 OV MX 68 0 16 16 true BL true BL 1 OV MX 92 20 16 16 true BL true BL 1 OV ] ME ] ME MX 372 0 144 176 false BL false WH 1 DR [ MX 0 0 144 176 false BL true 0.9032 0.9032 0.9032 0.9032 1 RE MX 16 16 112 144 false BL false WH 1 DR [ MX 0 0 112 144 true BL true 0.8065 0.8065 0.8065 0.8065 1 [[0 0] [0 0] [112 0] [112 112] [80 128] [80 144] [32 144] [32 128] [0 112]] PO MX 28 40 16 16 true BL true BL 1 OV MX 4 40 16 16 true BL true BL 1 OV MX 28 20 16 16 true BL true BL 1 OV MX 40 0 16 16 true BL true BL 1 OV MX 64 40 16 16 true BL true BL 1 OV MX 8 20 16 16 true BL true BL 1 OV MX 20 4 16 16 true BL true BL 1 OV MX 0 0 16 16 true BL true BL 1 OV MX 44 28 16 16 true BL true BL 1 OV MX 52 12 16 16 true BL true BL 1 OV MX 48 44 16 16 true BL true BL 1 OV MX 72 16 16 16 true BL true BL 1 OV MX 92 4 16 16 true BL true BL 1 OV MX 68 0 16 16 true BL true BL 1 OV MX 80 32 16 16 true BL true BL 1 OV MX 92 20 16 16 true BL true BL 1 OV MX 92 44 16 16 true BL true BL 1 OV ] ME ] ME MX 556 0 144 176 false BL false WH 1 DR [ MX 0 0 144 176 false BL true 0.9032 0.9032 0.9032 0.9032 1 RE MX 16 16 112 144 false BL false WH 1 DR [ MX 0 0 112 144 true BL true 0.8065 0.8065 0.8065 0.8065 1 [[0 0] [0 0] [112 0] [112 112] [80 128] [80 144] [32 144] [32 128] [0 112]] PO MX 28 40 16 16 true BL true BL 1 OV MX 4 40 16 16 true BL true BL 1 OV MX 28 20 16 16 true BL true BL 1 OV MX 40 0 16 16 true BL true BL 1 OV MX 64 40 16 16 true BL true BL 1 OV MX 8 20 16 16 true BL true BL 1 OV MX 20 4 16 16 true BL true BL 1 OV MX 0 0 16 16 true BL true BL 1 OV MX 44 28 16 16 true BL true BL 1 OV MX 52 12 16 16 true BL true BL 1 OV MX 20 56 16 16 true BL true BL 1 OV MX 76 52 16 16 true BL true BL 1 OV MX 4 64 16 16 true BL true BL 1 OV MX 48 44 16 16 true BL true BL 1 OV MX 36 60 16 16 true BL true BL 1 OV MX 72 16 16 16 true BL true BL 1 OV MX 92 4 16 16 true BL true BL 1 OV MX 68 0 16 16 true BL true BL 1 OV MX 80 32 16 16 true BL true BL 1 OV MX 92 20 16 16 true BL true BL 1 OV MX 56 60 16 16 true BL true BL 1 OV MX 92 44 16 16 true BL true BL 1 OV MX 92 64 16 16 true BL true BL 1 OV ] ME ] ME MX 752 0 144 176 false BL false WH 1 DR [ MX 0 0 144 176 false BL true 0.9032 0.9032 0.9032 0.9032 1 RE MX 16 16 112 144 false BL false WH 1 DR [ MX 0 0 112 144 true BL true 0.8065 0.8065 0.8065 0.8065 1 [[0 0] [0 0] [112 0] [112 112] [80 128] [80 144] [32 144] [32 128] [0 112]] PO MX 28 40 16 16 true BL true BL 1 OV MX 4 40 16 16 true BL true BL 1 OV MX 28 20 16 16 true BL true BL 1 OV MX 40 0 16 16 true BL true BL 1 OV MX 64 40 16 16 true BL true BL 1 OV MX 8 20 16 16 true BL true BL 1 OV MX 20 4 16 16 true BL true BL 1 OV MX 0 0 16 16 true BL true BL 1 OV MX 44 28 16 16 true BL true BL 1 OV MX 52 12 16 16 true BL true BL 1 OV MX 20 56 16 16 true BL true BL 1 OV MX 76 52 16 16 true BL true BL 1 OV MX 4 64 16 16 true BL true BL 1 OV MX 48 44 16 16 true BL true BL 1 OV MX 36 60 16 16 true BL true BL 1 OV MX 72 16 16 16 true BL true BL 1 OV MX 92 4 16 16 true BL true BL 1 OV MX 68 0 16 16 true BL true BL 1 OV MX 80 32 16 16 true BL true BL 1 OV MX 92 20 16 16 true BL true BL 1 OV MX 56 60 16 16 true BL true BL 1 OV MX 92 44 16 16 true BL true BL 1 OV MX 92 64 16 16 true BL true BL 1 OV MX 0 88 16 16 true BL true BL 1 OV MX 20 80 16 16 true BL true BL 1 OV MX 44 80 16 16 true BL true BL 1 OV MX 32 112 16 16 true BL true BL 1 OV MX 72 68 16 16 true BL true BL 1 OV MX 88 80 16 16 true BL true BL 1 OV MX 64 88 16 16 true BL true BL 1 OV MX 80 104 16 16 true BL true BL 1 OV MX 48 96 16 16 true BL true BL 1 OV MX 32 92 16 16 true BL true BL 1 OV MX 56 112 16 16 true BL true BL 1 OV MX 12 100 16 16 true BL true BL 1 OV ] ME ] ME ] ME ED DO $ /Button(#19)BO 80 140 115 110 /Times-Roman 18 BL WH true false 0 (Button)10 14 /Drawing BD MX 0 0 112 104 false BL false WH 1 DR [ MX 0 0 112 104 false BL true WH 1 RE ] ME ED DO $ /Button(#17)BO 90 150 90 85 /Times-Roman 18 BL WH true false 0 (Button)10 14 /Drawing BD MX 0 0 384 181.256 false BL false WH 1 DR [ MX 0 101.256 80 80 false BL false WH 1 DR [ MX 0 0 80 80 false BL true 0.6452 0.6452 0.6452 0.6452 1 OV MX 8 8 64 64 false BL true WH 1 OV MX 8 8 64 64 false BL true 0.4516 0.4516 0.4516 0.4516 1 45 90 PI ] ME MX 96 101.256 80 80 false BL false WH 1 DR [ MX 0 0 80 80 false BL true 0.6452 0.6452 0.6452 0.6452 1 OV MX 8 8 64 64 false BL true WH 1 OV MX 8 8 64 64 false BL true 0.4516 0.4516 0.4516 0.4516 1 0 90 PI ] ME MX 200 101.256 85.256 80 false BL false WH 1 DR [ MX 0 0 80 80 false BL true 0.6452 0.6452 0.6452 0.6452 1 OV MX 8 8 64 64 false BL true WH 1 OV MX 8 8 64 64 false BL true 0.4516 0.4516 0.4516 0.4516 1 -45 90 PI ] ME MX 304 101.256 80 80 false BL false WH 1 DR [ MX 0 0 80 80 false BL true 0.6452 0.6452 0.6452 0.6452 1 OV MX 8 8 64 64 false BL true WH 1 OV MX 8 8 64 64 false BL true 0.4516 0.4516 0.4516 0.4516 1 270 90 PI ] ME MX 0 0 85.256 85.256 false BL false WH 1 DR [ MX 0 5.256 80 80 false BL true 0.6452 0.6452 0.6452 0.6452 1 OV MX 8 13.256 64 64 false BL true WH 1 OV MX 8 13.256 64 64 false BL true 0.4516 0.4516 0.4516 0.4516 1 225 90 PI ] ME MX 96 5.256 80 80 false BL false WH 1 DR [ MX 0 0 80 80 false BL true 0.6452 0.6452 0.6452 0.6452 1 OV MX 8 8 64 64 false BL true WH 1 OV MX 8 8 64 64 false BL true 0.4516 0.4516 0.4516 0.4516 1 180 90 PI ] ME MX 194.746 0 90.51 85.256 false BL false WH 1 DR [ MX 5.255 5.256 80 80 false BL true 0.6452 0.6452 0.6452 0.6452 1 OV MX 13.255 13.256 64 64 false BL true WH 1 OV MX 13.255 13.256 64 64 false BL true 0.4516 0.4516 0.4516 0.4516 1 135 90 PI ] ME MX 304 5.256 80 80 false BL false WH 1 DR [ MX 0 0 80 80 false BL true 0.6452 0.6452 0.6452 0.6452 1 OV MX 8 8 64 64 false BL true WH 1 OV MX 8 8 64 64 false BL true 0.4516 0.4516 0.4516 0.4516 1 90 90 PI ] ME ] ME ED DO $ /Button(#29)BO 505 5 60 55 /Times-Roman 18 BL WH true false 0 (Button)10 14 /Drawing BD MX 0 0 56 52 false BL false WH 1 DR [ 26 #g ] ME ED DO $ ]DO $ ][/Button(#2)BO 535 430 25 25 /Times-Roman 18 BL WH true false 0 (PushButton)10 14 /Drawing BD MX 0 0 16 16 false BL false WH 1 DR [ MX 0 0 16 16 false BL false WH 1 DR [ MX 0 8 8 8 true BL false WH 1 0 LI MX 0 4 12 12 true BL false WH 1 0 LI MX 4 0 12 12 true BL false WH 1 0 LI MX 8 0 8 8 true BL false WH 1 0 LI MX 4 4 8 8 true BL false WH 1 0 LI ] ME ] ME ED DO /Action { NIL /CloseStack MyStack Send } def $ /EditText(Title)BO 5 425 195 25 /Helvetica-BoldOblique 16 WH 0.8387 0.8387 0.8387 0.8387 true false [(PexamplesMultiShapes)]()/Left false 0 0 0 0 0 1 [[0 20 0 ]]true false false false false 0.6 0.6 0.6 0.6 BL 1 0.72 0.65 1 0 0 0 10 DO /OnOpen { MyStack /ObjectName get 32 string cvs SetValue } def $ ]{0 0 moveto 0 461 lineto 569 461 lineto 569 0 lineto closepath closepath } DO /SaveStack { /SaveStack SuperDo NIL /OnOpen /Title Send } def $ HNEnd !Funky!Stuff! echo x - PexamplesParentScripts.stack cat >PexamplesParentScripts.stack <<'!Funky!Stuff!' % HyperNeWS data file, (c)1989 Turing Institute % creator: per 1.2 HNBegin /Stack(PexamplesParentScripts)BO DS (Thu 30 Nov 1989 13:12)(Wed 18 Apr 1990 13:08)195 0 true false false true (per)null 5 25 BD MX 0 0 672 512 false BL false WH 1 DR [ MX 0 0 672 512 true BL true BL 1 [[0 448] [64 512] [608 512] [672 448] [672 64] [608 0] [64 0] [0 64]] PO MX 16 16 640 480 false BL true 0.4839 0.4839 0.4839 0.4839 1 [[0 424] [56 480] [584 480] [640 424] [640 56] [584 0] [56 0] [0 56]] PO MX 24 24 624 464 true BL true 0.7742 0.7742 0.7742 0.7742 1 [[0 408] [56 464] [572 464] [624 412] [624 52] [572 0] [52 0] [0 52]] PO ] ME ED [/Card(#5)BO /BackGround(#0)BO [/Button(NextButton)BO 555 30 35 40 /Times-Roman 18 BL WH true false 0 (NextButton)10 14 /Drawing BD MX 0 0 32 36 false BL false WH 1 DR [ MX 0 0 32 36 false BL false WH 1 DR [ MX 0 0 32 32 false BL true 0.511 0.511 0.511 0.511 1 [[0 24] [8 24] [8 32] [32 16] [8 0] [8 8] [0 8]] PO MX 0 4 32 32 true BL true WH 1 [[0 24] [8 24] [8 32] [32 16] [8 0] [8 8] [0 8]] PO ] ME ] ME ED DO /Action { [MyStack /CurrentCard get IndexCard] /SetValue /xx Send NIL /GoNextCard ParentSend } def $ /Button(PreviousButton)BO 510 30 35 40 /Times-Roman 18 BL WH true false 0 (PreviousButton)10 14 /Drawing BD MX 0 0 32 36 false BL false WH 1 DR [ MX 0 0 32 36 false BL false WH 1 DR [ MX 0 0 32 32 false BL true 0.511 0.511 0.511 0.511 1 [[24 32] [24 24] [32 24] [32 8] [24 8] [24 0] [0 16]] PO MX 0 4 32 32 true BL true WH 1 [[24 32] [24 24] [32 24] [32 8] [24 8] [24 0] [0 16]] PO ] ME ] ME ED DO /Action { NIL /GoPreviousCard ParentSend } def $ ]DO % this routine can be called from any object sharing this background % via: [ N ] /Beeps ParentSend /Beeps { % Number-of-beeps => - 2 mul % do it twice the number of times as the card version { SysBeep } repeat } def $ [/Button(#32)BO 310 245 55 45 /Times-Roman 18 BL WH true false 0 (Button)10 14 /Drawing BD MX 0 0 49 39.998 false BL false WH 1 DR [ MX 0 0 49 39.998 false BL false WH 1 DR [ 0.5 0 0 0.435 25 39.998 48 -40 true BL false WH 4 0 AR 0.5 0 0 0.435 25 39.998 -50 -39.0819 true BL false WH 4 0 AR 0.5 0 0 0.435 23 8.695 52 32 true BL false WH 4 0 AR 0.5 0 0 0.435 15.001 9.434 -30 32.1873 true BL false WH 4 0 AR 0.5 0 0 0.435 7.001 0 32 20 true BL false WH 4 0 AR 0.5 0 0 0.435 7.001 0 16 20.691 true BL false WH 4 0 AR ] ME ] ME ED DO /Action { [] /Show /IntroPopText Send } def $ /EditText(Title)BO 80 455 205 30 /Helvetica-BoldOblique 16 WH 0.8387 0.8387 0.8387 0.8387 true false [(PexamplesParentScripts)]()/Left false 0 0 0 0 0 1 [[0 22 0 ]]true false false false true 0.6 0.6 0.6 0.6 BL 1 0.72 0.65 1 0 0 0 10 DO /OnOpen { MyStack /ObjectName get 32 string cvs SetValue } def $ /Button(#2)BO 575 465 20 20 /Times-Roman 18 BL WH true false 0 (PushButton)10 14 /Drawing BD MX 0 0 16 16 false BL false WH 1 DR [ MX 0 0 16 16 false BL false WH 1 DR [ MX 0 8 8 8 true BL false WH 1 0 LI MX 0 4 12 12 true BL false WH 1 0 LI MX 4 0 12 12 true BL false WH 1 0 LI MX 8 0 8 8 true BL false WH 1 0 LI MX 4 4 8 8 true BL false WH 1 0 LI ] ME ] ME ED DO /Action { NIL /CloseStack MyStack Send } def $ /EditText(IntroPopText)BO 80 135 525 250 /Helvetica 24 BL 0.896 0.896 0.896 1 false false [()()(The purpose of this stack is to give examples of scripts that reside in cards, backgrounds, and stacks. That is, how to put functions and data in a place where multiple lower level obj ects can share them.)()()]()/Center false 0 0 0 0 0 9 [[0 0 0 ][0 0 1 ][0 49 2 ][49 47 2 ][96 51 2 ][147 47 2 ][194 11 2 ][0 0 3 ][0 0 4 ]]true false false true false 0.6 0.6 0.6 0.6 BL WH 0 0 0 10 DO /Action { Hide } def /OnOpen { Hide } def $ /Button(#6)BO 505 30 45 40 /Times-Roman 18 BL WH true false 0 (Button)10 14 /Drawing BD MX 0 0 56 52 false BL false WH 1 DR [ MX 0 0 56 52 false BL true 0.7742 0.7742 0.7742 0.7742 1 RE ] ME ED DO $ ]DO $ /Card(#7)BO 6 #g [/Button(#12)BO 540 395 55 45 /Times-Roman 18 BL WH true false 0 (Button)10 14 /Drawing BD MX 0 0 49 39.998 false BL false WH 1 DR [ 19 #g ] ME ED DO /Action { [] /Show /BeepsPopText Send } def $ /Button(#8)BO 95 145 225 30 /Times-Roman 18 BL WH true false 0 (BeepBeepBeepBeepBeep)10 14 /Push null DO /Action { [ 5 ] /Beeps ParentSend } def $ /Button(PushButton)BO 45 205 175 30 /Times-Roman 18 BL WH true false 0 (BeepBeep)10 14 /Push null DO /Action { [ 2 ] /Beeps ParentSend } def $ /Slider(ValueSlider)BO 380 60 25 180 /Times-Roman 18 BL WH true false 2 ()true true true true 0 10 0.4839 0.4839 0.4839 0.4839 0.7 0.7 0.7 0.7 /Bar DO /Action { [ Value ] /Beeps ParentSend } def $ /EditText(BeepsPopText)BO 65 265 550 200 /Helvetica 24 BL 0.896 0.896 0.896 1 false false [()(All three objects here call a routine defined on the card level.)()(Look at the comments in the card script, and you can demonstrate to yourself how card scripts are searched before backg round scripts.)()()()]()/Center false 0 0 0 0 0 7 [[0 0 0 ][0 53 1 ][53 11 1 ][0 0 2 ][0 49 3 ][49 49 3 ][98 35 3 ][0 0 4 ][0 0 5 ][0 0 6 ]]true false false true false 0.6 0.6 0.6 0.6 BL WH 0 0 0 10 DO /Action { Hide } def /OnOpen { Hide } def $ ]DO % this routine can be called from any object on the card % via: [ N ] /Beeps ParentSend % if you remove this (e.g. change "Beeps" to "xBeeps"), objects % calling "Beeps" will get the version on the Background /Beeps { % Number-of-beeps => - { SysBeep } repeat } def $ /Card(#18)BO 6 #g [/Button(#19)BO 540 395 55 45 /Times-Roman 18 BL WH true false 0 (Button)10 14 /Drawing BD MX 0 0 49 39.998 false BL false WH 1 DR [ 19 #g ] ME ED DO /Action { [] /Show /ForkWaitText Send } def $ /EditText(#23)BO 65 265 550 200 /Helvetica 24 BL 0.896 0.896 0.896 1 false false [()(All three objects here call a routine defined on the card level.)()(Look at the comments in the card script, and you can demonstrate to yourself how card scripts are searched before backg round scripts.)()()()]()/Center false 0 0 0 0 0 7 [[0 0 0 ][0 53 1 ][53 11 1 ][0 0 2 ][0 49 3 ][49 49 3 ][98 35 3 ][0 0 4 ][0 0 5 ][0 0 6 ]]true false false true false 0.6 0.6 0.6 0.6 BL WH 0 0 0 10 DO /Action { Hide } def /OnOpen { Hide } def $ /Button(#24)BO 550 30 45 40 /Times-Roman 18 BL WH true false 0 (Button)10 14 /Drawing BD MX 0 0 56 52 false BL false WH 1 DR [ 38 #g ] ME ED DO $ /EditText(ForkWaitText)BO 65 265 550 200 /Helvetica 24 BL 0.896 0.896 0.896 1 false false [()(On this card's scripts you will find definitions for functions to call Unix stuff.)()()()()]()/Center false 0 0 0 0 0 7 [[0 0 0 ][0 53 1 ][53 29 1 ][0 0 2 ][0 0 3 ][0 0 4 ][0 0 5 ]]true f alse false true false 0.6 0.6 0.6 0.6 BL WH 0 0 0 10 DO /Action { Hide } def /OnOpen { Hide } def $ ]DO % this routine can be called from any object on the card % via: [ (unix command) ] /ForkWait ParentSend % (this is a gross hack that waits for the command to complete) /ForkWait { % (string to exec) => - { % first, wait for lockfile to clear from any previous mess (/tmp/FWLock) FileExists not { % if exit } if 0.01666 sleep } loop %gross hack (cat > /tmp/FWLock;) exch append (;rm -f /tmp/FWLock) append forkunix 0.0333 sleep %give unix plenty of time to create file, then poll { 0.01666 sleep (/tmp/FWLock) FileExists not { % if exit } if } loop } def $ ][]{0 449 moveto 64 513 lineto 609 513 lineto 673 449 lineto 673 64 lineto 609 0 lineto 64 0 lineto 0 65 lineto 0 449 lineto closepath closepath } DO /SaveStack { /SaveStack SuperDo NIL /OnOpen /Title Send } def $ HNEnd !Funky!Stuff! echo x - PexamplesScripts.stack cat >PexamplesScripts.stack <<'!Funky!Stuff!' % HyperNeWS data file, (c)1989 Turing Institute % creator: per 1.2 HNBegin /Stack(PexamplesScripts)BO DS (Wed 15 Nov 1989 18:11)(Wed 18 Apr 1990 13:09)281 0 true false false true (per)null 5 46 BD MX 0 0 672 512 false BL false WH 1 DR [ MX 0 0 672 512 true BL true BL 1 [[0 448] [64 512] [608 512] [672 448] [672 64] [608 0] [64 0] [0 64]] PO MX 16 16 640 480 true BL true 0.7742 0.7742 0.7742 0.7742 1 [[0 424] [56 480] [584 480] [640 424] [640 56] [584 0] [56 0] [0 56]] PO ] ME ED [/Card(#5)BO /BackGround(#0)BO [/Button(PreviousButton)BO 500 20 35 40 /Times-Roman 18 BL WH true false 0 (PreviousButton)10 14 /Drawing BD MX 0 0 32 36 false BL false WH 1 DR [ MX 0 0 32 36 false BL false WH 1 DR [ MX 0 0 32 32 false BL true 0.511 0.511 0.511 0.511 1 [[24 32] [24 24] [32 24] [32 8] [24 8] [24 0] [0 16]] PO MX 0 4 32 32 true BL true WH 1 [[24 32] [24 24] [32 24] [32 8] [24 8] [24 0] [0 16]] PO ] ME ] ME ED DO /Action { NIL /GoPreviousCard ParentSend } def $ /Button(NextButton)BO 550 20 35 40 /Times-Roman 18 BL WH true false 0 (NextButton)10 14 /Drawing BD MX 0 0 32 36 false BL false WH 1 DR [ MX 0 0 32 36 false BL false WH 1 DR [ MX 0 0 32 32 false BL true 0.511 0.511 0.511 0.511 1 [[0 24] [8 24] [8 32] [32 16] [8 0] [8 8] [0 8]] PO MX 0 4 32 32 true BL true WH 1 [[0 24] [8 24] [8 32] [32 16] [8 0] [8 8] [0 8]] PO ] ME ] ME ED DO /Action { [MyStack /CurrentCard get IndexCard] /SetValue /xx Send NIL /GoNextCard ParentSend } def $ ]DO $ [/Button(#32)BO 315 240 55 45 /Times-Roman 18 BL WH true false 0 (Button)10 14 /Drawing BD MX 0 0 49 39.998 false BL false WH 1 DR [ MX 0 0 49 39.998 false BL false WH 1 DR [ 0.5 0 0 0.435 25 39.998 48 -40 true BL false WH 4 0 AR 0.5 0 0 0.435 25 39.998 -50 -39.0819 true BL false WH 4 0 AR 0.5 0 0 0.435 23 8.695 52 32 true BL false WH 4 0 AR 0.5 0 0 0.435 15.001 9.434 -30 32.1864 true BL false WH 4 0 AR 0.5 0 0 0.435 7.001 0 32 20 true BL false WH 4 0 AR 0.5 0 0 0.435 7.001 0 16 20.691 true BL false WH 4 0 AR ] ME ] ME ED DO /Action { [] /Show /ExamplePopText Send } def $ /Button(#6)BO 485 20 60 55 /Times-Roman 18 BL WH true false 0 (Button)10 14 /Drawing BD MX 0 0 56 52 false BL false WH 1 DR [ MX 0 0 56 52 false BL true 0.7742 0.7742 0.7742 0.7742 1 RE ] ME ED DO $ /EditText(ExamplePopText)BO 80 80 520 345 /Helvetica 24 BL 0.896 0.896 0.896 1 false false [()(The purpose of this stack is to give examples of objects interacting through simple scripts.)()()(For example, this text box interacts with a button \(and OnOpen\):)()(Click on this text b ox to hide it.)(\(Also hidden by card's OnOpen event.\))()]()/Center false 0 0 0 0 0 12 [[0 0 0 ][0 49 1 ][49 43 1 ][0 0 2 ][0 0 3 ][0 44 4 ][44 20 4 ][0 0 5 ][0 34 6 ][0 37 7 ][0 0 8 ]]true false false true false 0.6 0.6 0.6 0.6 BL WH 0 0 0 10 DO /Action { Hide } def /OnOpen { Hide } def $ ]DO $ /Card(#38)BO 5 #g [/Button(#40)BO 550 360 55 45 /Times-Roman 18 BL WH true false 0 (Button)10 14 /Drawing BD MX 0 0 49 39.998 false BL false WH 1 DR [ 18 #g ] ME ED DO /Action { [] /Show /ButtonSliderPopText Send } def $ /Button(#44)BO 155 105 95 125 /Times-Roman 18 BL WH true false 0 (Button)10 14 /Drawing BD MX 0 0 88 120.9999 false BL false WH 1 DR [ MX 0 0 88 120.9999 false BL false WH 1 DR [ MX 0 0 88 120 false BL true 0.871 0.871 0.871 0.871 1 [[8 104] [8 104] [56 104] [56 96] [40 96] [64 80] [88 96] [72 96] [72 120] [0 120] [0 0] [72 0] [72 16] [88 16] [64 32] [40 16] [56 16] [56 8] [8 8]] PO MX 2 105 68 15.9999 true BL false WH 1 /Times-Roman /Left [(Click Here)] TE ] ME ] ME ED DO $ /Slider(Gauge)BO 235 145 235 35 /Times-Roman 24 BL WH true false 0 ()true true false false 0 3 0.5 0.5 0.5 0.5 0.7 0.7 0.7 0.7 /Bar DO $ /Button(#18)BO 200 145 35 35 /Times-Roman 18 BL BL true false 0 (Button)10 14 /Drawing BD MX 0 0 392 40 false BL false WH 1 DR [ MX 0 8 32 32 false BL false WH 1 DR [ MX 0 0 32 32 true BL true WH 2 OV MX 16 16 0 16 true BL true WH 8 0 LI ] ME MX 128 8 32 32 false BL false WH 1 DR [ MX 0 0 32 32 true BL true WH 2 OV MX 16 16 16 0 true BL true WH 8 0 LI ] ME MX 248 8 32 32 false BL false WH 1 DR [ MX 0 0 32 32 true BL true WH 2 OV MX 16 16 0 -16 true BL true WH 8 0 LI ] ME MX 360 0 32 32 false BL false WH 1 DR [ MX 0 0 32 32 true BL true WH 2 OV MX 0 16 16 0 true BL true WH 8 0 LI ] ME ] ME ED DO /Action { [ Value ] /SetValue /Gauge Send } def $ /EditText(ButtonSliderPopText)BO 80 275 520 185 /Helvetica 24 BL 0.896 0.896 0.896 1 false false [()(The value of a button with multiple drawings is the integer number of the current drawing.)()(Look at the script of the round button.)()]()/Center false 0 0 0 0 0 6 [[0 0 0 ][0 48 1 ][48 42 1 ][0 0 2 ][0 39 3 ][0 0 4 ]]true false false true false 0.6 0.6 0.6 0.6 BL WH 0 0 0 10 DO /Action { Hide } def /OnOpen { Hide } def $ ]DO $ /Card(#41)BO 5 #g [/Button(#46)BO 550 360 55 45 /Times-Roman 18 BL WH true false 0 (Button)10 14 /Drawing BD MX 0 0 49 39.998 false BL false WH 1 DR [ 18 #g ] ME ED DO /Action { [] /Show /Slider&ButtonPopText Send } def $ /Slider(BeansSlider)BO 185 125 30 185 /Times-Roman 24 BL WH true false 1 ()true true true true 0 4 0.5 0.5 0.5 0.5 0.7 0.7 0.7 0.7 /Bar DO /Action { [ Value ] /SetValue /JellyBeans Send } def $ /Button(JellyBeans)BO 305 125 150 180 /Times-Roman 18 BL WH true false 1 (Button)10 14 /Drawing BD MX 0 0 896 176 false BL false WH 1 DR [ MX 0 0 144 176 false BL false WH 1 DR [ MX 0 0 144 176 false BL true 0.9032 0.9032 0.9032 0.9032 1 RE MX 16 16 112 144 false BL false WH 1 DR [ MX 0 0 112 144 true BL true 0.8065 0.8065 0.8065 0.8065 1 [[0 0] [0 0] [112 0] [112 112] [80 128] [80 144] [32 144] [32 128] [0 112]] PO ] ME ] ME MX 196 0 144 176 false BL false WH 1 DR [ MX 0 0 144 176 false BL true 0.9032 0.9032 0.9032 0.9032 1 RE MX 16 16 112 144 false BL false WH 1 DR [ MX 0 0 112 144 true BL true 0.8065 0.8065 0.8065 0.8065 1 [[0 0] [0 0] [112 0] [112 112] [80 128] [80 144] [32 144] [32 128] [0 112]] PO MX 28 20 16 16 true BL true BL 1 OV MX 40 0 16 16 true BL true BL 1 OV MX 8 20 16 16 true BL true BL 1 OV MX 20 4 16 16 true BL true BL 1 OV MX 0 0 16 16 true BL true BL 1 OV MX 44 28 16 16 true BL true BL 1 OV MX 52 12 16 16 true BL true BL 1 OV MX 72 16 16 16 true BL true BL 1 OV MX 92 4 16 16 true BL true BL 1 OV MX 68 0 16 16 true BL true BL 1 OV MX 92 20 16 16 true BL true BL 1 OV ] ME ] ME MX 372 0 144 176 false BL false WH 1 DR [ MX 0 0 144 176 false BL true 0.9032 0.9032 0.9032 0.9032 1 RE MX 16 16 112 144 false BL false WH 1 DR [ MX 0 0 112 144 true BL true 0.8065 0.8065 0.8065 0.8065 1 [[0 0] [0 0] [112 0] [112 112] [80 128] [80 144] [32 144] [32 128] [0 112]] PO MX 28 40 16 16 true BL true BL 1 OV MX 4 40 16 16 true BL true BL 1 OV MX 28 20 16 16 true BL true BL 1 OV MX 40 0 16 16 true BL true BL 1 OV MX 64 40 16 16 true BL true BL 1 OV MX 8 20 16 16 true BL true BL 1 OV MX 20 4 16 16 true BL true BL 1 OV MX 0 0 16 16 true BL true BL 1 OV MX 44 28 16 16 true BL true BL 1 OV MX 52 12 16 16 true BL true BL 1 OV MX 48 44 16 16 true BL true BL 1 OV MX 72 16 16 16 true BL true BL 1 OV MX 92 4 16 16 true BL true BL 1 OV MX 68 0 16 16 true BL true BL 1 OV MX 80 32 16 16 true BL true BL 1 OV MX 92 20 16 16 true BL true BL 1 OV MX 92 44 16 16 true BL true BL 1 OV ] ME ] ME MX 556 0 144 176 false BL false WH 1 DR [ MX 0 0 144 176 false BL true 0.9032 0.9032 0.9032 0.9032 1 RE MX 16 16 112 144 false BL false WH 1 DR [ MX 0 0 112 144 true BL true 0.8065 0.8065 0.8065 0.8065 1 [[0 0] [0 0] [112 0] [112 112] [80 128] [80 144] [32 144] [32 128] [0 112]] PO MX 28 40 16 16 true BL true BL 1 OV MX 4 40 16 16 true BL true BL 1 OV MX 28 20 16 16 true BL true BL 1 OV MX 40 0 16 16 true BL true BL 1 OV MX 64 40 16 16 true BL true BL 1 OV MX 8 20 16 16 true BL true BL 1 OV MX 20 4 16 16 true BL true BL 1 OV MX 0 0 16 16 true BL true BL 1 OV MX 44 28 16 16 true BL true BL 1 OV MX 52 12 16 16 true BL true BL 1 OV MX 20 56 16 16 true BL true BL 1 OV MX 76 52 16 16 true BL true BL 1 OV MX 4 64 16 16 true BL true BL 1 OV MX 48 44 16 16 true BL true BL 1 OV MX 36 60 16 16 true BL true BL 1 OV MX 72 16 16 16 true BL true BL 1 OV MX 92 4 16 16 true BL true BL 1 OV MX 68 0 16 16 true BL true BL 1 OV MX 80 32 16 16 true BL true BL 1 OV MX 92 20 16 16 true BL true BL 1 OV MX 56 60 16 16 true BL true BL 1 OV MX 92 44 16 16 true BL true BL 1 OV MX 92 64 16 16 true BL true BL 1 OV ] ME ] ME MX 752 0 144 176 false BL false WH 1 DR [ MX 0 0 144 176 false BL true 0.9032 0.9032 0.9032 0.9032 1 RE MX 16 16 112 144 false BL false WH 1 DR [ MX 0 0 112 144 true BL true 0.8065 0.8065 0.8065 0.8065 1 [[0 0] [0 0] [112 0] [112 112] [80 128] [80 144] [32 144] [32 128] [0 112]] PO MX 28 40 16 16 true BL true BL 1 OV MX 4 40 16 16 true BL true BL 1 OV MX 28 20 16 16 true BL true BL 1 OV MX 40 0 16 16 true BL true BL 1 OV MX 64 40 16 16 true BL true BL 1 OV MX 8 20 16 16 true BL true BL 1 OV MX 20 4 16 16 true BL true BL 1 OV MX 0 0 16 16 true BL true BL 1 OV MX 44 28 16 16 true BL true BL 1 OV MX 52 12 16 16 true BL true BL 1 OV MX 20 56 16 16 true BL true BL 1 OV MX 76 52 16 16 true BL true BL 1 OV MX 4 64 16 16 true BL true BL 1 OV MX 48 44 16 16 true BL true BL 1 OV MX 36 60 16 16 true BL true BL 1 OV MX 72 16 16 16 true BL true BL 1 OV MX 92 4 16 16 true BL true BL 1 OV MX 68 0 16 16 true BL true BL 1 OV MX 80 32 16 16 true BL true BL 1 OV MX 92 20 16 16 true BL true BL 1 OV MX 56 60 16 16 true BL true BL 1 OV MX 92 44 16 16 true BL true BL 1 OV MX 92 64 16 16 true BL true BL 1 OV MX 0 88 16 16 true BL true BL 1 OV MX 20 80 16 16 true BL true BL 1 OV MX 44 80 16 16 true BL true BL 1 OV MX 32 112 16 16 true BL true BL 1 OV MX 72 68 16 16 true BL true BL 1 OV MX 88 80 16 16 true BL true BL 1 OV MX 64 88 16 16 true BL true BL 1 OV MX 80 104 16 16 true BL true BL 1 OV MX 48 96 16 16 true BL true BL 1 OV MX 32 92 16 16 true BL true BL 1 OV MX 56 112 16 16 true BL true BL 1 OV MX 12 100 16 16 true BL true BL 1 OV ] ME ] ME ] ME ED DO /Action { [ Value ] /SetValue /BeansSlider Send } def $ /EditText(Slider&ButtonPopText)BO 90 320 515 125 /Helvetica 24 BL 0.896 0.896 0.896 1 false false [()(Here the "action" event in the slider script sets the value of the button, and vice versa.)()]()/Center false 0 0 0 0 0 4 [[0 0 0 ][0 50 1 ][50 40 1 ][0 0 2 ]]true false false true false 0.6 0.6 0.6 0.6 BL WH 0 0 0 10 DO /Action { Hide } def /OnOpen { Hide } def $ ]DO $ /Card(#28)BO 5 #g [/Button(#55)BO 320 230 45 40 /Times-Roman 18 BL WH true false 0 (Button)10 14 /Drawing BD MX 0 0 40 36 false BL false WH 1 DR [ MX 0 0 40 36 false BL false WH 1 DR [ MX 4 8 32 24 true BL true BL 1 [[32 0] [0 0] [16 24]] PO MX 0 0 40 36 true BL false WH 1 8.5 RR ] ME ] ME ED DO /Action { % following code line should be: /GetValue /TheNumber Send MyStack /TheNumber FindObject /Value get 0 get cvi 1 add [ exch 16 string cvs ] /SetValue /TheNumber Send } def $ /EditText(TheNumber)BO 275 185 125 35 /Courier-Bold 24 BL 0.896 0.896 0.896 1 true false [(123456)]()/Right false 0 0 0 0 0 1 [[0 6 0 ]]true true true true false 0.596 0.596 0.596 0.596 BL WH 0 -4 -4 10 DO $ /Button(DecButton)BO 320 135 45 40 /Times-Roman 18 BL WH true false 0 (Button)10 14 /Drawing BD MX 0 0 40 36 false BL false WH 1 DR [ MX 0 0 40 36 false BL false WH 1 DR [ MX 0 0 40 36 true BL false WH 1 8.5 RR MX 4 4 32 24 true BL true BL 1 [[0 24] [0 24] [32 24] [16 0]] PO ] ME ] ME ED DO /Action { MyStack /TheNumber FindObject /Value get 0 get cvi 1 sub [ exch 16 string cvs ] /SetValue /TheNumber Send } def $ /Button(#33)BO 550 360 55 45 /Times-Roman 18 BL WH true false 0 (Button)10 14 /Drawing BD MX 0 0 49 39.998 false BL false WH 1 DR [ 18 #g ] ME ED DO /Action { [] /Show /NEPopText Send } def $ /EditText(NEPopText)BO 75 300 520 125 /Helvetica 24 BL 0.896 0.896 0.896 1 false false [()(Click on the increment or decrement buttons, or edit the number in the text box.)]()/Left false 0 0 0 0 0 4 [[0 0 0 ][0 48 1 ][48 32 1 ]]true false false true false 0.6 0.6 0.6 0.6 BL WH 0 0 0 10 DO /Action { Hide } def /OnOpen { Hide } def $ ]DO $ /Card(#30)BO 5 #g [/Button(#34)BO 540 355 55 45 /Times-Roman 18 BL WH true false 0 (Button)10 14 /Drawing BD MX 0 0 49 39.998 false BL false WH 1 DR [ 18 #g ] ME ED DO /Action { [] /Show /ThermoPopText Send } def $ /Button(#119)BO 80 35 115 250 /Times-Roman 18 BL WH true false 0 (Button)10 14 /Drawing BD MX 0 0 111.9054 246.498 false BL false WH 1 DR [ MX 0 0 111.9054 246.498 false BL false WH 1 DR [ 1.136 0 0 1.0162 40.1859 218.998 0 -176 true BL true WH 2 0 LI 1.136 0 0 1.0162 76.5343 218.998 0 -176 true BL true WH 2 0 LI 1.136 0 0 1.0162 58.3586 243.3867 -16 -24 true BL false WH 2 0 AR 1.136 0 0 1.0162 58.3586 243.3867 16 -24 true BL false WH 2 0 AR 0.957 0 0 1.0162 0 206.8497 25.2063 32 true BL false WH 1 /Helvetica-BoldOblique /Left [(40)] TE 0.957 0 0 1.0162 0 36.0858 32.7538 32 true BL false WH 1 /Helvetica-BoldOblique /Left [(-30)] TE 0.785 0 0 0.942 94.8112 207.873 21.78 41 true BL false WH 2 /Helvetica-Bold /Left [(C)] TE 0.785 0 0 0.942 84.4307 227.7336 7 7 true BL false WH 2 OV MX 31.6366 0 52 48 true BL true BL 1 OV ] ME ] ME ED DO $ /Slider(Centigrade)BO 120 80 35 180 /Helvetica-Bold 18 BL 0.7742 0.7742 0.7742 0.7742 true false 20 ()false true true true -30 40 BL 0.7 0.7 0.7 0.7 /Bar DO /Action { [ Value 9 mul 5 div 32 add ] /SetValue /Fahrenheit Send } def $ /Button(#118)BO 230 35 115 250 /Times-Roman 18 BL WH true false 0 (Button)10 14 /Drawing BD MX 0 0 109.2794 246.498 false BL false WH 1 DR [ MX 0 0 109.2794 246.498 false BL false WH 1 DR [ 1.136 0 0 1.0162 40.1859 218.998 0 -176 true BL true WH 2 0 LI 1.136 0 0 1.0162 76.5343 218.998 0 -176 true BL true WH 2 0 LI 1.136 0 0 1.0162 58.3586 243.3867 -16 -24 true BL false WH 2 0 AR 1.136 0 0 1.0162 58.3586 243.3867 16 -24 true BL false WH 2 0 AR 0.957 0 0 1.0162 0 206.8497 37.8119 32 true BL false WH 1 /Helvetica-BoldOblique /Left [(104)] TE 0.957 0 0 1.0162 0 36.0858 32.753 32 true BL false WH 1 /Helvetica-BoldOblique /Left [(-22)] TE 0.785 0 0 0.942 94.8112 207.873 18.432 41 true BL false WH 2 /Helvetica-Bold /Left [(F)] TE 0.785 0 0 0.942 84.4307 227.7336 7 7 true BL false WH 2 OV MX 31.6366 0 52 48 true BL true BL 1 OV ] ME ] ME ED DO $ /Slider(Fahrenheit)BO 270 80 35 180 /Helvetica-Bold 18 BL 0.7742 0.7742 0.7742 0.7742 true false 68 ()false true true true -22 104 BL 0.7 0.7 0.7 0.7 /Bar DO /Action { [ Value 32 sub 5 mul 9 div ] /SetValue /Centigrade Send } def $ /EditText(ThermoPopText)BO 65 290 525 170 /Helvetica 24 BL 0.896 0.896 0.896 1 false false [()(Move either thermometer to see the equivalent value on the other scale.)]()/Left false 0 0 0 0 0 6 [[0 0 0 ][0 46 1 ][46 25 1 ]]true false false true false 0.6 0.6 0.6 0.6 BL WH 0 0 0 10 DO /Action { Hide } def /OnOpen { Hide } def $ ]DO $ /Card(#31)BO 5 #g [/Button(#29)BO 545 20 50 50 /Times-Roman 18 BL WH true false 0 (Button)10 14 /Drawing BD MX 0 0 56 52 false BL false WH 1 DR [ 27 #g ] ME ED DO $ /Button(#37)BO 550 360 55 45 /Times-Roman 18 BL WH true false 0 (Button)10 14 /Drawing BD MX 0 0 49 39.998 false BL false WH 1 DR [ 18 #g ] ME ED DO /Action { [] /Show /CalcPopText Send } def $ /EditText(CalcPopText)BO 55 310 540 150 /Helvetica 24 BL 0.896 0.896 0.896 1 false false [(Simple infix calculator.)()(Numbers can also be entered by typing.)()("C" is the clear button.)]()/Center false 0 0 0 0 0 5 [[0 24 0 ][0 0 1 ][0 38 2 ][0 0 3 ][0 24 4 ]]true false false tru e false 0.6 0.6 0.6 0.6 BL WH 0 0 0 10 DO /Action { Hide } def /OnOpen { Hide } def $ /EditText(CalcFirstOperand)BO 486 185 115 20 /Helvetica 16 BL 0.7742 0.7742 0.7742 0.7742 true false [()]()/Right false 0 0 0 0 0 1 [[0 0 0 ]]true false false false false 0.596 0.596 0.596 0.596 BL WH 0 -4 -4 10 DO $ /EditText(CalcSecondOperand)BO 481 165 120 20 /Helvetica 16 BL 0.7742 0.7742 0.7742 0.7742 true false [()]()/Right false 0 0 0 0 0 1 [[0 0 0 ]]true false false false false 0.596 0.596 0.596 0.596 BL WH 0 -4 -4 10 DO $ /EditText(CalcOperator)BO 460 165 25 20 /Helvetica-Bold 18 BL 0.7742 0.7742 0.7742 0.7742 true false [()]()/Center false 0 0 0 0 0 1 [[0 0 0 ]]true false false false false 0.596 0.596 0.596 0.596 BL WH 0 -4 -4 10 DO $ /EditText(CalcResult)BO 481 135 120 20 /Helvetica 16 BL 0.7742 0.7742 0.7742 0.7742 true false [()]()/Right false 0 0 0 0 0 1 [[0 0 0 ]]true false false false false 0.596 0.596 0.596 0.596 BL WH 0 -4 -4 10 DO $ /Button(#115)BO 466 155 140 5 /Times-Roman 18 BL WH true false 0 (Button)10 14 /Drawing BD MX 0 0 136 0 false BL false WH 1 DR [ MX 0 0 136 0 true BL true WH 2 0 LI ] ME ED DO $ /Button(#83)BO 75 40 390 270 /Times-Roman 18 BL WH true false 0 (Button)10 14 /Drawing BD MX 0 0 384 264 false BL false WH 1 DR [ MX 0 0 384 264 false BL false WH 1 DR [ MX 0 0 384 264 true BL true 1 1 1 0.484 2 20 RR MX 24 212 340 44 true BL true WH 1 20 RR MX 272 0 100 36 true BL false WH 2 /Times-BoldItalic /Left [(HN Calc)] TE ] ME ] ME ED DO $ /EditText(CalcLine)BO 110 260 305 35 /Helvetica-Bold 32 BL WH true false [()]()/Right false 0 0 0 0 0 1 [[0 0 0 ]]true true true false false 0.596 0.596 0.596 0.596 BL WH 0 -4 -4 10 DO /OnOpen { [ () ] /SetValue Self Send AcceptFocus } def /OnAscii { dup (+-.0123456789) Member { /OnAscii SuperDo } {pop} ifelse } def $ /Button(#80)BO 115 200 45 35 /Times-Roman 18 BL WH true false 0 (Button)10 14 /Drawing BD MX 0 0 41.7416 31.578 false BL false WH 1 DR [ MX 0 0 41.7416 31.578 false BL false WH 1 DR [ 0.87 0 0 0.789 0 0 48 40 true BL true WH 1 10 RR 0.87 0 0 0.789 13.913 0 24 40 true BL false WH 1 /Helvetica-Bold /Left [(7)] TE ] ME ] ME ED DO /Action { [ (7) ] /Write /CalcLine Send } def $ /Button(#81)BO 165 200 45 35 /Times-Roman 18 BL WH true false 0 (Button)10 14 /Drawing BD MX 0 0 41.7416 31.578 false BL false WH 1 DR [ MX 0 0 41.7416 31.578 false BL false WH 1 DR [ 0.87 0 0 0.789 0 0 48 40 true BL true WH 1 10 RR 0.87 0 0 0.789 13.913 0 14.667 40 true BL false WH 1 /Helvetica-Bold /Left [(8)] TE ] ME ] ME ED DO /Action { [ (8) ] /Write /CalcLine Send } def $ /Button(#82)BO 215 200 45 35 /Times-Roman 18 BL WH true false 0 (Button)10 14 /Drawing BD MX 0 0 41.7416 31.578 false BL false WH 1 DR [ MX 0 0 41.7416 31.578 false BL false WH 1 DR [ 0.87 0 0 0.789 0 0 48 40 true BL true WH 1 10 RR 0.87 0 0 0.789 13.913 0 14.667 40 true BL false WH 1 /Helvetica-Bold /Left [(9)] TE ] ME ] ME ED DO /Action { [ (9) ] /Write /CalcLine Send } def $ /Button(#92)BO 290 165 45 50 /Times-Roman 18 BL WH true false 0 (Button)10 14 /Drawing BD MX 0 0 40 44 false BL false WH 1 DR [ MX 0 0 40 44 false BL false WH 1 DR [ MX 0 12 40 32 true BL true WH 2 3 RR MX 12 0 16 40 true BL false WH 2 /Helvetica-Bold /Left [(*)] TE ] ME ] ME ED DO /Action { MyStack /CalcLine FindObject /Value get 0 get cvr [ exch 16 string cvs ] /SetValue /CalcFirstOperand Send [ (*) ] /SetValue /CalcOperator Send [ () ] /SetValue /CalcSecondOperand Send [ () ] /SetValue /CalcResult Send [ () ] /SetValue /CalcLine Send } def $ /Button(#93)BO 355 175 45 35 /Times-Roman 18 BL WH true false 0 (Button)10 14 /Drawing BD MX 0 0 40 32 false BL false WH 1 DR [ MX 0 0 40 32 false BL false WH 1 DR [ MX 0 0 40 32 true BL true WH 2 3 RR MX 12 0 16 32 true BL false WH 2 /Helvetica-Bold /Left [(/)] TE ] ME ] ME ED DO /Action { MyStack /CalcLine FindObject /Value get 0 get cvr [ exch 16 string cvs ] /SetValue /CalcFirstOperand Send [ (/) ] /SetValue /CalcOperator Send [ () ] /SetValue /CalcSecondOperand Send [ () ] /SetValue /CalcResult Send [ () ] /SetValue /CalcLine Send } def $ /Button(#84)BO 115 155 45 35 /Times-Roman 18 BL WH true false 0 (Button)10 14 /Drawing BD MX 0 0 41.7416 31.578 false BL false WH 1 DR [ MX 0 0 41.7416 31.578 false BL false WH 1 DR [ 0.87 0 0 0.789 0 0 48 40 true BL true WH 1 10 RR 0.87 0 0 0.789 13.913 0 14.667 40 true BL false WH 1 /Helvetica-Bold /Left [(4)] TE ] ME ] ME ED DO /Action { [ (4) ] /Write /CalcLine Send } def $ /Button(#85)BO 165 155 45 35 /Times-Roman 18 BL WH true false 0 (Button)10 14 /Drawing BD MX 0 0 41.7416 31.578 false BL false WH 1 DR [ MX 0 0 41.7416 31.578 false BL false WH 1 DR [ 0.87 0 0 0.789 0 0 48 40 true BL true WH 1 10 RR 0.87 0 0 0.789 13.913 0 14.667 40 true BL false WH 1 /Helvetica-Bold /Left [(5)] TE ] ME ] ME ED DO /Action { [ (5) ] /Write /CalcLine Send } def $ /Button(#86)BO 215 155 45 35 /Times-Roman 18 BL WH true false 0 (Button)10 14 /Drawing BD MX 0 0 41.7416 31.578 false BL false WH 1 DR [ MX 0 0 41.7416 31.578 false BL false WH 1 DR [ 0.87 0 0 0.789 0 0 48 40 true BL true WH 1 10 RR 0.87 0 0 0.789 13.913 0 14.667 40 true BL false WH 1 /Helvetica-Bold /Left [(6)] TE ] ME ] ME ED DO /Action { [ (6) ] /Write /CalcLine Send } def $ /Button(#94)BO 290 130 45 35 /Times-Roman 18 BL WH true false 0 (Button)10 14 /Drawing BD MX 0 0 40 32 false BL false WH 1 DR [ MX 0 0 40 32 false BL false WH 1 DR [ MX 0 0 40 32 true BL true WH 2 3 RR MX 12 0 16 32 true BL false WH 2 /Helvetica-Bold /Left [(+)] TE ] ME ] ME ED DO /Action { MyStack /CalcLine FindObject /Value get 0 get cvr % there appears to be a bug in cvr if number is negative [ exch 16 string cvs ] /SetValue /CalcFirstOperand Send [ (+) ] /SetValue /CalcOperator Send [ () ] /SetValue /CalcSecondOperand Send [ () ] /SetValue /CalcResult Send [ () ] /SetValue /CalcLine Send } def $ /Button(#95)BO 355 130 45 35 /Times-Roman 18 BL WH true false 0 (Button)10 14 /Drawing BD MX 0 0 40 32 false BL false WH 1 DR [ MX 0 0 40 32 false BL false WH 1 DR [ MX 0 0 40 32 true BL true WH 2 3 RR MX 12 0 16 32 true BL false WH 2 /Helvetica-Bold /Left [(-)] TE ] ME ] ME ED DO /Action { MyStack /CalcLine FindObject /Value get 0 get cvr [ exch 16 string cvs ] /SetValue /CalcFirstOperand Send [ (-) ] /SetValue /CalcOperator Send [ () ] /SetValue /CalcSecondOperand Send [ () ] /SetValue /CalcResult Send [ () ] /SetValue /CalcLine Send } def $ /Button(#87)BO 115 110 45 35 /Times-Roman 18 BL WH true false 0 (Button)10 14 /Drawing BD MX 0 0 41.7416 31.578 false BL false WH 1 DR [ MX 0 0 41.7416 31.578 false BL false WH 1 DR [ 0.87 0 0 0.789 0 0 48 40 true BL true WH 1 10 RR 0.87 0 0 0.789 13.913 0 14.667 40 true BL false WH 1 /Helvetica-Bold /Left [(1)] TE ] ME ] ME ED DO /Action { [ (1) ] /Write /CalcLine Send } def $ /Button(#88)BO 165 110 45 35 /Times-Roman 18 BL WH true false 0 (Button)10 14 /Drawing BD MX 0 0 41.7416 31.578 false BL false WH 1 DR [ MX 0 0 41.7416 31.578 false BL false WH 1 DR [ 0.87 0 0 0.789 0 0 48 40 true BL true WH 1 10 RR 0.87 0 0 0.789 13.913 0 14.667 40 true BL false WH 1 /Helvetica-Bold /Left [(2)] TE ] ME ] ME ED DO /Action { [ (2) ] /Write /CalcLine Send } def $ /Button(#89)BO 215 110 45 35 /Times-Roman 18 BL WH true false 0 (Button)10 14 /Drawing BD MX 0 0 41.7416 31.578 false BL false WH 1 DR [ MX 0 0 41.7416 31.578 false BL false WH 1 DR [ 0.87 0 0 0.789 0 0 48 40 true BL true WH 1 10 RR 0.87 0 0 0.789 13.913 0 14.667 40 true BL false WH 1 /Helvetica-Bold /Left [(3)] TE ] ME ] ME ED DO /Action { [ (3) ] /Write /CalcLine Send } def $ /Button(#110)BO 290 75 45 50 /Times-Roman 18 BL WH true false 0 (Button)10 14 /Drawing BD MX 0 0 40 47 false BL false WH 1 DR [ MX 0 0 40 47 false BL false WH 1 DR [ MX 0 2 40 32 true BL true WH 4 3 RR MX 10 0 24 47 true BL false WH 2 /Helvetica-Bold /Left [(=)] TE ] ME ] ME ED DO /Action { % set second operand MyStack /CalcLine FindObject /Value get 0 get cvr dup [ exch 16 string cvs ] /SetValue /CalcSecondOperand Send % get first operand MyStack /CalcFirstOperand FindObject /Value get 0 get cvr % get second operand MyStack /CalcSecondOperand FindObject /Value get 0 get cvr % get operator MyStack /CalcOperator FindObject /Value get 0 get { % case (+) { add } (-) { sub } (*) { mul } (/) { dup 0 eq { % ifelse SysBeep (Err) } { % else div } ifelse } /Default { SysBeep } } case dup [ exch 16 string cvs ] /SetValue /CalcLine Send [ exch 16 string cvs ] /SetValue /CalcResult Send } def $ /Button(#109)BO 360 80 40 40 /Times-Roman 18 BL WH true false 0 (Button)10 14 /Drawing BD MX 0 0 36 29 false BL false WH 1 DR [ 0.9 0 0 0.853 0 0 40 34 false BL false WH 1 DR [ MX 0 1 40 32 true BL true WH 4 3 RR MX 10 0 23 34 true BL false WH 2 /Helvetica-Bold /Left [(C)] TE ] ME ] ME ED DO /Action { [ () ] /SetValue /CalcLine Send [ () ] /SetValue /CalcFirstOperand Send [ () ] /SetValue /CalcSecondOperand Send [ () ] /SetValue /CalcOperator Send [ () ] /SetValue /CalcResult Send } def $ /Button(#90)BO 115 65 100 35 /Times-Roman 18 BL WH true false 0 (Button)10 14 /Drawing BD MX 0 0 96 31.578 false BL false WH 1 DR [ MX 0 0 96 31.578 false BL false WH 1 DR [ 0.87 0 0 0.789 0 0 110.4054 40 true BL true WH 1 10 RR 0.87 0 0 0.789 45.9149 0 14.667 40 true BL false WH 1 /Helvetica-Bold /Left [(0)] TE ] ME ] ME ED DO /Action { [ (0) ] /Write /CalcLine Send } def $ /Button(#91)BO 220 65 45 45 /Times-Roman 18 BL WH true false 0 (Button)10 14 /Drawing BD MX 0 0 41.7416 40 false BL false WH 1 DR [ MX 0 0 41.7416 40 false BL false WH 1 DR [ 0.87 0 0 0.789 0 0 48 40 true BL true WH 1 10 RR 0.87 0 0 0.789 13.913 0 18.4 50.67 true BL false WH 1 /Times-Roman /Left [(.)] TE ] ME ] ME ED DO /Action { [ (.) ] /Write /CalcLine Send } def $ ]DO $ ][/Button(#2)BO 575 470 25 25 /Times-Roman 18 BL WH true false 0 (PushButton)10 14 /Drawing BD MX 0 0 16 16 false BL false WH 1 DR [ MX 0 0 16 16 false BL false WH 1 DR [ MX 0 8 8 8 true BL false WH 1 0 LI MX 0 4 12 12 true BL false WH 1 0 LI MX 4 0 12 12 true BL false WH 1 0 LI MX 8 0 8 8 true BL false WH 1 0 LI MX 4 4 8 8 true BL false WH 1 0 LI ] ME ] ME ED DO /Action { NIL /CloseStack MyStack Send } def $ /EditText(Title)BO 70 470 195 25 /Helvetica-BoldOblique 16 WH 0.8387 0.8387 0.8387 0.8387 true false [(PexamplesScripts)]()/Left false 0 0 0 0 0 1 [[0 16 0 ]]true false false false true 0.6 0.6 0.6 0.6 BL 1 0.72 0.65 1 0 0 0 10 DO /OnOpen { MyStack /ObjectName get 32 string cvs SetValue } def $ ]{0 449 moveto 64 513 lineto 609 513 lineto 673 449 lineto 673 64 lineto 609 0 lineto 64 0 lineto 0 65 lineto 0 449 lineto closepath closepath } DO /SaveStack { /SaveStack SuperDo NIL /OnOpen /Title Send } def $ HNEnd !Funky!Stuff! echo x - PexamplesShapes.stack cat >PexamplesShapes.stack <<'!Funky!Stuff!' % HyperNeWS data file, (c)1989 Turing Institute % creator: per 1.2 HNBegin /Stack(PexamplesShapes)BO DS (Wed 15 Nov 1989 18:11)(Wed 29 Nov 1989 9:46)0 0 true false false true (per)null 5 59 BD MX 0 0 568 460 false BL false WH 1 DR [ MX 0 0 568 460 true BL true 0.8387 0.8387 0.8387 0.8387 1 RE ] ME ED [/Card(#5)BO /BackGround(#0)BO [/Button(PreviousButton)BO 470 10 35 40 /Times-Roman 18 BL WH true false 0 (PreviousButton)10 14 /Drawing BD MX 0 0 32 36 false BL false WH 1 DR [ MX 0 0 32 36 false BL false WH 1 DR [ MX 0 0 32 32 false BL true 0.511 0.511 0.511 0.511 1 [[24 32] [24 24] [32 24] [32 8] [24 8] [24 0] [0 16]] PO MX 0 4 32 32 true BL true WH 1 [[24 32] [24 24] [32 24] [32 8] [24 8] [24 0] [0 16]] PO ] ME ] ME ED DO /Action { NIL /GoPreviousCard ParentSend } def $ /Button(NextButton)BO 515 10 35 40 /Times-Roman 18 BL WH true false 0 (NextButton)10 14 /Drawing BD MX 0 0 32 36 false BL false WH 1 DR [ MX 0 0 32 36 false BL false WH 1 DR [ MX 0 0 32 32 false BL true 0.511 0.511 0.511 0.511 1 [[0 24] [8 24] [8 32] [32 16] [8 0] [8 8] [0 8]] PO MX 0 4 32 32 true BL true WH 1 [[0 24] [8 24] [8 32] [32 16] [8 0] [8 8] [0 8]] PO ] ME ] ME ED DO /Action { [MyStack /CurrentCard get IndexCard] /SetValue /xx Send NIL /GoNextCard ParentSend } def $ ]DO $ [/Button(#6)BO 450 5 60 55 /Times-Roman 18 BL WH true false 0 (Button)10 14 /Drawing BD MX 0 0 56 52 false BL false WH 1 DR [ MX 0 0 56 52 false BL true 0.8387 0.8387 0.8387 0.8387 1 RE ] ME ED DO $ /Button(#53)BO 285 295 65 55 /Times-Roman 18 BL WH true false 0 (Button)10 14 /Drawing BD MX 0 0 59.998 51.9906 false BL false WH 1 DR [ 0.333 0 0 0.333 0 0 180 156 false BL false WH 1 DR [ MX 4 0 176 152 false BL false WH 1 DR [ MX 0 0 176 152 true BL true BL 1 [[88 152] [0 64] [48 64] [48 0] [128 0] [128 64] [176 64]] PO ] ME MX 0 4 176 152 false BL false WH 1 DR [ MX 0 0 176 152 true BL true WH 1 [[88 152] [0 64] [48 64] [48 0] [128 0] [128 64] [176 64]] PO ] ME ] ME ] ME ED DO $ /Button(#52)BO 111.127 40 52.873 37.0625 /Times-Roman 18 BL WH true false 0 (Button)10 14 /Drawing BD MX 0 0 47.873 32.0625 false BL false WH 1 DR [ MX 0 0 47.873 32.0625 false BL false WH 1 DR [ 0.176 0 0 0.167 0 1.336 40 104 true BL true BL 1 RE 0.176 0 0 0.167 7.04 0 232 192 true BL true 0.5807 0.5807 0.5807 0.5807 1 DR [ MX 88 128 128 0 true BL true WH 1 1 LI MX 216 128 16 -16 true BL false WH 1 1 AR 0 1 -1 0 232 112 -16 16 true BL false WH 1 1 AR MX 216 96 -63.998 0 true BL true WH 1 1 LI MX 152 96 16 -16 true BL false WH 1 1 AR 0 1 -1 0 168 80 -16 16 true BL false WH 1 1 AR MX 152 64 -12 0 true BL true 0.6811 0.6811 0.6811 0.6811 1 1 LI MX 144 64 16 -16 true BL false WH 1 1 AR 0 1 -1 0 160 48 -16 16 true BL false WH 1 1 AR MX 144 32 -12 0 true BL true 0.6811 0.6811 0.6811 0.6811 1 1 LI MX 132 32 16 -16 true BL false WH 1 1 AR 0 1 -1 0 148 16 -16 16 true BL false WH 1 1 AR MX 132 0 -75.998 0 true BL true WH 1 1 LI MX 72 0 -71.998 16 true BL false WH 1 1 AR MX 0 16 0 88 true BL false WH 1 1 LI MX 0 104 24 16 true BL false WH 1 1 LI MX 24 120 88 72 true BL false WH 1 [[0 0] [32 24] [56 40] [80 72] [88 72]] SP MX 112 192 16 -16 true BL false WH 1 1 AR 0 1 -1 0 128 176 -47.998 40 true BL false WH 1 1 AR ] ME 0.176 0 0 0.167 42.2408 16.697 31.997 23.997 true BL true 0.6811 0.6811 0.6811 0.6811 1 DR [ 0.569 0 0 0.597 22.855 23.997 16 -24 true BL false WH 1 1 AR 0 0.569 -0.597 0 31.997 9.597 -16 16 true BL false WH 1 1 AR 0.569 0 0 0.597 22.855 0 -39.998 16 true BL false WH 1 1 AR 0 0.569 -0.597 0 0 9.597 24 -39.998 true BL false WH 1 1 AR ] ME 0.176 0 0 0.167 31.679 10.687 -32 0 true BL true 0.7811 0.7811 0.7811 0.7811 1 0 LI 0.176 0 0 0.167 33.795 16.03 -43.998 0 true BL true 0.7811 0.7811 0.7811 0.7811 1 0 LI 0.176 0 0 0.167 30.271 5.344 -24 0 true BL true 0.7811 0.7811 0.7811 0.7811 1 0 LI ] ME ] ME ED DO $ /Button(#51)BO 40 40 48.248 37.0625 /Times-Roman 18 BL WH true false 0 (Button)10 14 /Drawing BD MX 0 0 43.248 32.0625 false BL false WH 1 DR [ MX 0 0 43.248 32.0625 false BL false WH 1 DR [ -0.159 0 0 0.167 43.248 1.336 40 104 true BL true BL 1 RE -0.159 0 0 0.167 36.8885 0 232 192 true BL true 0.5807 0.5807 0.5807 0.5807 1 DR [ 30 #g 31 #g 32 #g 33 #g 34 #g 35 #g 36 #g 37 #g 38 #g 39 #g 40 #g 41 #g 42 #g 43 #g 44 #g 45 #g 46 #g 47 #g 48 #g ] ME -0.159 0 0 0.167 5.0897 16.699 31.997 23.997 true BL true 0.6811 0.6811 0.6811 0.6811 1 DR [ 50 #g 51 #g 52 #g 53 #g ] ME -0.159 0 0 0.167 14.6288 10.688 -32 0 true BL true 1 0.697 0.647 1 1 0 LI -0.159 0 0 0.167 12.7216 16.0311 -43.998 0 true BL true 1 0.697 0.647 1 1 0 LI -0.159 0 0 0.167 15.901 5.344 -24 0 true BL true 1 0.697 0.647 1 1 0 LI ] ME ] ME ED DO $ /Button(#8)BO 75 335 45 41 /Times-Roman 18 BL WH true false 0 (Button)10 14 /Drawing BD MX 0 0 40 36 false BL false WH 1 DR [ MX 0 0 40 36 false BL false WH 1 DR [ MX 0 0 40 36 true BL true WH 1 8.5 RR MX 4 8 32 24 true BL true BL 1 [[32 0] [0 0] [16 24]] PO ] ME ] ME ED DO $ /Button(#9)BO 115 300 41 45 /Times-Roman 18 BL WH true false 0 (Button)10 14 /Drawing BD MX 0 0 36 40 false BL false WH 1 DR [ 0 -1 1 0 0 40 40 36 false BL false WH 1 DR [ 69 #g 70 #g ] ME ] ME ED DO $ /Button(#10)BO 75 270 45 41 /Times-Roman 18 BL WH true false 0 (Button)10 14 /Drawing BD MX 0 0 40 36 false BL false WH 1 DR [ -1 0 0 -1 40 36 40 36 false BL false WH 1 DR [ 69 #g 70 #g ] ME ] ME ED DO $ /Button(#11)BO 40 300 41 45 /Times-Roman 18 BL WH true false 0 (Button)10 14 /Drawing BD MX 0 0 36 40 false BL false WH 1 DR [ 0 1 -1 0 36 0 40 36 false BL false WH 1 DR [ 69 #g 70 #g ] ME ] ME ED DO $ /Button(#15)BO 260 200 100 55 /Times-Roman 18 BL WH true false 0 (Button)10 14 /Drawing BD MX 0 0 95.998 47.998 false BL false WH 1 DR [ 0.6857 0 0 0.5 0 0 140 96 false BL false WH 1 DR [ MX 32 0 16 24 true BL true 0.5807 0.5807 0.5807 0.5807 1 [[0 24] [0 24] [0 0] [16 0] [16 24]] PO MX 32 32 16 16 true BL true 0.5807 0.5807 0.5807 0.5807 1 [[0 16] [0 16] [0 0] [16 0] [16 16]] PO MX 64 0 32 48 true BL true 0.5807 0.5807 0.5807 0.5807 1 [[32 48] [32 48] [0 48] [0 0] [32 0] [32 16] [16 16] [16 32] [32 32]] PO MX 108 0 32 48 false BL false WH 1 DR [ MX 0 0 32 48 true BL true 0.5807 0.5807 0.5807 0.5807 1 [[0 24] [0 16] [0 0] [32 0] [32 48] [8 48] [8 32] [16 32] [16 24]] PO MX 8 8 16 8 true BL true WH 1 RE ] ME MX 0 0 56 96 false BL false WH 1 DR [ MX 0 0 56 96 true BL true 0.5807 0.5807 0.5807 0.5807 1 [[0 96] [0 96] [0 0] [16 0] [16 56] [56 56] [56 96]] PO MX 16 68 24 16 true BL true WH 1 RE ] ME ] ME ] ME ED DO $ /Button(#16)BO 260 140 100 55 /Times-Roman 18 BL WH true false 0 (Button)10 14 /Drawing BD MX 0 0 95.998 48 false BL false WH 1 DR [ 0.8571 0 0 -1 0 48 111.998 48 false BL false WH 1 DR [ 0.8 0 0 0.5 25.601 0 16 24 true BL true 0.4194 0.4194 0.4194 0.4194 1 [[0 24] [0 24] [0 0] [16 0] [16 24]] SP 0.8 0 0 0.5 25.601 16 16 16 true BL true 0.4194 0.4194 0.4194 0.4194 1 [[0 16] [0 16] [0 0] [16 0] [16 16]] SP 0.8 0 0 0.5 51.1992 0 32 48 true BL true 0.4194 0.4194 0.4194 0.4194 1 [[32 48] [32 48] [0 48] [0 0] [32 0] [32 16] [16 16] [16 32] [32 32]] SP 0.8 0 0 0.5 86.4043 0 32 48 true BL true 0.4194 0.4194 0.4194 0.4194 1 [[0 24] [0 16] [0 0] [32 0] [32 48] [8 48] [8 32] [16 32] [16 24]] SP 0.8 0 0 0.5 92.8031 4 16 8 true BL true BL 1 RE 0.8 0 0 0.5 0 0 56 96 true BL true 0.4194 0.4194 0.4194 0.4194 1 [[0 96] [0 96] [0 0] [16 0] [16 56] [56 56] [56 96]] SP 0.8 0 0 0.5 12.8 34 24 16 true BL true BL 1 RE ] ME ] ME ED DO $ /Button(#17)BO 50 135 90 90 /Times-Roman 18 BL WH true false 0 (Button)10 14 /Drawing BD MX 0 0 84 84 false BL false WH 1 DR [ MX 0 0 84 84 false BL false WH 1 DR [ MX 15 19 52 48 false BL true 0.5161 0.5161 0.5161 0.5161 1 RE MX 24 60 32 24 true BL true BL 1 [[36 0] [0 0] [16 24]] PO 0 -1 1 0 60 60 32 24 true BL true BL 1 [[36 0] [0 0] [16 24]] PO -1 0 0 -1 60 24 32 24 true BL true BL 1 [[36 0] [0 0] [16 24]] PO 0 1 -1 0 24 24 32 24 true BL true BL 1 [[36 0] [0 0] [16 24]] PO MX 24 24 36 37 false BL true 0.2581 0.2581 0.2581 0.2581 1 RE ] ME ] ME ED DO $ /Button(#18)BO 400 145 115 115 /Times-Roman 18 BL WH true false 0 (Button)10 14 /Drawing BD MX 0 0 112 112 false BL false WH 1 DR [ MX 0 0 112 112 false BL false WH 1 DR [ MX 0 0 112 112 false BL true 0.9032 0.9032 0.9032 0.9032 1 OV MX 4 4 104 104 false BL true 0.8387 0.8387 0.8387 0.8387 1 OV MX 8 8 96 96 false BL true 0.7742 0.7742 0.7742 0.7742 1 OV MX 12 12 88 88 false BL true 0.7097 0.7097 0.7097 0.7097 1 OV MX 16 16 80 80 false BL true 0.6452 0.6452 0.6452 0.6452 1 OV MX 20 20 72 72 false BL true 0.5807 0.5807 0.5807 0.5807 1 OV MX 24 24 64 64 false BL true 0.5161 0.5161 0.5161 0.5161 1 OV MX 28 28 56 56 false BL true 0.4516 0.4516 0.4516 0.4516 1 OV MX 32 32 48 48 false BL true 0.3871 0.3871 0.3871 0.3871 1 OV MX 36 36 40 40 false BL true 0.3226 0.3226 0.3226 0.3226 1 OV MX 40 40 32 32 false BL true 0.2581 0.2581 0.2581 0.2581 1 OV MX 44 44 24 24 false BL true 0.1936 0.1936 0.1936 0.1936 1 OV MX 48 48 16 16 false BL true 0.129 0.129 0.129 0.129 1 OV MX 52 52 8 8 false BL true BL 1 OV ] ME ] ME ED DO $ /Button(#40)BO 484 355 55 45 /Times-Roman 18 BL WH true false 0 (Button)10 14 /Drawing BD MX 0 0 49 39.998 false BL false WH 1 DR [ MX 0 0 49 39.998 false BL false WH 1 DR [ 0.5 0 0 0.435 25 39.998 48 -40 true BL false WH 4 0 AR 0.5 0 0 0.435 25 39.998 -50 -39.0819 true BL false WH 4 0 AR 0.5 0 0 0.435 23 8.695 52 32 true BL false WH 4 0 AR 0.5 0 0 0.435 15.001 9.434 -30 32.1857 true BL false WH 4 0 AR 0.5 0 0 0.435 7.001 0 32 20 true BL false WH 4 0 AR 0.5 0 0 0.435 7.001 0 16 20.691 true BL false WH 4 0 AR ] ME ] ME ED DO /Action { [] /Show /ShapesPopText Send } def $ /EditText(ShapesPopText)BO 15 135 510 260 /Helvetica 24 BL 0.896 0.896 0.896 1 false false [()(Buttons can be any shape created by the drawing tool.)()(This stack is just a collection of button shapes.)()(\(There are no button scripts here\).)()]()/Center false 0 0 0 0 0 9 [[0 0 0 ][0 40 1 ][40 13 1 ][0 0 2 ][0 49 3 ][0 0 4 ][0 35 5 ][0 0 6 ]]true false false true false 0.6 0.6 0.6 0.6 BL WH 0 0 0 10 DO /Action { Hide } def /OnOpen { Hide } def $ ]DO $ /Card(#19)BO 4 #g [/Button(#41)BO 45 345 35 55 /Times-Roman 18 BL WH true false 0 (Button)10 14 /Drawing BD MX 0 0 29.328 48.002 false BL false WH 1 DR [ 1.222 0 0 0.875 0 0 24 54.8589 true BL false WH 1 /Times-Bold /Left [(?)] TE ] ME ED DO $ /Button(#50)BO 95 345 50 50 /Times-Roman 18 BL WH true false 0 (Button)10 14 /Drawing BD MX 0 0 44 47 false BL false WH 1 DR [ MX 0 0 44 47 false BL false WH 1 DR [ MX 0 0 44 44 true BL true BL 1 10 RR MX 1 3 40 40 true BL true WH 1 10 RR MX 10 0 24 47 true BL false WH 1 /Times-Bold /Left [(?)] TE ] ME ] ME ED DO $ /Button(#32)BO 35 265 55 45 /Times-Roman 18 BL WH true false 0 (Button)10 14 /Drawing BD MX 0 0 49 39.998 false BL false WH 1 DR [ MX 0 0 49 39.998 false BL false WH 1 DR [ 0.5 0 0 0.435 25 39.998 48 -40 true BL false WH 4 0 AR 0.5 0 0 0.435 25 39.998 -50 -39.0819 true BL false WH 4 0 AR 0.5 0 0 0.435 23 8.695 52 32 true BL false WH 4 0 AR 0.5 0 0 0.435 15.001 9.434 -30 32.1855 true BL false WH 4 0 AR 0.5 0 0 0.435 7.001 0 32 20 true BL false WH 4 0 AR 0.5 0 0 0.435 7.001 0 16 20.691 true BL false WH 4 0 AR ] ME ] ME ED DO $ /Button(#33)BO 115 270 40 30 /Times-Roman 18 BL WH true false 0 (Button)10 14 /Drawing BD MX 0 0 37 25 false BL false WH 1 DR [ MX 0 0 37 25 false BL false WH 1 DR [ MX 0 6 37 19 false BL true 0.4839 0.4839 0.4839 0.4839 1 OV MX 3 0 16 9 false BL true 0.4839 0.4839 0.4839 0.4839 1 [[5 9] [5 9] [6 5] [0 0] [9 2] [12 4] [16 7]] PO ] ME ] ME ED DO $ /Button(#34)BO 150 320 200 100 /Times-Roman 18 BL WH true false 0 (Button)10 14 /Drawing BD MX 0 0 196 96 false BL false WH 1 DR [ MX 0 0 196 96 false BL false WH 1 DR [ MX 0 0 196 96 false BL false WH 1 DR [ MX 0 0 196 96 false BL true 0.8065 0.8065 0.8065 0.8065 1 RE MX 20 20 152 56 false BL false WH 1 DR [ MX 4 4 144 48 false BL true 0.5807 0.5807 0.5807 0.5807 1 RE MX 0 0 152 4 false BL true BL 1 [[0 0] [0 0] [4 4] [152 4] [152 0]] PO MX 148 4 4 52 false BL true BL 1 [[0 48] [0 48] [4 52] [4 0] [0 0]] PO MX 0 0 4 56 false BL true WH 1 [[0 0] [0 0] [4 4] [4 56] [0 56]] PO MX 4 52 148 4 false BL true WH 1 [[0 4] [0 4] [0 0] [144 0] [148 4]] PO ] ME ] ME MX 28 28 136 39.9999 false BL false WH 1 /-monotype-rockwell-bold-i-normal--0-0-0-0-p-0-iso8859-1 /Left [(Help!)] TE ] ME ] ME ED DO $ /Button(#35)BO 60 20 95 155 /Times-Roman 18 BL WH true false 0 (Button)10 14 /Drawing BD MX 0 0 87.998 151.998 false BL false WH 1 DR [ 0.5 0 0 0.475 0 0 176 320 false BL false WH 1 DR [ MX 0 240 176 80 false BL false WH 1 DR [ MX 0 0 176 80 false BL true 0.8065 0.8065 0.8065 0.8065 1 RE MX 12 12 152 60 false BL false WH 1 DR [ MX 4 4 144 48 false BL true 0.5807 0.5807 0.5807 0.5807 1 RE -0.6316 0 0 0 116 60 152 4 false BL false WH 1 DR [ MX 0 0 152 4 false BL true BL 1 [[0 0] [0 0] [4 4] [152 4] [152 0]] PO ] ME MX 0 0 152 4 false BL true WH 1 [[4 4] [4 4] [0 0] [152 0] [152 4]] PO MX 148 4 4 52 false BL true WH 1 [[0 48] [0 48] [4 52] [4 0] [0 0]] PO MX 0 0 4 56 false BL true BL 1 [[0 0] [0 0] [4 4] [4 56] [0 56]] PO MX 4 52 148 4 false BL true BL 1 [[0 4] [0 4] [0 0] [144 0] [148 4]] PO ] ME ] ME MX 0 160 176 80 false BL false WH 1 DR [ 178 #g 179 #g ] ME MX 0 80 176 80 false BL false WH 1 DR [ 178 #g 179 #g ] ME MX 0 0 176 80 false BL false WH 1 DR [ 178 #g 179 #g ] ME ] ME ] ME ED DO $ /Button(#36)BO 165 25 255 135 /Times-Roman 18 BL WH true false 0 (Button)10 14 /Drawing BD MX 0 0 247.998 127.998 false BL false WH 1 DR [ MX 0 0 247.998 127.998 false BL false WH 1 DR [ 1.2653 0 0 1.3333 0 0 196 96 false BL false WH 1 DR [ MX 0 0 196 96 false BL true 0.8065 0.8065 0.8065 0.8065 1 RE MX 24 20 152 60 false BL false WH 1 DR [ MX 4 4 144 48 false BL true 0.5807 0.5807 0.5807 0.5807 1 RE -0.6316 0 0 0 116 60 152 4 false BL false WH 1 DR [ MX 0 0 152 4 false BL true BL 1 [[0 0] [0 0] [4 4] [152 4] [152 0]] PO ] ME MX 0 0 152 4 false BL true WH 1 [[4 4] [4 4] [0 0] [152 0] [152 4]] PO MX 148 4 4 52 false BL true WH 1 [[0 48] [0 48] [4 52] [4 0] [0 0]] PO MX 0 0 4 56 false BL true BL 1 [[0 0] [0 0] [4 4] [4 56] [0 56]] PO MX 4 52 148 4 false BL true BL 1 [[0 4] [0 4] [0 0] [144 0] [148 4]] PO ] ME ] ME 0.3636 0 0 0.4 34 64 176 80 false BL false WH 1 DR [ 178 #g 179 #g ] ME 0.3636 0 0 0.4 34 32 176 80 false BL false WH 1 DR [ 178 #g 179 #g ] ME 0.3636 0 0 0.4 94 32 176 80 false BL false WH 1 DR [ 178 #g 179 #g ] ME 0.3636 0 0 0.4 154 32 176 80 false BL false WH 1 DR [ 178 #g 179 #g ] ME 0.3636 0 0 0.4 94 64 176 80 false BL false WH 1 DR [ 178 #g 179 #g ] ME 0.3636 0 0 0.4 154 64 176 80 false BL false WH 1 DR [ 178 #g 179 #g ] ME ] ME ] ME ED DO $ /Button(#55)BO 200 180 315 110 /Times-Roman 18 BL WH true false 0 (Button)10 14 /Drawing BD MX 0 0 312.0077 103.9836 false BL false WH 1 DR [ MX 0 0 312.0077 103.9836 false BL false WH 1 DR [ 0.5098 0 0 0.619 54.0443 13.3086 64 24 false BL true 0.1936 0.1936 0.1936 0.1936 1 [[8 16] [0 20] [20 0] [48 0] [64 24] [44 12] [24 12]] SP 0.5098 0 0 0.619 121.3398 8.3564 68 24 false BL true 0.1936 0.1936 0.1936 0.1936 1 [[4 24] [0 20] [24 0] [56 0] [68 24] [52 12] [28 12]] SP 0.5098 0 0 0.619 176.3966 5.8806 96 28 false BL false WH 1 DR [ MX 0 0 96 28 false BL true 0.1936 0.1936 0.1936 0.1936 1 [[36 16] [0 28] [28 0] [68 0] [96 28] [60 16]] SP ] ME 2.7858 0 0 0.9284 0 0 112 112 false BL true 0.9032 0.9032 0.9032 0.9032 1 OV 2.7858 0 0 0.9284 11.1436 3.7137 104 104 false BL true 0.8387 0.8387 0.8387 0.8387 1 OV 2.7858 0 0 0.9284 22.2866 7.4276 96 96 false BL true 0.7742 0.7742 0.7742 0.7742 1 OV 2.7858 0 0 0.9284 33.4297 11.1415 88 88 false BL true 0.7097 0.7097 0.7097 0.7097 1 OV 2.7858 0 0 0.9284 44.5726 14.8553 80 80 false BL true 0.6452 0.6452 0.6452 0.6452 1 OV 2.7858 0 0 0.9284 55.7158 18.5686 72 72 false BL true 0.5807 0.5807 0.5807 0.5807 1 OV 2.7858 0 0 0.9284 66.8615 22.2823 64 64 false BL true 0.5161 0.5161 0.5161 0.5161 1 OV 2.7858 0 0 0.9284 78.0018 25.996 56 56 false BL true 0.4516 0.4516 0.4516 0.4516 1 OV 2.7858 0 0 0.9284 89.146 29.7098 48 48 false BL true 0.3871 0.3871 0.3871 0.3871 1 OV 2.7858 0 0 0.9284 100.2892 33.424 40 40 false BL true 0.3226 0.3226 0.3226 0.3226 1 OV 2.7858 0 0 0.9284 111.4337 37.1368 32 32 false BL true 0.2581 0.2581 0.2581 0.2581 1 OV 2.7858 0 0 0.9284 122.5763 40.8511 24 24 false BL true 0.1936 0.1936 0.1936 0.1936 1 OV 2.7858 0 0 0.9284 133.7169 44.5643 16 16 false BL true 0.129 0.129 0.129 0.129 1 OV MX 144 45.998 24 12 false BL true WH 1 OV ] ME ] ME ED DO $ ]DO $ /Card(#39)BO 4 #g [/Button(#46)BO 35 90 225 195 /Times-Roman 18 BL WH true false 0 (Button)10 14 /Drawing BD MX 0 0 218.6163 189.7186 false BL false WH 1 DR [ MX 0 0 218.6163 189.7186 false BL false WH 1 DR [ 0.866 -0.5 0.5 0.866 89.5663 86.9553 40.4725 92.1001 false BL true 0.6129 0.6129 0.6129 0.6129 1 OV 0.6428 -0.766 0.766 0.6428 139.6176 145.7207 56 16 false BL true 0.6129 0.6129 0.6129 0.6129 1 OV 0.866 -0.5 0.5 0.866 81.9047 125.6855 42.6405 11.4276 false BL true 0.6129 0.6129 0.6129 0.6129 1 OV 0.7661 0.6428 -0.6428 0.7661 179.9047 103.6855 42.6405 11.4276 false BL true 0.6129 0.6129 0.6129 0.6129 1 OV 0.9397 0.342 -0.342 0.9397 87.6163 121.7207 64.8864 17.0233 false BL true 0.6129 0.6129 0.6129 0.6129 1 OV MX 131.6176 149.7207 44 40 false BL true 0.6774 0.6774 0.6774 0.6774 1 OV MX 166.6176 170.7207 4 4 false BL true 0.3871 0.3871 0.3871 0.3871 1 OV MX 156.6176 152.7207 13 13 false BL true 0.6452 0.6452 0.6452 0.6452 1 [[1 12] [0 13] [13 5] [8 0]] PO 0.866 -0.5 0.5 0.866 146.4668 166.4609 -7.1965 13.304 false BL true 0.6452 0.6452 0.6452 0.6452 1 OV MX 201.6176 130.7207 17 12 false BL true 0.5161 0.5161 0.5161 0.5161 1 OV MX 107.6176 108.7207 17 12 false BL true 0.5161 0.5161 0.5161 0.5161 1 OV -0.5 -0.866 0.866 -0.5 113.6176 96.7186 24 80 false BL true 0.6129 0.6129 0.6129 0.6129 1 OV -0.866 0.5 -0.5 -0.866 182.5234 51.2402 17.7723 59.1678 false BL true 0.6129 0.6129 0.6129 0.6129 1 OV MX 141.6176 2.7184 33 12 false BL true 0.5161 0.5161 0.5161 0.5161 1 OV -0.342 0.9397 -0.9397 -0.342 126.3969 79.174 24 80 false BL true 0.6129 0.6129 0.6129 0.6129 1 OV -0.866 -0.5 0.5 -0.866 34.6367 115.3112 17.7723 59.1678 false BL true 0.6129 0.6129 0.6129 0.6129 1 OV 0.9848 0.1736 -0.1736 0.9848 2.0838 98.8846 33 12 false BL true 0.5161 0.5161 0.5161 0.5161 1 OV ] ME ] ME ED DO $ /Button(#59)BO 315 90 230 165 /Times-Roman 18 BL WH true false 0 (Button)10 14 /Drawing BD MX 0 0 223 160.1233 false BL false WH 1 DR [ MX 0 0 223 160.1233 false BL false WH 1 DR [ MX 218 70.459 5 5 false BL true 0.6129 0.6129 0.6129 0.6129 1 OV 0.8191 -0.5736 0.5736 0.8191 108 125.459 80 16 false BL true WH 1 OV MX 8 25.458 168 60 false BL true WH 1 OV MX 164 53.459 56 40 false BL true WH 1 OV 0.9659 -0.2588 0.2588 0.9659 4 13.458 52 16 false BL true WH 1 OV 0.866 -0.5 0.5 0.866 18.661 8.6018 -19.8573 49.5923 false BL true WH 1 OV 0.7071 -0.7071 0.7071 0.7071 119.998 33.4573 45.2545 16.0018 false BL true WH 1 OV MX 144 2.4578 28 16 false BL true WH 1 OV 0.4226 -0.9063 0.9063 0.4226 147.4609 153.08 77.6659 16.6659 false BL true WH 1 OV MX 0 53.459 16 28 false BL true WH 1 OV MX 194 80.459 6 6 false BL true BL 1 OV ] ME ] ME ED DO $ ]DO $ /Card(#45)BO 4 #g [/Button(#42)BO 250 235 235 85 /Times-Roman 18 BL WH true false 0 (Button)10 14 /Drawing BD MX 0 0 229.9923 78.885 false BL false WH 1 DR [ MX 0 0 229.9923 78.885 false BL false WH 1 DR [ 0.3485 0 0 0.3414 53.9999 54 249.623 72.8879 false BL false WH 1 DR [ MX 127.9998 0 121.623 72.8879 false BL false WH 1 DR [ 0.7071 0.7071 -0.7071 0.7071 31.113 -31.113 128 65.0551 false BL true 0.5161 0.5161 0.5161 0.5161 1 [[33.9413 50.913] [0 44] [36.7721 65.0551] [73.5389 62.2264] [110.3085 36.7721] [128 0] [96 32] [60 48]] SP ] ME -1.0853 0 0 0.9451 131.9998 4 121.623 72.8879 false BL false WH 1 DR [ 271 #g ] ME MX 115.1119 4.8879 28 16 false BL true 0.3548 0.3548 0.3548 0.3548 1 OV ] ME 0.4366 0 0 0.4237 120.9999 19 249.623 72.8879 false BL false WH 1 DR [ 270 #g 272 #g 273 #g ] ME 0.4406 0 0 0.4786 0 0 249.623 72.8879 false BL false WH 1 DR [ 270 #g 272 #g 273 #g ] ME ] ME ] ME ED DO $ /Button(#44)BO 30 90 355 135 /Times-Roman 18 BL WH true false 0 (Button)10 14 /Drawing BD MX 0 0 352 132 false BL false WH 1 DR [ MX 0 0 352 132 false BL false WH 1 DR [ MX 0 4 352 128 false BL true 0.7419 0.7419 0.7419 0.7419 1 [[352 8] [0 0] [28 36] [40 32] [64 72] [80 64] [100 68] [116 80] [128 96] [144 80] [168 96] [192 128] [232 80] [268 60] [280 68] [312 32]] PO MX 0 4 348 68 false BL true 0.6774 0.6774 0.6774 0.6774 1 [[0 0] [20 0] [348 8] [316 16] [292 32] [276 24] [252 32] [240 44] [216 56] [192 68] [164 44] [128 56] [92 40] [68 44] [52 20]] PO MX 24 0 308 32 false BL true 0.5807 0.5807 0.5807 0.5807 1 [[0 4] [36 0] [308 12] [272 20] [252 16] [224 24] [188 32] [156 24] [124 24] [52 28] [36 16]] PO ] ME ] ME ED DO $ /Button(#49)BO 360 150 70 70 /Times-Roman 18 BL WH true false 0 (Button)10 14 /Drawing BD MX 0 0 64 64 false BL false WH 1 DR [ MX 0 0 64 64 false BL true 0.7742 0.7742 0.7742 0.7742 1 OV ] ME ED DO $ /Button(#54)BO 505 5 60 55 /Times-Roman 18 BL WH true false 0 (Button)10 14 /Drawing BD MX 0 0 56 52 false BL false WH 1 DR [ 17 #g ] ME ED DO $ ]DO $ ][/Button(#2)BO 535 430 25 25 /Times-Roman 18 BL WH true false 0 (PushButton)10 14 /Drawing BD MX 0 0 16 16 false BL false WH 1 DR [ MX 0 0 16 16 false BL false WH 1 DR [ MX 0 8 8 8 true BL false WH 1 0 LI MX 0 4 12 12 true BL false WH 1 0 LI MX 4 0 12 12 true BL false WH 1 0 LI MX 8 0 8 8 true BL false WH 1 0 LI MX 4 4 8 8 true BL false WH 1 0 LI ] ME ] ME ED DO /Action { NIL /CloseStack MyStack Send } def $ /EditText(Title)BO 5 425 155 25 /Helvetica-BoldOblique 16 WH 0.8387 0.8387 0.8387 0.8387 true false [(PexamplesShapes)]()/Left false 0 0 0 0 0 1 [[0 15 0 ]]true false false false false 0.6 0.6 0.6 0.6 BL 1 0.72 0.65 1 0 0 0 10 DO /OnOpen { MyStack /ObjectName get 32 string cvs SetValue } def $ ]{0 0 moveto 0 461 lineto 569 461 lineto 569 0 lineto closepath closepath } DO /SaveStack { /SaveStack SuperDo NIL /OnOpen /Title Send } def $ HNEnd !Funky!Stuff! Paul Rutter Philips Labs per@philabs.philips.com philabs!per@uunet From don Wed Apr 25 22:50:57 1990 Date: Wed, 25 Apr 90 22:50:57 -0400 To: NeWS-makers@brillig.umd.edu Subject: what's the deal with cvi? From: hbo!deven (Jimmy G. Devenport) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) ok, in NeWS 1.1 this works: hbo% psh executive Welcome to NeWS Version 1.1 ( ) cvi pstack 0 quit hbo% but in X11/NeWS (NeWS 2.0) it does this: hbo% psh executive Welcome to X11/NeWS Version 1.0.1 ( ) cvi pstack ***ERROR*** Process: 0x2b4088 (sin client) Error: syntaxerror Stack: ( ) Executing: 'cvi' At: Reading file(?,W,R) ***** ( ) quit hbo% why? I looked up syntaxerror in the PostScript redbook and the only reason you are SUPPOSED to get syntaxerror is if the brackets '(' '<' or '{' do not have matching brackets ')' '>' or '}', or vise versa or if "a character other than a hexadecimal digit or white space character appears within a hexadecimal string literal bracketed by '<...>'." (page 230, red book)....malformed numbers do not produce a syntaxerror etc, etc....but the problem is this: >>in NeWS 1.1 it doesn't care what's in the string, it just cvi's it >>in NeWS 2.0 (XNeWS) if the first character in a string is not a number it gives this >> syntaxerror thing.... also if I do this on our PostScript printer: >>( ) cvi 20 string cvs 50 50 moveto show showpage thru our error handler on the printer we get the same syntaxerror..... and if you do this on the PS printer: >>(1a ) cvi 20 string cvs 50 50 moveto show showpage you get a typecheck even though a : >>(1a ) stringtype 20 string cvs 50 50 moveto show showpage prints a page that says "stringtype" so it is a string...but: >>(3.3E1) cvi 20 string cvs 50 50 moveto show showpage works just like the redbook says....so why does it work in NeWS 1.1 and not in NeWS 2.0 and in PostScript? and so that is a bug from NeWS 1.1 and a feature of NeWS 2.0, right?.....jd Jimmy G. Devenport Applied Computing Systems 2075 Trinity Drive Suite Lower Level Los Alamos, NM 87544 (505) 662-3309 Home phone: (505) 662-5934 hbo!deven@atlantis.ees.anl.gov jd From don Wed Apr 25 22:51:11 1990 Date: Wed, 25 Apr 90 22:51:11 -0400 To: NeWS-makers@brillig.umd.edu Subject: Alternative/Nifty NeWS clocks? From: noose.ecn.purdue.edu!frenchhorn.ecn.purdue.edu!mckay@iuvax.cs.indiana.edu (Dwight D. McKay) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) I'm a clock collector. Are there any alternative or nifty looking clocks out there for OpenWindows besides the roundclock and technicron? Does anyone have a version of technicron which has fewer bugs then the one provided with OpenWindows1.1? --Dwight D. McKay, ECN Workstation Software Support --Purdue University, Engineering Computer Network --Office: MSEE 104f, Phone: (317) 494-3561 --ARPAnet: mckay@harbor.ecn.purdue.edu, Usenet: ...rutgers!pur-ee!mckay From don Wed Apr 25 22:51:25 1990 Date: Wed, 25 Apr 90 22:51:25 -0400 To: NeWS-makers@brillig.umd.edu Subject: synchronize from crosswind From: swrinde!cs.utexas.edu!usc!elroy.jpl.nasa.gov!hacgate!sanford@ucsd.edu (Sanford Chan) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Has anyone used this office automation product? It has Day-at-a-Time private calendars, To-Do Lists, a multi-user appointment calendar, etc. How many users do you have? Thanks. From don Wed Apr 25 23:03:01 1990 Date: Wed, 25 Apr 90 23:03:01 -0400 To: NeWS-makers@brillig.umd.edu Subject: Alternative/Nifty NeWS clocks? From: don (Don Hopkins) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) There are some extremely nifty clocks in the NeWS software collection available via anonymous ftp from tumtum.cs.umd.edu. Set binary mode, and get the file NeWS/news-tape.tar.Z, unpack it, and the clocks are in the directory news-tape/utilities/clocks. Several *very* novel approaches to an age old problem! -Don From don Thu Apr 26 08:34:26 1990 Date: Thu, 26 Apr 90 08:34:26 -0400 To: NeWS-makers@brillig.umd.edu Subject: re: what's the deal with cvi? From: David Burgess Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Is the complaint that NeWS2.0 is closer (than News1.1) to the redbook on the cvi operator, or that it is further from the redbook on the use of syntaxerror? My opinion is that NeWS drawing code should be 100% compatible with PostScript printers. David Burgess ===== Astronomy Unit: QMW: London, UK From don Mon Apr 30 14:31:29 1990 Date: Mon, 30 Apr 90 14:31:29 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: what's the deal with cvi? From: Rafael Bracho Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Indeed it is a feature that '( ) cvi' produces a syntaxerror in NeWS 2.0, thus being more compatible with the redbook. However, the following is not a feature: '(-0.5) cvi' still produces a syntaxerror. But, take heart! NeWS 2.1 (OpenWindows 2.0) does the right thing for '(-0.5) cvi', i.e., returns 0 -- at least the beta server does. -Rafael From don Mon Apr 30 14:31:57 1990 Date: Mon, 30 Apr 90 14:31:57 -0400 To: NeWS-makers@brillig.umd.edu Subject: Freely Redistributable Postscript Interpreters From: usc!cs.utexas.edu!texbell!sugar!ficc!peter@ucsd.edu (Peter da Silva) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) There was discussion a while back on comp.windows.news about freely redistributable interpreters for the postscript language. I'm interested in such a beast. I don't need any of the rendering primitives, just the core language, mainly as a method for getting a forth-like language in through the back door. "Forth" is "ugly", you see, but "postscript" is "hot"... I know about GNU's Ghostscript, but I can't put up with the strings on it. So... has anything come out of this discussion? -- _--_|\ `-_-' Peter da Silva. +1 713 274 5180. / \ 'U` Have you hugged your wolf today? \_.--._/ v Disclaimer: People have opinions, organisations have policy. From don Mon Apr 30 14:33:22 1990 Date: Mon, 30 Apr 90 14:33:22 -0400 To: NeWS-makers@brillig.umd.edu Subject: Visibility rules From: zaphod.mps.ohio-state.edu!rpi!uupsi!sunic!tut!ks@tut.cis.ohio-state.edu (Syst{ Kari) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) It looks like the class-mechanism in NeWS (in OpenLook 1.0) mixes so called dynamic and static binding. If I run the the included PostScript code with psh I get 3 4 3 I think it should be 3 4 4. If static scoping is used it could be 3 3 3. ------- start of ps-code -------- /x 3 def % goes to userdict /testdict 2 dict def testdict begin /x 4 def end /O Object [] classbegin /tell_x { % just leave the value of visible 'x' to stack x } def classend def /O1 O dictbegin /obj null def dictend classbegin /new { /new super send begin /obj exch def currentdict end } def /tell_x { testdict begin % put dict[x=4] to stack /tell_x obj send end } def classend def /o /new O send def /o1 o /new O1 send def /tell_x o send = % should be 3 and is 3 testdict begin /tell_x o send = % should be 4 and is 4 end /tell_x o1 send = % shouldn't this be 4 ? However, it is 3 ! -- This article represents my personal views. Peter da Silva: "X is the Fortran of windowing systems." - I agree Kari Systa, Tampere Univ. Technology, Box 527, 33101 Tampere, Finland work: +358 31 162585 fax: +358 31 162913 home: +358 31 177412 From don Mon Apr 30 14:34:30 1990 Date: Mon, 30 Apr 90 14:34:30 -0400 To: NeWS-makers@brillig.umd.edu Subject: X11+olwm+DeskSet+binder+filemgr From: cadence!cadence.cadence.com!horen@uunet.uu.net (Jonathan B. Horen ) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) No, this is *not* a mistaken cross-post from alt.sex.bondage (a little joke on "binder"... oh, well, it's been a long day... ) OK, seriously. I am running X11R4 on a Sun-3/60, using the OpenLook(tm) Window Manager, and am able to access (and use) Sun's OpenWindows DeskSet(tm) clients (version 1.0 pre-FCS). They're nice. But there is a *lot* of information missing from the OpenWindows 1.0 User's Guide and the OpenWindows 1.0 Server Guide. 1. The Workspace menu that appears when running X11 with the Xsun server is *not* the same as the one that pops-up if I run the X11/XNews server -- choices on the Utilities Menu, such as Lock Screen and Save Workspace, are missing. 2. Is the Workspace menu used in this case the same as that used by X11/XNews (that is, openwin-menu)? If not, what is it, and where the heck is it? Can I use buildmenu to modify/change it or to create a wholly new one? 3. Binder lets me associate a particular kind of file with an icon of my choice/design, and to associate double-clicking on that icon with executing a particular command (i.e., binding all coredump files with an "explosive" icon, on which double-clicking activates /bin/rm -f and deletes the selected file). Does anyone know how to do any of the following: a. Associate a cat/man file that is already bound to a custom icon, with the xman client? (the problem is that there does not seem to be a command-line resource for specifying a particular file, other than the helpfile, for xman) b. Associate a cat/man file that is bound to the default icon, with xterm? (the problem is that it is bound, by default, with the textedit client, which doesn't display text as highlighted, only the control-characters) 4. OpenLook window manager lets me display DeskSet clients in their iconic form using my own icons. However, X11 clients are assigned default icons. What can be done? Is there a listing/explanation of user-configurable resources for the olwm, like there is for the mwm or twm? OK, enough. It's late and I'm tired. If there are any answers that are correct, I'll post a summary. We're all going up a learning curve, it's just that some are past the cloud line and don't see those of us that are below... dB-{) +------------------------+--------------------------------------------------+ | _J_o_n_a_t_h_a_n_ _B_._ _H_o_r_e_n_ _ _ _ _ | | . | | | _C_a_d_e_n_c_e_ _D_e_s_i_g_n_ _S_y_s_t_e_m_s | |__ (/\ \ / |__ Lilmod Al Manat Lelamed | | | _/ / _\ _\/ _/ Lilmod Al Manat La'asot | | _h_o_r_e_n_@_c_a_d_e_n_c_e_._c_o_m | -: - | +------------------------+--------------------------------------------------+ From don Tue May 1 20:31:00 1990 Date: Tue, 1 May 90 20:31:00 -0400 To: NeWS-makers@brillig.umd.edu Subject: SunFlash:14.01 PR: Many F3 (OpenFonts) Available From: lugs@Sun.COM (Miyong Byun, User Programs) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) -------------------------------------------------------------------------------- 627 F3 FONTS NOW AVAILABLE SunFLASH Vol 15 #1 March 1990 -------------------------------------------------------------------------------- AFTER JUST A YEAR, SUN'S FONT SELECTION EXCEEDS ALL OTHER INDUSTRY SUPPLIERS; 627 F3 FONTS NOW AVAILABLE New TypeScaler Software Now Faster, Has Less Code MOUNTAIN VIEW, Calif. --March 5, 1990-- Sun Microsystems today announced that 627 F3(TM) format fonts are available to Sun workstation users. Sun's font technology, called OpenFonts(TM), was introduced just one year ago and licensed to major type houses such as Linotype, Monotype, Bigelow & Holmes and others. OpenFonts now has a selection of high-quality, compatible fonts exceeding that of the industry's leading font suppliers, making good on Sun's promise to rapidly expand its supply of fonts. At the heart of OpenFonts is F3, an open, intelligent outline font description. These fonts are automatically created with Sun's TypeMaker(TM) software, then generated as bitmaps for any raster device -- from computer screens to typesetters -- at any resolution by TypeScaler(TM) software. OpenFonts includes such inexpensive, easy-to-use tools that more F3 fonts have been created in a year than major font suppliers have been able to produce in several years of using PostScript tools. According to Wayne Rosing, vice president of Sun's Desktop Systems and Graphics Group, "The confusion in the font arena over Adobe versus Apple/Microsoft means that users no longer have a clear choice. However, the large selection of high-quality fonts from leading suppliers available through OpenFonts means there is now a simple, low-cost solution." Performance Improvements Sun also unveiled its latest release of TypeScaler software, which generates bitmaps 30 percent faster than the previous version. There is also significantly less code in this new release, making it as small or smaller than competing products and reducing system memory demands. These new developments make TypeScaler software and F3 format fonts an attractive alternative to Adobe's TypeManager product or Apple's Royal font format. Additional Companies License OpenFonts Island Graphics of San Rafael, Calif., will incorporate TypeScaler and F3 fonts into its new office publishing software packages, IslandWrite, IslandPaint and IslandDraw. Island plans to offer versions of this software, known as the Island Office Series, for workstations made by Sun and Hewlett-Packard. "We selected Sun's font scaling technology because it gives us the best character shapes at intermediate sizes over the wide range of graphics displays that the X Window System supports," stated Paul Remer, vice president of Island Graphics. Autologic, Inc., of Thousand Oaks, Calif., also announced its plans to produce 200 faces from its font library in Sun's F3 font format. The Autologic library is comprised of 1,500 typefaces, including special-purpose fonts like Hebrew and Arabic scripts. URW Unternehmensberatung of Hamburg, Germany, an official partner of International Typeface Corporation, is scheduled to produce 140 ITC-trademarked faces using the F3 format by the end of 1990. The company will also offer F3 fonts for the rapidly developing Eastern European market. "There should be well over 1,000 F3 fonts available within 10 months," Rosing said. OpenFonts Part of OpenWindows OpenFonts -- which consists of the F3 font format, TypeScaler and TypeMaker -- is part of Sun's OpenWindows(TM) application environment, Sun's next-generation solution for bringing ease of use to UNIX(R). OpenWindows also includes the intuitive OPEN LOOK(TM) graphical user inteface, the XView(TM) toolkit -- used to develop OPEN LOOK applications -- and the X11/NeWS window system. Software developers using OpenWindows can create applications that utilize F3 fonts. Users of Sun workstations can also get OpenFonts as part of OpenWindows. While 57 resident fonts are included in OpenWindows, developers and end users can acquire many more at low cost from type suppliers. F3 format fonts can be used in any F3-compatible environment, such as OpenWindows and versions of AT&T's new UNIX System V Release 4 that contain OpenWindows. Since OpenFonts is fully licensable, F3 fonts are also available in products that incorporate Sun's TypeScaler software, such as Frame Technology's FrameMaker 2.0 or ScriptWorks from Harlequin Ltd. Sun Microsystems, Inc., headquartered in Mountain View, Calif., is a leading worldwide supplier of network-based distributed computing systems, including professional workstations, servers and UNIX operating system and productivity software. ### F3, TypeMaker, TypeScaler, OpenFonts, XView and OpenWindows are trademarks and X11/NeWS is a registered trademark of Sun Microsystems. OPEN LOOK is a trademark of AT&T. UNIX is a registered trademark of AT&T. All other products or services mentioned in this document are identified by the trademarks or service marks of their respective companies or organizations. Press Contact: Cindee Mock (415) 336-3563 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Sunflash is an electronic mail news service from Sun Microsystems, Ft. Lauderdale, FL. Please address comments to John McLaughlin (sun!sunvice!johnj or johnj@sunvice.sun.COM). (305) 776-7770. From don Wed May 2 23:20:39 1990 Date: Wed, 2 May 90 23:20:39 -0400 To: NeWS-makers@brillig.umd.edu Subject: NeWS Tips for Silicon Graphics 4D From: eagle!news@ucbvax.Berkeley.EDU (Jeff Hanson) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) I am the administer of six Silicon Graphics IRIS 4D workstations. NASA Lewis as a whole has about 40. These workstations is NeWS as their windowing system. I am looking for SGI specific hints, code, etc. Most of what I have seen in this news group has been Sun oriented. In particular, if anyone has ported the NeWS tape from Sun to SGI I would like to here about it. (Basic help on BSD to SYSV conversion would be great, as well). Thanks in advance! -- *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* \ / \ / \ / \ / \ / \ / Jeff Hanson \ / \ / \ / \ / \ / \ / * ViSC: Better * tohanson@gonzo.lerc.nasa.gov * * * * * * / \ / \ Science / \ / \ NASA Lewis Research Center / \ / \ Through / \ / \ * * * * * * * Cleveland, Ohio 44135 * * * Pictures * * \ / \ / \ / \ Telephone - (216) 433-2284 Fax - (216) 433-2182 \ / \ / \ / *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* From don Fri May 4 11:30:41 1990 Date: Fri, 4 May 90 11:30:41 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: How to reconfigure keyboard via NeWS (SGI 4Sight) From: rpw3@rigden.wpd.sgi.com (Rob Warnock) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) In article <1990May3.202512.18213@agate.berkeley.edu> larry@pylos.cchem.Berkeley.EDU (Raymond L. June) writes: +--------------- | We have recently acquired a PI and use NeWS. While montioring this | group for a couple of weeks, I have noticed the mention of a program | called keyswap.ps to switch the control and capslock keys. However, who | archives stuff like this for SG users (an internet address would be nice). +--------------- I don't archive anything, but since I posted it once (copied from somebody else's previous posting), I'll post it again... JUST THIS ONCE MORE! (See below.) [Note for those bored with this: I've answered several more requests by email, maybe this posting will hold 'em for a while...] +--------------- | Also, a way to increase the key repeat rate would also be nice - is there | a parameter in /usr/NeWS/lib or somewhere to set this? +--------------- Not yet. "The next release" has a command to do this... -Rob ----- Rob Warnock, MS-9U/510 rpw3@sgi.com rpw3@pei.com Silicon Graphics, Inc. (415)335-1673 Protocol Engines, Inc. 2011 N. Shoreline Blvd. Mountain View, CA 94039-7311 ============== attachment: keyswap.info ======== In addition to mapping CapsLock to Ctrl, I also mappped NumLock (which I *never* use) back to CapsLock (which I almost never use, but still might like to occasionally). It's *way* out of the way, and impossible to hit by accident. It's kinda cute to hit NumLock and watch the CapsLock LED go on and off... Put the following in your user.ps (at the end, say): { (NeWS/keyswap.ps) LoadFile %map CapsLock => Cntl % Numlock => CapsLock [28420 28582] [28419 28420] replacekeys } stopped pop Then put the attached file (below) in your ~/NeWS/keyswap.ps (or whatever directory you use to keep things user.ps calls -- just remember to adjust the call in user.ps if you move it). Log out and back in. If you want to mess with other keys, note that the magic numbers given above are 0x6F00 + "button number" from "/usr/include/device.h". ============= ~/NEWS/keyswap.ps ================== % From: scotth@harlie.corp.sgi.com % % Earlier, I posted some code to swap the functionality of the Caps Lock % and left-hand Ctrl key. I have now written some code to make key % remapping more flexible. This code is also better because Caps Lock was % still Caps Lock for an instant in the old code. It not does function as % Caps Lock at all in this code. If you put the following in your user.ps % (and take out the stuff I sent out before, if you have it), you can make % any IRIS key behave as any other. This will only work under 3.1 however, % so if you haven't upgraded, you may want to keep the old code until you % do upgrade. /replacekeys { % origkeyvals_array changedkeyvals_array -> - { /changedvals exch def /origvals exch def /keysdict origvals length dict def keysdict begin 0 1 origvals length 1 sub { dup origvals exch get changedvals 3 2 roll get def } for end createevent dup begin /Name origvals def /Priority 2 def /Exclusivity true def end expressinterest { awaitevent dup dup begin /Name get keysdict exch get /Name exch def end redistributeevent } loop } fork pop pop pop } def From don Fri May 4 14:54:53 1990 Date: Fri, 4 May 90 14:54:53 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: NeWS Tips for Silicon Graphics 4D From: hbo!bice (Brent A. Bice) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) The biggest things I've run across are: 1) In the latest version of news on the SGIs, Canvases don't appear to be retained. When I asked the SGI techies 'bout this, they said "Hmmm.. Seems ta be a bug. Why doncha use our 4d libraries instead" So, it seems retained canvases can't be counted on. 2) Next, some NeWS programs assume some size for the framebuffer. Don't do this. You can figure out the width/height of a canvas easily enough. 3) Some primitives (like copyarea) behave differently with real values than they do on the SUNs. I made a scrolling text window that worked great on a SUN, but would gradually get off by 3 or 4 pixels on the SGI unless the window just happened to be the right dimensions for a given text font. 4) Text itself appears to be REALLY slow on the SGI (yep, even worse than under OPENLOOK on a SUN)! Don't assume that it'll be fast like it is on the SUNs. 5) There appears to be a bug in SGI's event handling. If you give an item a downtransition (like a scrollbar for instance) and then drag the mouse around everything appears to be fine, but if you drag the mouse out of the item's canvas, and BACK IN to the canvas, all drag events stop... Hmmmmm.... So the you let go of the mouse button sending the uptransition, and all of the mouse drag events start being trapped again. So (without holding down a button) you can drag the mouse around and move the scrollbar/dial/slider/whatever until you send another downtransition and uptransition (click the mouse button). That's mosta the nasties that I've seen on our SGI here. This is with the latest version of their 4sight. If you're running an older version, you may still have retained canvases (they introduced this bug with the last version upgrade), but you might also have a bug with typedprint. It seemed that some real values would not get typedprinted ok because they were not fixed point (another type that I don't know how to check for). Essentially any real value we were gonna typedprint we had to first do: 10000 mul cvi 10000 div or some such nonsense. This got FIXED with the last update of 4sight. Brent Bice Applied Computing Systems 2075 Trinity Drive Suite Lower Level Los Alamos, NM 87544 (505) 662-3309 bice@atlantis.ees.anl.gov From don Fri May 4 21:20:16 1990 Date: Fri, 4 May 90 21:20:16 -0400 To: NeWS-makers@brillig.umd.edu Subject: bug or feature? From: hbo!deven (Jimmy G. Devenport) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) ok, I ran across this one while I was defining a new item which has about 3 ParentClasses and got a little mixed up (?) and everything looks fine but it gets an error: /InputItem currentdict /errorproc (Label:) () /Right /notify ObjectCanvas InputWidth 0 /new OneLine send store now everything as far as I know was looking great, I had all the comments to show what was on the stack at all the /new's all the way back to the subclass of TextItem (defined in $OPENWINHOME/lib/NeWS/liteitem.ps), BUT this is what happened: InputItem was left undefined! This is easy to fix , but what WAS defined? while looking for the error, and using (NeWS/debug.ps) to catch the error about InputItem being undefined and then looking at the current dictionaries and seeing what was on the dictstack ( "0 dictstack" ), I found something like this: (on the stack) dict[ ... ... dictionary[43/5000]: dictionary[51/5000] ...] now what's wrong with this? ok go into either NeWS 1.1 or NeWS 2.0 (this was under 2.0) and define a window or something or even look at systemdict and you should find that the dict[num]: dict[num] are both the same, ie not dict[num]: dict[someothernum] now how did this happen? I tried messing around in psh trying to get it to happen and did something like this: hbo% psh executive Welcome to NeWS 1.1 /dict1 30 dict def /dict2 50 dict def userdict pstack dict[ /dict2: dictionary[20] /execfile: file(?,W,R) /bye: {'quit'} /OriginatingHost: (hbo) /dict1: dictionary[62] ] dict2 dict1 def pstack dict[ dictionary[20]: dictionary[62] /dict2: dictionary[20] /execfile: file(?,W,R) /bye: {'quit'} /OriginatingHost: (hbo) /dict1: dictionary[62] ] quit... now the previous psh was under NeWS 1.1 but in NeWS 2.0 it's the same (that's where I got the bug in the first place), and the question is why does it do and what's the purpose of defining a dictionary to be another dictionary? and where or how do you or can you get this "literal" (the one on the left) dictionary? also what is the purpose of having something like this? is this what PostScript does? Is there any real documentation or "look out for this" stuff anywhere? and what is the purpose of having in a dictionary a key that has the dictionary defined as being the dictionary? ie: dict[ ...normal dict stuff dictionary[length]: dictionary[length] ] why is NeWS defined this way and are there any special bugs we haven't heard about if these are undef'd (and how do you get rid of them, are they really needed?) ??? and could there be an error defined somewhere that handles this (in a future release of NeWS) ? or maybe I don't know what I'm talking about because it's really not documented....? pretty strange bug? Jimmy G. Devenport Applied Computing Systems 2075 Trinity Drive Suite Lower Level (the dungeon) Lost Almost, NM 87544 (505) 662-3309 hbo!deven@atlantis.ees.anl.gov jd From don Sun May 6 21:05:47 1990 Date: Sun, 6 May 90 21:05:47 -0400 To: NeWS-makers@brillig.umd.edu Subject: add me and a Problem From: kjacob%aludra.usc.edu@usc.edu (Karl Jacob) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Please add me to your mailing list I am just beginning in the NeWS enviroment I have been working with X for about 2 years. I have experimented with the examples and creating windows etc. Recently, I received the docs for tnt (the NeWS toolkit) and have been trying to compile my first tnt app. However, when I try to compile I get the following error cc -o test main.o /X/openwin/lib/libcps.a /X/openwin/lib/libwire.a -g -I/X/openwin/include ld: Undefined symbol _pprintf _PostScript _ps_checkfor _ps_skip _psio_close _ps_currenttag _ps_open_server _pscanf _psio_flush _PostScriptInput _ps_lookingat I think I am linking the correct libraries any ideas any response would be appreciated. Karl Jacob kjacob@usc.edu From don Mon May 7 14:28:50 1990 Date: Mon, 7 May 90 14:28:50 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: bug or feature? From: Rafael Bracho Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) I got confused by your message, but I think you're objecting to the fact that dictionaries can have other dictionaries as keys. This is specified in the red book, page 30, in the second paragraph of the 'Dictionary' section: "Keys are normally name objects; the PostScript syntax and the interpreter are optimized for this most common case. However, a key may be any PostScript object except null ..." So NeWS is simply complying with the red book. -Rafael From don Mon May 7 17:59:24 1990 Date: Mon, 7 May 90 17:59:24 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: add me and a Problem From: hbo!bice (Brent A. Bice) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Well, in response to the linking errors, it looks like you're not linking in the NeWS library. We generally have commands in our Makefile like: cc -c $(CFLAGS) -I$$NEWSHOME/include $(PROGRAM).c cc -o $(PROGRAM) $(CFLAGS) $(PROGRAM).o $$NEWSHOME/lib/libcps.a -lm The NEWSHOME is our environment variable for NeWS 1.1. Under NeWS2.0 (Open Look) you would probably use OPENWINHOME instead... Hope this helps.. Brent Bice Applied Computing Systems 2075 Trinity Drive Suite Lower Level Los Alamos, NM 87544 (505) 662-3309 bice@atlantis.ees.anl.gov From don Mon May 7 18:01:23 1990 Date: Mon, 7 May 90 18:01:23 -0400 To: NeWS-makers@brillig.umd.edu Subject: problem with color maps, rasterfiles & imagecanvas in OW 1.0.1 From: socrates.ucsf.edu!kneller@cgl.ucsf.edu (Don Kneller) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) (Note: This was actually a problem in OW 1.0 as well) PROBLEM SUMMARY: ---------------- *Some* 8-bit indices in rasterfiles seem to "mutate" to other indices when displayed with imagecanvas. BACKGROUND: ----------- I'm using the NeWS imagecanvas procedure to image a rasterfile onto a canvas. The rasterfile is created from a data set which is about 2K X 2K floats in size. The rasterfile is the same size and contains no color map information (ras_type == RT_STANDARD, ras_maptype == RMT_NONE). The rasterfile has the usual raster.h header, the data, and some additional information tacked onto the end to tell my program the encoding between data and 8-bit colormap index. Before using imagecanvas to image the data, a colorsegment is created: { get PSEUDOCOLOR visual from framebuffer /VisualList } % visual createcolormap % colormap /colormap 1 index store % colormap /Visual 1 index send % colormap visual /Size exch send % colormap size 0 % colormap size 0 createcolorsegment % colorsegment /colorseg exch store % - The colorsegment is filled in with the desired colors: /addcolormapentry { % color ndx => - colorseg exch get % color colormapentry dup /Slot get % color colormapentry slot 3 -1 roll % colormapentry slot color putcolor % - } def And the color map is installed: /installcolormap { % bool => - colormap begin dup Installed ne { % bool /Installed exch def % - }{ % bool pop % - } ifelse end } def PROBLEM: -------- The problem I'm having is that *some* of the rasterfile colormap indices seem to "mutate" to other values when displayed with imagecanvas. For example, an index that is 8 in the rasterfile somehow has the index 254 when displayed with imagecanvas. For each rasterfile, only one index seems to be mutated and the index which is mutated isn't always the same, but it is always a small integer like 8 or 16 and it always gets mutated to a large integer like 254 or 255. I've examined the colormap and it looks fine. Changing the colorsegment entry for index 254 does in fact change the color of the on-screen display where the rasterfile had an index of 8. HELP: ----- Any help would be appreciated. ----- Don Kneller UUCP: ...ucbvax!ucsfcgl!kneller INTERNET: kneller@cgl.ucsf.edu BITNET: kneller@ucsfcgl.BITNET From don Mon May 7 23:57:35 1990 Date: Mon, 7 May 90 23:57:35 -0400 To: NeWS-makers@brillig.umd.edu Subject: Selections under NeWS 2.0 From: hbo!bice (Brent A. Bice) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Is it just me, or do the selection services under NeWS 2.0 behave differently under NeWS 2.0??? According to the 2.0 manual, if I make a request-dict (a dictionary containing /SelectionResponder, /Canvas, etc...), and add to it some of my own data (ie, /MyJunk (This is a test) def) and then give it and a rank to setselection, I should be able to do a getselection on the same rank, and the dictionary that getselection passes back should have /MyJunk in it. Under 1.1, this is the case, but under 2.0 it seems to make a dictionary called /SelInfo, and THAT dictionary is the request-dict I passed to setselection ---------------------------- psh Welcome to X11/NeWS Version 1.0.1 /MyJunk clearselection dictbegin /SelectionHolder currentprocess def Canvas currentcanvas def SelectionResponder null def /MyJunk (This is a test of my junk) def dictend /MyJunk setselection pstack Empty stack /MyJunk getselection pstack dict[ /Holder: canvas(0x1c6000,1152x900,root,parent) /Level: 1 /PendingDelete?: true /Pin: /AtPoint /Preview?: true /Rank: /MyJunk /Registered?: true /Style: /Default /Time: 0 /SelInfo: dictionary[5/5000] /ParentDictArray: dictionary[10/5000] ] /SelInfo get pstack dict[ /SelectionHolder: process(0x2ae088, 'sin client', runnable, `pstack') /Canvas: canvas(0x1c6000,1152x900,root,parent) /SelectionResponder: null /MyJunk: (This is a test of my junk) /Rank: /MyJunk ] It seems ta me that if it were to be at all compatible with 1.1 then the following should work: dictbegin /MyJunk (This is a test) def dictend /Myrank setselection /Myrank getselection /MyJunk get The 2.0 manual oughta at least tell us somethin' about SelInfo being in there and how the new setselection/getselection stuff is going to behave. Has anyone else run across any other strange things with the selection services under 2.0?? Is there somethin' I'm missing? From don Sat May 12 05:08:43 1990 Date: Sat, 12 May 90 05:08:43 -0400 To: NeWS-makers@brillig.umd.edu Subject: Bugs in OpenWindows 2.0 From: ecn!wim@relay.EU.net (Wim Rijnsburger) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) I found that the LiteText class of OpenWindows 2.0 was incorrect. The following appeared to fix it: false false getbbox -> false getbbox (3 x) 4 2 roll moveto rect -> 4 2 roll rmoveto rect (3 x) From don Sat May 12 05:09:22 1990 Date: Sat, 12 May 90 05:09:22 -0400 To: NeWS-makers@brillig.umd.edu Subject: How to do charpath? From: haven!ncifcrf!toms@purdue.edu (Tom Schneider) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Why doesn't the example of character outlines shown on page 98 of the PostScript cookbook work on NeWS 1.0 on a Sun 4? (It works on my Apple Laserwriter!!) A simplified example is: /Helvetica-Bold findfont 30 scalefont setfont erasepage 150 400 translate .5 setlinewidth 0 0 moveto (Outline an alphabet:) true charpath 0 -100 moveto (abcdefghijklmnopqrstuvwxyz!) true charpath gsave 1 setgray fill grestore stroke showpage Tom Schneider National Cancer Institute Laboratory of Mathematical Biology Frederick, Maryland 21701-1013 toms@ncifcrf.gov From don Sat May 12 05:09:47 1990 Date: Sat, 12 May 90 05:09:47 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: How to do charpath? From: haven!ncifcrf!toms@purdue.edu (Tom Schneider) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) In article <1650@fcs280s.ncifcrf.gov> toms@fcs260c2.UUCP (Tom Schneider) writes: >Why doesn't the example of character outlines shown on page 98 of the >PostScript cookbook work on NeWS 1.0 on a Sun 4? (It works on my correction: 1.1 How about 2.0 and X/NeWS? Is it really true that the merge is horribly slow? My systems person won't touch it. (Solid X types... is Sun ever going to get out of the hole they dug for themselves?) Tom Schneider National Cancer Institute Laboratory of Mathematical Biology Frederick, Maryland 21701-1013 toms@ncifcrf.gov From don Sat May 12 05:10:09 1990 Date: Sat, 12 May 90 05:10:09 -0400 To: NeWS-makers@brillig.umd.edu Subject: Color PostScript From: swrinde!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!aplcen!haven!ncifcrf!toms@ucsd.edu (Tom Schneider) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Does anyonw know of a program that converts PostScript to a form that can be used by a D-Scan Ch-5312 color printer? Thanks for your help! Tom Schneider National Cancer Institute Laboratory of Mathematical Biology Frederick, Maryland 21701-1013 toms@ncifcrf.gov From don Sat May 12 05:10:24 1990 Date: Sat, 12 May 90 05:10:24 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: Color PostScript From: sgi!shinobu!odin!ramoth.esd.sgi.com!msc@ucbvax.Berkeley.EDU (Mark Callow) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) In article <1653@fcs280s.ncifcrf.gov>, toms@ncifcrf.gov (Tom Schneider) writes: |> Does anyonw know of a program that converts PostScript to a form |> that can be used by a D-Scan Ch-5312 color printer? Thanks for your help! |> There is a package called "Freedom of the Press" available for the SGI IRIS from Custom Applications Inc. (CAI). FoP provides a PostScript driver for many different color printers including the D-Scan. We use it here extensively. CAI are in Billerica, MA. Phone (508) 667-8585. -- From the TARDIS of Mark Callow msc@ramoth.sgi.com, ...{ames,decwrl}!sgi!msc "There is much virtue in a window. It is to a human being as a frame is to a painting, as a proscenium to a play. It strongly defines its content." From don Sat May 12 05:12:16 1990 Date: Sat, 12 May 90 05:12:16 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: NeWS Tips for Silicon Graphics 4D From: sgi!shinobu!odin!ramoth.esd.sgi.com!msc@ucbvax.Berkeley.EDU (Mark Callow) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) In article <9005041643.AA08069@>, bice@hbo.UUCP (Brent A. Bice) writes: |> |> The biggest things I've run across are: |> 1) In the latest version of news on the SGIs, Canvases don't appear to |> be retained. When I asked the SGI techies 'bout this, they said |> "Hmmm.. Seems ta be a bug. Why doncha use our 4d libraries instead" |> So, it seems retained canvases can't be counted on. The news server on the SGI runs on one of 2 modes: 8-bit color index and 24-bit rgb. Retained canvases have never worked when the server runs in 24-bit mode. They have always worked (modulo a bug in rendering text into memory) when the server runs in 8-bit mode. In 24-bit mode retained canvases sort of 1/2 worked. Bits would be saved from the screen when windows were obscured but nothing would ever be rendered into the obscured retained portions of the windows. I decided that this was worse than them not working at all so in release 3.2 I completely disabled retained canvases when running in 24-bit mode. At least that way clients would get /Damaged notification when windows needed to be redrawn. Those clients that payed attention to the NeWS spec. (retained canvases are a performance optimization only and the server may stop supporting them at any time) would work correctly. Did you upgrade your hardware to 24-bits as well as upgrading your software? It's hard to believe that any program would have found the retained canvas behaviour on 24-bits useful. The good news is that in the next release (IRIX 3.3, 4Sight 1.5) retained canvases are completely operational in both 8- and 24-bits. Even the text rendering bug has been fixed. Backgammon works like a charm. Incidently, a lot of NeWS clients use retained canvases when they should really use buildimage and imagecanvas. With the latter they can save memory and actually work faster than retained canvases. |> 4) Text itself appears to be REALLY slow on the SGI (yep, even worse than |> under OPENLOOK on a SUN)! Don't assume that it'll be fast like it is |> on the SUNs. Hmm! This is news to me. Please send me more details. -- From the TARDIS of Mark Callow msc@ramoth.sgi.com, ...{ames,decwrl}!sgi!msc "There is much virtue in a window. It is to a human being as a frame is to a painting, as a proscenium to a play. It strongly defines its content." From don Sat May 12 05:12:49 1990 Date: Sat, 12 May 90 05:12:49 -0400 To: NeWS-makers@brillig.umd.edu Subject: GoodNeWS1.3 with OW 1.0.1 on sparcstation From: agate!darkstar!jupiter.ucsc.edu!conrad@ucbvax.Berkeley.EDU (Al Conrad, x2370) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) I now have GoodNeWS1.3 up on my sparcstation with OpenWindows 1.0.1. It's great. I especially like the class browser. When I first installed it it would bomb with "Dict stack not empty...", so I ran each of the .ps files in init.ps individually via psh and discovered two problems: - the proc in fixes.ps to determine the machine type returns sun3 on a sun4. - file.ps trys to open a non-existent font (Boston). Hope this helps anyone getting started with GoodNeWS. Al Conrad conrad@cis.ucsc.edu From don Sat May 12 05:13:51 1990 Date: Sat, 12 May 90 05:13:51 -0400 To: NeWS-makers@brillig.umd.edu Subject: font dictionary/forall From: mr@ritd.co.uk Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) I've hit a funny that I'd appreciate help with. I'm playing around with the OpenWindows 1.0 server in "filter" mode (i.e. not using a framebuffer). I'm trying to use NeWS as a Postscript engine to generate bitmaps that I can look at under SunView (I'm stuck with SunView for a while yet). Patrick Naughton kindly supplied a small chunk of code a short while back to show how to create a canvas, doodle on it and then save the results as a rasterfile. OK so far. So I tried feeding it a FrameMaker Postscript file. This has a fairly standard looking piece of preamble that does some font re-encoding. This causes the server to core dump (segmentation violation). Feeding the same thing to "psh" works fine. I believe that I have narrowed the problem down to a "forall" loop over a NeWS font dictionary. The following script is about as simple as I can get it: ------------- #!/bin/sh # Taken from work by Patrick Naughton OPENWINHOME="${OPENWINHOME-/vol/openwin}" XNEWSHOME=${OPENWINHOME} LD_LIBRARY_PATH=${OPENWINHOME}/lib:/lib export OPENWINHOME XNEWSHOME LD_LIBRARY_PATH preamble=" % Do basics. /currentpacking false def /setpacking { pop } def (NeWS/basics.ps) (r) file cvx exec (NeWS/redbook.ps) (r) file cvx exec false setautobind /bind {} def % Start userdict. 500 dict begin /Courier findfont { pop == } forall " $OPENWINHOME/bin/xnews "$preamble" ------------- For some reason this loop blows out in this simple NeWS environment. Anyone got any ideas about what I am doing wrong? Perhaps someone with a newer release could try the above and let me know. cheers, Martin Reed, Racal Imaging Systems Ltd +----------------------------------------------------------+ |uucp: mr@ritd.co.uk, uunet!ukc!ritd!mr | `Just hold |Global String: +44 256 469943 Fax: +44 256 471492 | these two |Paper: Rankine Road, Basingstoke, Hants, England, RG24 0NW| wires...' +----------------------------------------------------------+ From don Sat May 12 05:14:02 1990 Date: Sat, 12 May 90 05:14:02 -0400 To: NeWS-makers@brillig.umd.edu Subject: Any NeWs implementations for MSDOS? From: hercules!sparkyfs!arsocomvax.socom.mil!news@apple.com (Ted Nolan) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Hi folks, I know you can get NeWs for the mac, how about for the PC? Especially under PCNFS... Thanks, Ted Nolan ted@usasoc.soc.mil From don Sat May 12 05:14:21 1990 Date: Sat, 12 May 90 05:14:21 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: How to do charpath? From: wind.Eng.Sun.COM@sun.com (Patrick Naughton) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) In article <1650@fcs280s.ncifcrf.gov>, toms@ncifcrf.gov (Tom Schneider) writes: |> Why doesn't the example of character outlines shown on page 98 of the |> PostScript cookbook work on NeWS 1.0 on a Sun 4? (It works on my |> Apple Laserwriter!!) |> [ example code deleted ] |> Tom Schneider |> National Cancer Institute |> Laboratory of Mathematical Biology |> Frederick, Maryland 21701-1013 |> toms@ncifcrf.gov NeWS 1.0 and NeWS 1.1 did not have outline fonts so charpath was not possible. OpenWindows 1.0 has the OpenFonts scalable outline fonts, but we did not implement charpath at that time. OpenWindows Version 2 renders the example code exactly the same as the LaserWriter. ______________________________________________________________________ Patrick J. Naughton ARPA: naughton@sun.com Window Systems Group UUCP: ...!sun!naughton Sun Microsystems, Inc. AT&T: (415) 336 - 1080 From don Sat May 12 16:02:17 1990 Date: Sat, 12 May 90 16:02:17 -0400 To: NeWS-makers@brillig.umd.edu Subject: NeWS on a VAX? From: eru!luth!sunic!mcsun!ukc!strath-cs!turing.ac.uk!news@bloom-beacon.mit.edu (Jim Rudolf) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) From an article a while ago I read that a company named TGV had ported X/NeWS to a VAX running VMS. Can anyone offer more details on this, including (but not limited to) a name and e-mail address or phone number? Much obliged, -- Jim -- Jim Rudolf The Turing Institute rudolf@turing.ac.uk From don Sun May 13 21:42:43 1990 Date: Sun, 13 May 90 21:42:43 -0400 To: NeWS-makers@brillig.umd.edu Subject: Pageview with TeX? From: usc!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!emory!km@ucsd.edu (Ken Mandelberg) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Regretfully Pageview does not seem to work for postscript files produced by dvi2ps. I think the problem is the bitmapped Computer Modern Fonts, that dvi2ps defines in the prologue. Is there a different approach to using Pageview with TeX? -- Ken Mandelberg | km@mathcs.emory.edu PREFERRED Emory University | {rutgers,gatech}!emory!km UUCP Dept of Math and CS | km@emory.bitnet NON-DOMAIN BITNET Atlanta, GA 30322 | Phone: (404) 727-7963 From don Sun May 13 21:43:14 1990 Date: Sun, 13 May 90 21:43:14 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: Pageview with TeX? From: wind.Eng.Sun.COM@sun.com (Patrick Naughton) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) In article <5451@emory.mathcs.emory.edu>, km@mathcs.emory.edu (Ken Mandelberg) writes: |> Regretfully Pageview does not seem to work for postscript |> files produced by dvi2ps. I think the problem is the bitmapped |> Computer Modern Fonts, that dvi2ps defines in the prologue. |> |> Is there a different approach to using Pageview with TeX? |> -- |> Ken Mandelberg | km@mathcs.emory.edu PREFERRED |> Emory University | {rutgers,gatech}!emory!km UUCP |> Dept of Math and CS | km@emory.bitnet NON-DOMAIN BITNET |> Atlanta, GA 30322 | Phone: (404) 727-7963 The PostScript produced by dvi2ps has several problems with on NeWS... PageView can't fix these problems with a filter like it does with the Frame2.0 files. The basic problem is that dvi2ps builds user defined fonts and expects to be able to pass the dictionary used in 'buildfont' to the 'setfont' operator, which xnews doesn't deal with. I am working on this bug for Version 2, so it *might* be fixed for the next release. ______________________________________________________________________ Patrick J. Naughton ARPA: naughton@sun.com Window Systems Group UUCP: ...!sun!naughton Sun Microsystems, Inc. AT&T: (415) 336 - 1080 From don Sun May 13 21:44:18 1990 Date: Sun, 13 May 90 21:44:18 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: How to do charpath? From: mcsun!ukc!slxsys!dircon!uad1077@uunet.uu.net Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) In article <135569@sun.Eng.Sun.COM> naughton@wind.Eng.Sun.COM (Patrick Naughton) writes: > >> > >NeWS 1.0 and NeWS 1.1 did not have outline fonts so charpath was not >possible. OpenWindows 1.0 has the OpenFonts scalable outline fonts, >but we did not implement charpath at that time. OpenWindows Version 2 >renders the example code exactly the same as the LaserWriter. This sounds bad. Implementing charpath with bitmap fonts is both possible and desirable. (Both Ghostscript and my onw 3D NeWS do it, so it must be possible.) Why is it desirable? Well, my understanding is that xnews uses outline fonts for most possible font matrices, and hand tuned bitmaps for the commonest small, axis aligned fonts (e.g. Lucida 12 point etc.) If charpath only ever uses the outlines, then its going to be possible to generate two different shapes on the screen for the same glyph, depending on how you render it. This may seem insignificant, but it seems to suggest that Sun's attitude to all the off-by-one errors in original NeWS has not changed that much. This was the reason I went away and wrote my own in the first place! Plus ca change.... -- Ian D. Kemmish Tel. +44 767 601 361 18 Durham Close uad1077@dircon.UUCP Biggleswade ukc!dircon!uad1077 Beds SG18 8HZ United Kingdom From don Sun May 13 21:45:30 1990 Date: Sun, 13 May 90 21:45:30 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: font dictionary/forall From: wind!naughton@sun.com (Patrick Naughton) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) In article <16564.9005101548@coyote.ritd.co.uk>, mr@ritd.co.uk writes: |> I'm trying to use NeWS as a Postscript engine to generate bitmaps that |> I can look at under SunView (I'm stuck with SunView for a while yet). |> ... hacked version of ps2bits deleted ... |> For some reason this loop blows out in this simple NeWS environment. |> |> Martin Reed, Racal Imaging Systems Ltd This is a known bug in the initialization of our font code... All you need to do to get around it is force the server to create a font from an outline (not a prebuilt bitmap) in order for the font structures to be properly initialized. Here's your example code with the workaround in place... (This will be fixed in Version 2). #!/bin/sh OPENWINHOME="${OPENWINHOME-/home/openwin}" XNEWSHOME=${OPENWINHOME} LD_LIBRARY_PATH=${OPENWINHOME}/lib:/lib export OPENWINHOME XNEWSHOME LD_LIBRARY_PATH preamble=" % Do basics. /currentpacking false def /setpacking { pop } def (NeWS/basics.ps) (r) file cvx exec (NeWS/redbook.ps) (r) file cvx exec false setautobind /bind {} def % Start userdict. 500 dict begin % workaround for bug in folio initialization code. /Courier findfont 2 scalefont setfont () stringwidth pop pop /Courier findfont { pop == } forall shutdownserver " $OPENWINHOME/bin/xnews "$preamble" ______________________________________________________________________ Patrick J. Naughton ARPA: naughton@sun.com Window Systems Group UUCP: ...!sun!naughton Sun Microsystems, Inc. AT&T: (415) 336 - 1080 From don Sun May 13 21:45:43 1990 Date: Sun, 13 May 90 21:45:43 -0400 To: NeWS-makers@brillig.umd.edu Subject: OpenWindows Icon Manager From: swrinde!emory!km@ucsd.edu (Ken Mandelberg) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Has anyone done an icon mangager (or maybe a menu of current clients) for the builtin window manager that goes with xnews? I have in mind something similar to the twm feature. -- Ken Mandelberg | km@mathcs.emory.edu PREFERRED Emory University | {rutgers,gatech}!emory!km UUCP Dept of Math and CS | km@emory.bitnet NON-DOMAIN BITNET Atlanta, GA 30322 | Phone: (404) 727-7963 From don Tue May 15 18:30:29 1990 Date: Tue, 15 May 90 18:30:29 -0400 To: NeWS-makers@brillig.umd.edu Subject: Any NeWs implementations for MSDOS? From: hercules!sparkyfs!arsocomvax.socom.mil!news@apple.com (Ted Nolan) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Hi folks, I know you can get NeWs for the mac, how about for the PC? Especially under PCNFS... Thanks, Ted Nolan ted@usasoc.soc.mil From don Tue May 15 18:31:29 1990 Date: Tue, 15 May 90 18:31:29 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: Pageview with TeX? From: ecn!wim@relay.EU.net (Wim Rijnsburger) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) > Regretfully Pageview does not seem to work for postscript > files produced by dvi2ps. I think the problem is the bitmapped > Computer Modern Fonts, that dvi2ps defines in the prologue. > > Is there a different approach to using Pageview with TeX? I use a style file called 'times' that replaces the Computer Modern Fonts with Times, Courier and Helvetica fonts. All these are resident to the LaserWriter. You have to tell the dvi-to-postscript converter not to load the resident fonts. Our 'dvips' does that automatically. At our site this style file is found at the standard location: /usr/share/lib/tex/inputs/times.sty In case you don't have it, it is very short so here it comes: % latex style with times roman text but cm math italic. \def\@mrm{Times-Roman}% times - roman \def\@mit{Times-Italic}% times - italic \def\@msl{Times-Oblique}% times - oblique \def\@mbf{Times-Bold}% times - bold \def\@mtt{Courier}% courier \def\@mcsc{Times-SmallCaps}% times - roman - small caps \def\@mss{Helvetica}% helvetica \input psfonts.sty Hope this helps! Wim. ---------- Netherlands Energy Research Foundation, ECN -------------- Wim Rijnsburger email: RIJNSBURGER@ECN.NL P.O. Box 1, 1755 ZG Petten, Holland phone: +31 2246 4673 From don Tue May 15 18:35:46 1990 Date: Tue, 15 May 90 18:35:46 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: How to do charpath? From: wind.Eng.Sun.COM@sun.com (Patrick Naughton) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) In article <1990May13.102216.23748@dircon.uucp>, uad1077@dircon.uucp writes: |> In article <135569@sun.Eng.Sun.COM> naughton@wind.Eng.Sun.COM (Patrick Naughton) writes: |> > |> >> |> > |> >NeWS 1.0 and NeWS 1.1 did not have outline fonts so charpath was not |> >possible. OpenWindows 1.0 has the OpenFonts scalable outline fonts, |> >but we did not implement charpath at that time. OpenWindows Version 2 |> >renders the example code exactly the same as the LaserWriter. |> |> This sounds bad. . . . |> If charpath only ever uses the outlines, then its going to be possible |> to generate two different shapes on the screen for the same glyph, depending |> on how you render it. . . . |> -- |> Ian D. Kemmish Tel. +44 767 601 361 I didn't say that 'charpath' fails when we have a cached bitmap for a given point size... 'charpath' sets the current path to the outline of a given string at any point size / ctm, except when there is no outline description of the font availible. For example: Lucida-12 is cached as a precomputed bitmap, but 'charpath' will produce the desired outline since an f3 description for Lucida exists, but "fixed" (the "default" X11 font) is ONLY a bitmap so nothing is added to the path by charpath. ______________________________________________________________________ Patrick J. Naughton ARPA: naughton@sun.com Window Systems Group UUCP: ...!sun!naughton Sun Microsystems, Inc. AT&T: (415) 336 - 1080 From don Tue May 15 18:35:55 1990 Date: Tue, 15 May 90 18:35:55 -0400 To: NeWS-makers@brillig.umd.edu Subject: currentfile From: russ@dash.mitre.org (Russell Leighton) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) The function "currentfile" does not seem to be supported in NeWS. We have Mathematica(TM) which generates postscript for NeWS that uses "currentfile" with the "image" command. Does anyone have suggestions on how we can bind "currentfile" such that it behaves as described in the postscript book? Russ. NFSNET: russ@dash.mitre.org Russell Leighton MITRE Signal Processing Lab 7525 Colshire Dr. McLean, Va. 22102 USA From don Tue May 15 18:36:39 1990 Date: Tue, 15 May 90 18:36:39 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: Bugs in OpenWindows 2.0 From: hbo!bice (Brent A. Bice) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) (Wim Rijnsburger) writes: I found that the LiteText class of OpenWindows 2.0 was incorrect. The following appeared to fix it: false false getbbox -> false getbbox (3 x) 4 2 roll moveto rect -> 4 2 roll rmoveto rect (3 x) What?? What 'xactly are ya tryin' ta say? I'm not following you very clearly. Mebbe you should define the nature of the problem that you're solving first and explain why your fix fixes it.... From don Tue May 15 18:36:59 1990 Date: Tue, 15 May 90 18:36:59 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: Any NeWs implementations for MSDOS? From: hbo!bice (Brent A. Bice) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Well, unfortunately, MSDOS is REALLY "brain-dead" and fairly useless. I'm afraid that there is so little support for things such as multi-tasking let alone virtual memory that porting NeWS (a fully functional port that is) to DOS would be nearly impossible... If there IS such a beast, I'd like to see it. Personally, I'd like ta see a '386 port of NeWS under something like SCO XENIX, SCO UNIX, AIX, or some other version of Eunuchs... From don Tue May 15 18:37:30 1990 Date: Tue, 15 May 90 18:37:30 -0400 To: NeWS-makers@brillig.umd.edu Subject: X/NeWS From: hbo!bice (Brent A. Bice) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Tom Schneider writes: >How about 2.0 and X/NeWS? Is it really true that the merge is horribly >slow? My systems person won't touch it. (Solid X types... is Sun ever going >to get out of the hole they dug for themselves?) Well, as far as I can tell, xnews itself isn't horribly slow, but some of the applications running under it seem so. The Cmdtool and Shelltool programs seem AWFULLY slow to switch input focus for instance. But other programs (xterm for instance, or some of our NeWS applications) run fairly fast. Kinda tough call. I've noticed that text (well, mebbe not text itself but mebbe things like stringwidth) is kinda slow... From don Tue May 15 18:39:28 1990 Date: Tue, 15 May 90 18:39:28 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: Re: NeWS Tips for Silicon Graphics 4D From: hbo!bice (Brent A. Bice) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) (Mark Callow) writes: >Did you upgrade your hardware to 24-bits as well as upgrading your software? >It's hard to believe that any program would have found the retained canvas >behaviour on 24-bits useful. Well, the hardware we have is 24 bit hardware, and we have been upgrading our software whenever we find out that there is a more recent release (usually we only hear of this through the grapevine unfortunately). Retained Canvases are VERY useful and can be used for more than just doing as few re-paints as possible. For instance, I use it for double-buffering. I have a window sub-class that has 2 ClientCanvases. One is always mapped, and one is unmapped. By default, the PaintClient method paints to the unmapped one, and when PaintClient finishes, I map the unmapped canvas and unmap the mapped canvas. From the user's standpoint, there is a pause (while I draw on the unmapped canvas), and then the end result just appears on the screen. I also use it when I'm drawing on a complicated but normally static background (like a filled vector map for instance). I take the time to draw the background on an unmapped retained canvas and never have to re-draw all the vectors until the user moves the map, zooms in or out, etc... >The good news is that in the next release (IRIX 3.3, 4Sight 1.5) retained >canvases are completely operational in both 8- and 24-bits. Even the >text rendering bug has been fixed. Backgammon works like a charm. That IS good news. I'll hafta call and find out where our update is... >Incidently, a lot of NeWS clients use retained canvases when they should >really use buildimage and imagecanvas. With the latter they can save >memory and actually work faster than retained canvases. Buildimage seems an awkward solution if your canvas contains complicated shapes where some are filled and some are not. Correct me if I'm wrong, but with buildimage, don't you hafta specify each pixel in the image rather than actually providing a procedure to draw it??? >>Text itself appears to be REALLY slow on the SGI... >Hmm! This is news to me. Please send me more details. Actually, I ought to clarify. I have a routine that given an array of text, an unscaled font, and a width and height, will try to find the best scale to use to fill the width/height with the text. It is essentially a binary search, and I use stringwidth and fontheight to see if the text fits with each scale tried. On NeWS 1.1, this works fine and is plenty fast, but on the SGI it tended to be too slow (much slower than on the SUNs running NeWS 1.1). Under NeWS 2.0, we've found that the standard fonts are REALLY slow with this routine, but if we use some Hershey outline fonts that it is at least useable. The same outline fonts under 1.1 are as slow as the bitmap fonts are under 2.0. Very strange... I appreciate your response... You've given me far more useful answers/info than any Tech support we've obtained over the phone with SGI. Brent Bice Applied Computing Systems 2075 Trinity Drive Suite Lower Level Los Alamos, NM 87544 (505) 662-3309 bice@atlantis.ees.anl.gov From don Tue May 15 18:39:48 1990 Date: Tue, 15 May 90 18:39:48 -0400 To: NeWS-makers@brillig.umd.edu Subject: porting NeWS 1.1 to OpenWindows/NeWS 2.0 From: smc%radon@LANL.GOV (Susan Coghlan) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Hi, Thinking it would be forever before my group would get Open Windows, I didn't save all the information people have posted about moving from NeWS 1.1 to NeWS 2.0. However, we now have it and my boss wants a port of a package with over 30,000 lines of code immediately! Could anyone post a summary of porting problems, hints, etc.? So far, everything I've tried to run from NeWS 1.1 has crashed. Any help would be greatly appreciated, Susan Coghlan smc@radon.lanl.gov From don Wed May 16 01:08:17 1990 Date: Wed, 16 May 90 01:08:17 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: How to do charpath? From: rbogen@EBay.Sun.COM (Richard Bogen) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Charpath works in NeWS 2.0 and the merge is blindingly fast. So there! From NeWS-makers-request@cs.UMD.EDU Tue May 15 11:19:56 1990 Date: Sat, 12 May 90 05:09:47 -0400 Subject: Re: How to do charpath? From: haven!ncifcrf!toms@purdue.edu (Tom Schneider) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) In article <1650@fcs280s.ncifcrf.gov> toms@fcs260c2.UUCP (Tom Schneider) writes: >Why doesn't the example of character outlines shown on page 98 of the >PostScript cookbook work on NeWS 1.0 on a Sun 4? (It works on my correction: 1.1 How about 2.0 and X/NeWS? Is it really true that the merge is horribly slow? My systems person won't touch it. (Solid X types... is Sun ever going to get out of the hole they dug for themselves?) Tom Schneider National Cancer Institute Laboratory of Mathematical Biology Frederick, Maryland 21701-1013 toms@ncifcrf.gov From don Wed May 16 10:53:37 1990 Date: Wed, 16 May 90 10:53:37 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: currentfile From: ecn!wim@relay.EU.net (Wim Rijnsburger) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) > From: russ@dash.mitre.org (Russell Leighton) > > The function "currentfile" does not > seem to be supported in NeWS. I have been using currentfile in NeWS very often and never met any problems. dx7{wim}41: psh executive Welcome to X11/NeWS Version 2 (Beta) currentfile dup = file(?,W,R) (Hello there\n) writestring Hello there Wim. ---------- Netherlands Energy Research Foundation, ECN -------------- Wim Rijnsburger email: RIJNSBURGER@ECN.NL P.O. Box 1, 1755 ZG Petten, Holland phone: +31 2246 4673 From don Wed May 16 10:54:39 1990 Date: Wed, 16 May 90 10:54:39 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: Bugs in OpenWindows 2.0 From: ecn!wim@relay.EU.net (Wim Rijnsburger) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) > From: hbo!bice@cs.UMD.EDU (Brent A. Bice) > > (Wim Rijnsburger) writes: > > I found that the LiteText class of OpenWindows 2.0 was incorrect. The > following appeared to fix it: > > false false getbbox -> false getbbox (3 x) > > 4 2 roll moveto rect -> 4 2 roll rmoveto rect (3 x) > > > > What?? What 'xactly are ya tryin' ta say? I'm not following you very > clearly. Mebbe you should define the nature of the problem that you're solving > first and explain why your fix fixes it.... Sorry, I forgot to say that the LiteText class did not work anymore at all in OpenWindows 2.0 (beta). If you type something into a textitem or other text input object derived from the LiteText class, the NeWS process terminates with a typecheck error message. I found out that the (undocumented?) getbbox operator expects a string and a boolean as arguments on the stack. So I tried the replacement of 'false false getbbox' by 'false getbbox' in the LiteText class and it appeared to work. The process did not terminate anymore. But typing new characters in the middle of the text within a textitem or back-spacing some characters did not update the displayed characters properly. I studied the code related to editting in the LiteText class and decided to replace '4 2 roll moveto rect' with '4 2 roll rmoveto rect' to assure a proper updating. For all clarity, the LiteText class is found in: $OPENWINHOME/etc/NeWS/litetext.ps Both fixes have to be done at 3 places within this file. The strings to be replaced are unique within this file, so 'Replace All' of the 'Find and Replace' popup of textedit will do. By the way, did nobody encounter this problem? Or are there no LiteText users anymore? Or do they not use OpenWindows 2.0 (beta)? Hope this helps. Wim. ---------- Netherlands Energy Research Foundation, ECN -------------- Wim Rijnsburger email: RIJNSBURGER@ECN.NL P.O. Box 1, 1755 ZG Petten, Holland phone: +31 2246 4673 From don Wed May 16 11:27:55 1990 Date: Wed, 16 May 90 11:27:55 -0400 To: NeWS-makers@brillig.umd.edu Subject: currentfile From: don (Don Hopkins) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) In NeWS 1.1, currentfile can return "null", since it searches the execution stack for the last file executed (i.e. "(filename) (r) cvx exec", or the "acceptconnection ... cvx exec" in the server loop). So once you've done a "fork", the child process has no file on its execution stack, so currentfile returns null. I haven't tried it out with Open Windows (I'm at home right now). See what "{currentfile} fork waitprocess" returns. I suspect this has something to do with the fact that X11/NeWS processes have /Stdout and /Stderr keys, but no /Stdin key (since changing stdin might involve mucking around with the execution stack). I consider the absence of /Stdin to be a bug. Even if currentfile returns null (because you forked and arguably the child process should not think it owns the input file), you should at least be able to say "currentprocess dup /Stdout get /Stdin exch put" if that's what you *really* want (but you can't). -Don From don Wed May 16 20:01:10 1990 Date: Wed, 16 May 90 20:01:10 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: Any NeWs implementations for MSDOS? From: pacific.mps.ohio-state.edu!zaphod.mps.ohio-state.edu!wuarchive!texbell!ficc!peter@tut.cis.ohio-state.edu (Peter da Silva) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) In article <9005150004.AA21968@> bice@hbo.UUCP (Brent A. Bice) writes: > Well, unfortunately, MSDOS is REALLY "brain-dead" and fairly useless. A NeWS *server* on an IBM-PC would be fairly reasonable. Of course you'd have to pretty much take over the machine, so it could hardly be said to be running *under* MS-DOS. -- `-_-' Peter da Silva. +1 713 274 5180. 'U` Have you hugged your wolf today? @FIN Dirty words: Zhghnyyl erphefvir vayvar shapgvbaf. From don Wed May 16 20:01:45 1990 Date: Wed, 16 May 90 20:01:45 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: NeWS Tips for Silicon Graphics 4D From: parallax!eric%loaf@uunet.UU.NET (Eric Messick) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) >>Incidently, a lot of NeWS clients use retained canvases when they should >>really use buildimage and imagecanvas. With the latter they can save >>memory and actually work faster than retained canvases. > >Buildimage seems an awkward solution if your canvas contains complicated shapes >where some are filled and some are not. Correct me if I'm wrong, but with >buildimage, don't you hafta specify each pixel in the image rather than >actually providing a procedure to draw it??? You use buildimage to create an offscreen canvas of the appropriate depth, but which is just 1 pixel by 1 pixel. Pass this canvas to newcanvas (or maybe you can just reshapecanvas it... hmmm...) and you have a bigger canvas that you render into. When you want to display it on the screen, use imagecanvas with this canvas as the source. If you get all of the scales set up correctly it can just do a copy of the pixels one for one, which is fast. -- eric messick eric@parallax.com uunet!parallax!eric From don Wed May 16 20:21:16 1990 Date: Wed, 16 May 90 20:21:16 -0400 To: NeWS-makers@brillig.umd.edu Subject: Porting things from 1.1 to 2.0 From: hbo!bice (Brent A. Bice) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Well, here are a few of the things I try ta keep in mind while porting from NeWS 1.1 to OpenLook... 1) Look for setmatrix commands. Some of the NeWS 1.1 source (like LiteWindow) did stuff like "[1 0 0 1 0 0] setmatrix" instead of "initmatrix setmatrix". 2) Also, on EnterEvent interests the Action seems to be handled differently. in NeWS 1.1, LiteWindow uses an action of [0 2] for Enter and Exit Event interests... I don't remember what it is off hand in 2.0, but you can look that up... 3) When setting a Canvas' attributes, (particularly making 'em retained), be careful. Things like Retained must be set AFTER the canvas is told it's not transparent (since a transparent retained canvas makes no sense). 4) The structure of some internals (like events) have changed a little. Normally an application shouldn't be tweaking around much in there anyway, but it's somethin' ta keep in mind... Brent Bice Applied Computing Systems 2075 Trinity Drive Suite Lower Level Los Alamos, NM 87544 (505) 662-3309 bice@atlantis.ees.anl.gov From don Wed May 16 20:21:33 1990 Date: Wed, 16 May 90 20:21:33 -0400 To: NeWS-makers@brillig.umd.edu Subject: More on the LiteText stuff From: hbo!bice (Brent A. Bice) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) >By the way, did nobody encounter this problem? Or are there no LiteText >users anymore? Or do they not use OpenWindows 2.0 (beta)? Hmmm... We've never fiddled much with LiteText directly, although we do use TextItems rather extensively. 'Course, we're not under 2.0 (beta) yet either. Mebbe this worked ok under OpenWindows 1.0???? Brent Bice Applied Computing Systems 2075 Trinity Drive Suite Lower Level Los Alamos, NM 87544 (505) 662-3309 bice@atlantis.ees.anl.gov From don Wed May 16 20:22:33 1990 Date: Wed, 16 May 90 20:22:33 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re : litetext bug From: hbo!deven (Jimmy G. Devenport) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) ecn!wim%relay.EU.net (Wim Rijnsburger) writes: >>If you type something into a textitem or other text input object >>derived from the LiteText class, the NeWS process terminates with a >>typecheck error message. I found out that the (undocumented?) getbbox >>operator expects a string and a boolean as arguments on the stack. So I >>tried the replacement of 'false false getbbox' by 'false getbbox' in >>the LiteText class and it appeared to work. The process did not >>terminate anymore. But typing new characters in the middle of the text >>within a textitem or back-spacing some characters did not update the >>displayed characters properly. I studied the code related to editting >>in the LiteText class and decided to replace '4 2 roll moveto rect' >>with '4 2 roll rmoveto rect' to assure a proper updating. >> >>For all clarity, the LiteText class is found in: >> >> $OPENWINHOME/etc/NeWS/litetext.ps >> >>Both fixes have to be done at 3 places within this file. The >>strings to be replaced are unique within this file, so 'Replace All' of >>the 'Find and Replace' popup of textedit will do. >> >>By the way, did nobody encounter this problem? Or are there no LiteText >>users anymore? Or do they not use OpenWindows 2.0 (beta)? we have not noticed anything different with the textitems between NeWS 1.1 and NeWS 2.0 except that there is no more "GetFromCurrentEvent" or "PutInEventMgrInterest" in the makestartinterests stuff between the $NEWSHOME/lib/NeWS/liteitem.ps and $OPENWINHOME/etc/NeWS/liteitem.ps... also we have not came across an error about "typecheck" or even the whole textitem bombing...the only thing I could think of that would cause the textitem not to "update" would be the font and fontsize you are using. We use the default (Times-Roman 14) and I have tried everything from moving around anywhere in the textitem by clicking the 'SELECT' button and then inserting text or deleting text to the right (by using ^D) or deleting text to the left (by using the backspace key) and the only "problem" I have run across is that some characters won't get erased properly , ie create a textitem and type a bunch of "j"'s and then do an ERASELINE (either ^U or ^X or whatever) and the last "j" doesn't get fully erased. No other errors encountered...keep us posted, tho' also all this is just a default textitem also, no subclass of it. ie: /item (label) (initval) loc notify parentcanvas w h /new TextItem send def ... thanks for clarification, etc Jimmy G. Devenport Applied Computing Systems 2075 Trinity Drive Suite Lower Level (the dungeon) Lost Almost, NM 87544 (505) 662-3309 hbo!deven@atlantis.ees.anl.gov jd From don Wed May 16 20:23:20 1990 Date: Wed, 16 May 90 20:23:20 -0400 To: NeWS-makers@brillig.umd.edu Subject: NeWS on Amiga 3000 [Done? Being done?] From: "Michael_Powers.Roch817"@Xerox.COM Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Hello all, A while back I asked about the above for the Amiga in general. Not much by way of response except for quite a few people interested in purchasing such a beast. Now that the 3000 is reality I am much more interested in either purchasing or doing a port myself. A few questions: 1) Is anyone involved in this at the current time? (Not including the Unix version that Commodore is doing?) 2) If not is anyone interested in pursuing this avenue (Peter?) 3) What would it take to get the OpenWindows source, licensing and all to accomplish this? Money? Contacts? Development support? 4) Is it possible to just do the NeWS side without the X side? It could be that once the NeWS side is up the X side is trivial or the reverse. I really....dislike (yeah, that's the diplomatic word) X and would rather just focus on the NeWS side. The 3000 (and Amigas in general) would make a super-nice NeWS station/terminal with the chip support for graphics processing and all. If you are interested let me know (especially if you know someone or somefirm willing to invest in such a development endeaver). Thanks, Mike (716) 544-6972 Xerox Corporation 295 Woodcliffe Drive 817-03A Rochester, NY 14621 powers.roch817@xerox.com From don Wed May 16 20:37:50 1990 Date: Wed, 16 May 90 20:37:50 -0400 To: NeWS-makers@brillig.umd.edu Subject: NeWS Tips for Silicon Graphics 4D From: don (Don Hopkins) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Unfortunatly, you can't pass an orphaned canvas (made by buildimage or readcanvas) to newcanvas under X11/NeWS, i.e. they can't have children, they're sterile. (I don't understand the reason for this new limitation.) I don't think you can even reshape them! However, you can pass "null" to buildimage instead of a procedure that returns strings of bits to put in the canvas, and buildimage will work much faster, simply returning a new canvas of a specified size and depth, whose contents are uninitialized. Unfortunatly, X11/NeWS buildimage doesn't (yet) work with 24 bit images for some reason. A real bummer. Something I've been trying unsuccessfully, is to "image" or "imagecanvas" using a different colormap. I would *like* for it to interpolate the colors into the new colormap. For example, I should be able to start up X11/NeWS with the [undocumented?] GRAYSCALEMONITOR environment variable set (so the colormap has 256 grays) and use "image" and friends to produce a *smoothly* shaded picture using 256 grays, but it doesn't work (I only get a few gray values). Also, the transfer function (settransfer) seems to work with the normal colormap, but it has no effect in monochrome (i.e. try running the image demo in monochrome, and setting the contrast & brightness from the menus -- nothing changes. OpenWindows 2.0 lets you reshape a canvas to the shape of Folio outline fonts, at any point size, rotation, or whatever! Cosmically gratifying! -Don From don Fri May 18 18:28:45 1990 Date: Fri, 18 May 90 18:28:45 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: Any NeWs implementations for MSDOS? From: fajita!sangria!doc@suntan.West.Sun.COM (Tom Dockery) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) A Company called Technology Application Group, Inc., or TAG, has done a partial NeWS clone for MS-DOS. The contact I have is John Sosoka at (213) 430-9792 (no uucp address). Note the word "clone"; TAG wrote it from the spec, as squeezing Sun's semi-portable Unix code into DOS would be a feat indeed! Last I visited with them, it was not a complete implementation, lacking network support and a cps equivalent. They claimed to have the expertise necessary to do these portions given sufficient monetary incentive. As it stands, applications written entirely in NeWS will usually run without a hitch. The obvious constraints of DOS at this point are memory management and multi-tasking (or, rather, a lack of both). Tom Dockery Market Focus Technologies, Inc. (my views, not theirs) {...}!sun!suntan!fajita!doc From don Fri May 18 18:30:22 1990 Date: Fri, 18 May 90 18:30:22 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: Re : litetext bug From: ecn!wim@relay.EU.net (Wim Rijnsburger) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) hbo!deven@atlantis.ees.anl.gov (Jimmy G. Devenport) writes: > we have not noticed anything different with the textitems between NeWS 1.1 > and NeWS 2.0 The mentioned LiteText problems occurs in OpenWindows 2.0 (Beta) that incorporates NeWS 2.1 Wim. ---------- Netherlands Energy Research Foundation, ECN -------------- Wim Rijnsburger email: RIJNSBURGER@ECN.NL P.O. Box 1, 1755 ZG Petten, Holland phone: +31 2246 4673 From don Fri May 18 18:30:31 1990 Date: Fri, 18 May 90 18:30:31 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: Any NeWS implementations for MSDOS? From: hbo!bice (Brent A. Bice) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Well, I'm CERTAINLY not opposed to a NeWS server under DOS, but I would be surprised (and impressed) to see one come out... Brent Bice Applied Computing Systems 2075 Trinity Drive Suite Lower Level Los Alamos, NM 87544 (505) 662-3309 bice@atlantis.ees.anl.gov From don Fri May 18 18:30:55 1990 Date: Fri, 18 May 90 18:30:55 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: NeWS on the Amiga 3000 From: hbo!bice (Brent A. Bice) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Well, sorry I can't offer more tangible support, but... Well, you know us po' programmers... (grin!) I'll offer all the moral support I can tho. The Amiga WOULD indeed make a nice NeWS station... By the by, what is the Eunuchs port for it like? I haven't been able to find a good place to find out more on the Amigas as the retailers around here that sell 'em don't last too long generally... But I do try ta check up on 'em now and again... Pretty nifty machine! Brent Bice Applied Computing Systems 2075 Trinity Drive Suite Lower Level Los Alamos, NM 87544 (505) 662-3309 bice@atlantis.ees.anl.gov From don Fri May 18 18:32:04 1990 Date: Fri, 18 May 90 18:32:04 -0400 To: NeWS-makers@brillig.umd.edu Subject: More on build image From: hbo!bice (Brent A. Bice) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) >>Buildimage seems an awkward solution if your canvas contains complicated shapes >>where some are filled and some are not. Correct me if I'm wrong, but with >>buildimage, don't you hafta specify each pixel in the image rather than >>actually providing a procedure to draw it??? > >You use buildimage to create an offscreen canvas of the appropriate >depth, but which is just 1 pixel by 1 pixel. Pass this canvas to >newcanvas (or maybe you can just reshapecanvas it... hmmm...) and you >have a bigger canvas that you render into. When you want to display >it on the screen, use imagecanvas with this canvas as the source. If >you get all of the scales set up correctly it can just do a copy of >the pixels one for one, which is fast. Hmmm... Haven't tried that although I've tried drawing directly to the canvases created with buildimage after a scale command... But isn't it still faster to have a retained canvas the appropriate size to draw to, and rather than use imagecanvas to render it, merely map it? Hmmm. Guess I'll hafta do some time-trials here (grin!). Also, (since I'm not at work and can't try it out fer meself), can images made with buildimage be reshaped and then can they be mapped? That might be the fastest solution (if it works) for double-buffering. Then toggling from one buffer to the next would be merely a map/unmap combination (assuming mapping a canvas is faster than imagecanvas with the appropriate transformation). Hmmm.. Dunno. Hafta get better so's I can go back to work and play some more! Brent Bice Applied Computing Systems 2075 Trinity Drive Suite Lower Level Los Alamos, NM 87544 (505) 662-3309 bice@atlantis.ees.anl.gov From don Fri May 18 18:32:49 1990 Date: Fri, 18 May 90 18:32:49 -0400 To: NeWS-makers@brillig.umd.edu Subject: buildimage again From: hbo!bice (Brent A. Bice) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Well, I played some with buildimage... And yep, it sure does make empty canvases really fast, but I couldn't figure out how to use NeWS to draw on the canvas. I can't reshape it (at least, it doesn't appear to be reshaped when you pstack it), and if I set it to be my canvas, and draw on it with scale/moveto/lineto/etc, I generally get a canvas that is all one color. So when I imagecanvas it, I'm certainly not getting anything useful from it. Has anyone else tried things with buildimage? Is there any way to draw on a canvas made with buildimage with the standard NeWS operators (ie, not with the proc given to buildimage)? If not, I guess I'll just hafta stick with those retained canvases that I can't (evidently) always count on. (grin!) Brent Bice Applied Computing Systems 2075 Trinity Drive Suite Lower Level Los Alamos, NM 87544 (505) 662-3309 bice@atlantis.ees.anl.gov % I program, therefore I am. From don Fri May 18 19:36:29 1990 Date: Fri, 18 May 90 19:36:29 -0400 To: NeWS-makers@brillig.umd.edu Subject: More on build image From: don (Don Hopkins) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) I've been able to do a pretty fast double buffering by using buildimage to make a 1 bit deep backing canvas, which I draw on, and having the paint proc just use imagecanvas to move it onto the screen pronto. It works quite well when the image you want to retain isn't color, but you're running on a color display. You can make the screen canvas opaque and nonretained (/Transparent false def /Retained false def), since damage repair is quick. "imagecanvas" moves from a 1 bit deep canvas to the color screen pretty fast. A hell of a lot better than using retained color canvases and paging it in from disk. Here's a defensive way of building a 1 bit deep backing canvas: /BackingCanvas ObjectWidth .4 add round ObjectHeight .4 add round 2 copy mul 0 eq { pop pop 1 1 } if 1 [ 1 0 0 -1 0 7 index ] % w h d [1 0 0 -1 0 h] null buildimage % can def In X11/NeWS, reshapecanvas does not work on canvases created with buildimage, so you have to do a new buildimage every time you want a new size of BackingCanvas (sigh). But it's pretty fast if you use the "null" argument. The canvas's coordinate system will be set up so that the origin is in the lower left corner, and the scale is 1 unit per pixel. (Perhaps you were setting the scale so it was [w 0 0 -w 0 h] so (0,0) was the lower left corner and (1,1) was the upper right corner?) With the coordinate system of the BackingCanvas set up like that, one way to repair damage is: gsave Canvas setcanvas damagepath clipcanvas % this tells NeWS we're repairing damage! % the following might speed things up but I'm not sure... emptypath not { pathbbox points2rect newpath rectpath } if ObjectX ObjectY translate ForegroundColor setcolor BackgroundColor setbackcolor % This works because of the coordinate system of the source canvas. BackingCanvas imagecanvas newpath clipcanvas % this tells NeWS we're done repairing damage. grestore If the "damagepath clipcanvas ... newpath clipcanvas" were not there, NeWS would not generate any more damage events on the canvas. You can pick any two colors to display the 1 bit deep backing store in, since "imagecanvas" uses the currentcolor and currentbackcolor when it's stamping it on the screen. You can use the backing store to do fast color highlighting: clip to the region you want to highlight, setcolor/setbackcolor to some more obnoxious color than usual, and do the imagecanvas. I've used a variation of this technique to implement popups. I map a canvas in the shape of the popped-up region, and paint it by drawing a drop shadow in gray and the popped up image in some obnoxious color, using imagecanvas and the BackingCanvas of the canvas whose image I'm popping up (and some appropriate transformations and clipping). The popup canvas can be opaque, so that when it's popped down, or reshaped so it pops up in another location (i.e. while tracking the cursor), it will generate damage on the unretained opaque canvas below, which will repaint very quickly in the appropriate colors from the same 1 bit backing canvas the popup is using. At first I was making the popup canvas /SaveBehind = true, but each time it tracked the cursor by reshaping and repainting again and again, it would dissappear then reappear somewhere else, which didn't look as nice and continuous as it did without SaveBehind, when the damage handler would repair the old image an instant after the new image was drawn somewhere else. (personal taste I guess) -Don From don Sat May 19 21:22:23 1990 Date: Sat, 19 May 90 21:22:23 -0400 To: NeWS-makers@brillig.umd.edu Subject: Using SaveBehind in popups From: David Burgess Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Don Hopkins writes (re: build imaging) == At first I was making the popup canvas /SaveBehind = true, but each time it tracked the cursor by reshaping and repainting again and again, it would dissappear then reappear somewhere else, which didn't look as nice and continuous as it did without SaveBehind, when the damage handler would repair the old image an instant after the new image was drawn somewhere else. == There's a general point that I have noticed about popups. One can spend some time perusing the choices, and in the meantime a window partially obscured by the popup might be repainted (eg. it's a clock or a meter of some sort). The part of the canvas saved by /SaveBehind = true is now out of date, but the popup doesn't know that, so it doesn't generate a damage message. Is there a way that it could? (Perhaps express interest in paint requests to canvases that it overlies...?) An example the problem can be seen using the tNt example Meter and letting the workspace menu overhang it, and waiting for the Meter reading to change before dismissing the menu. It seems that /Savebehind=true is only useful if canvases don't change their content, ane while true most of the time, it certainly isn't true ALL of the time. David Burgess ==== Astronomy Unit, QMW, University of London From don Thu May 24 07:59:56 1990 Date: Thu, 24 May 90 07:59:56 -0400 To: NeWS-makers@brillig.umd.edu Subject: SaveBehind canvases From: hbo!bice (Brent A. Bice) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Actually, when a canvas behind a savebehind canvas gets repainted, and the save behind canvas goes away, it usually WILL send a damage event to the canvas behind it. At least as far as I can tell. But it is only "usually". Under NeWS 1.1 we had problems with menus leaving old "saved" data on the window underneath if the window underneath got painted while the menu was active... Haven't looked at this problem under 2.0 yet... Brent Bice Applied Computing Systems 2075 Trinity Drive Suite Lower Level Los Alamos, NM 87544 (505) 662-3309 bice@atlantis.ees.anl.gov % I program, therefore I am. From don Thu May 24 08:01:06 1990 Date: Thu, 24 May 90 08:01:06 -0400 To: NeWS-makers@brillig.umd.edu Subject: Visual type PseudoColor in NeWS From: David Burgess Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) (ok .. a day spent experimenting, now I'll ask the experts.) With NeWS2.0 it should be possible to install a user controllable "palette" (that's the Mac terminology, and corresponds to NeWS's colormaps and colorsegments). My intention is to use image with 8bit samples and then let the NeWS side interacitvely change which colors correspond to which sample value. Because the display uses a color lookup table this should be possible without any redrawing. My experiments haven't been successful. (I am using the tNt toolkit for frames etc, but that shouldn't be important.) Q1: I seem to be able to create a canvas with a PseudoColor Visual (rather than the usual StaticColor and a colormap with an associated colorsegment that I can change. With setpixel I can change the current drawing color. But if I do the image operator it gives me gray scales (as with ordinary canvas). Can image EVER give color images? Q2: Is there something to be done to force server to use my colormap rather than the StaticColor one that all the other canvases want to use? The redbook doesn't mention color in the context of the image operator, indeed the settransfer operator (from sample space to rendering space) only mentions grayscale operation. BTW I don't want to use writecanvas/readcanvas because I want to be able to send my postscript to a printer with minimum of changes. Has anybody tried to do something similar? Can anyone share any insights in to the problem? This aspect of NeWS is poorly documented, and any help would be appreciated! David Burgess ===== Astronomy Unit, QMW, University of London +44 71 975 5460 From don Thu May 24 08:01:24 1990 Date: Thu, 24 May 90 08:01:24 -0400 To: NeWS-makers@brillig.umd.edu Subject: buildimage From: Anthony Worrall Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) All this recent talk about buildimage prompts me ask about a problem have sidelined for a bit. What is the best (most reliable) way to download an image from the client to server. The problem is that the image can be larger than the maximum size of a string. Anthony From don Thu May 24 08:03:12 1990 Date: Thu, 24 May 90 08:03:12 -0400 To: NeWS-makers@brillig.umd.edu Subject: How to indicate an error? From: well!jef@apple.com (Jef Poskanzer) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Another basic question. I want to raise a syntax error, or some other error indication, in my own code. What's a good way to do this? The following works on a LaserWriter but fails in NeWS (since errordict is not that way): errordict begin syntaxerror I guess I could print a message to the log file and then "stop". Is there some standard way to indicate an error? --- Jef Jef Poskanzer jef@well.sf.ca.us {ucbvax, apple, hplabs}!well!jef INSPECTED BY #23 From don Thu May 24 08:03:27 1990 Date: Thu, 24 May 90 08:03:27 -0400 To: NeWS-makers@brillig.umd.edu Subject: A definitive NeWS reference? From: mcsun!ukc!harrier.ukc.ac.uk!rlh2@uunet.uu.net (Richard Hesketh) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) I need a definitive reference(s) for NeWS (i.e. something that defines what NeWS it and how it was created etc.). I remember reading about a book written about NeWS that was supposed to be very good, unfortunately I cannot remember any details. We don't having anything locally, so I am asking some kind soul to give me some pointers. Thanks a lot, Richard Richard Hesketh : @nsfnet-relay.ac.uk:rlh2@ukc.ac.uk : rlh2@ukc.ac.uk ..!mcvax!ukc!rlh2 --- Computing Lab., University of Kent at Canterbury, Canterbury, Kent, CT2 7NF, United Kingdom. Tel: +44 227 764000 ext 3682/7620 From don Thu May 24 08:04:05 1990 Date: Thu, 24 May 90 08:04:05 -0400 To: NeWS-makers@brillig.umd.edu Subject: settings in OpenWindows 1.0.1 From: van-bc!ubc-cs!alberta!ccu!andchan@ucbvax.Berkeley.EDU (Andrew Chan) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) I have to give a demonstration of OpenWindows 1.0.1. I am sort of familiar with the MIT X11R4 stuffs, including the Xview environment and olwm. However, I know very little about Postscript and am having trouble doing the following: 1. I need larger fonts for the Workspace menus. 2. "man psterm" says I can define my UserProfile in ~/.startup.ps for the default font. It always bombed and never worked for me. 3. What is the general appoach for specifying fonts for verious applications? So far, I find this X11/NeWS environment very difficult to use for someone who doesn't know much about Postscript. Moreover, information is very limited.... Comments? From don Thu May 24 08:04:26 1990 Date: Thu, 24 May 90 08:04:26 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: A definitive NeWS reference? From: swrinde!cs.utexas.edu!samsung!zaphod.mps.ohio-state.edu!rpi!uupsi!sunic!dkuug!iesd!iesd.auc.dk!fischer@ucsd.edu (Lars P. Fischer) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) In article <4728@harrier.ukc.ac.uk> rlh2@ukc.ac.uk (Richard Hesketh) writes: >... I remember reading about a book >written about NeWS that was supposed to be very good, unfortunately I >cannot remember any details. That must be @Book{gosling:news:book, author = "J. Gosling and D. Rosenthal and M. Arden", title = "The {NeWS} Book", publisher = "Springer-Verlag", year = "1989", address = "Berlin", isbn = "3 540 96915 2" } It's a nice book, albeit at bit too introductory for my taste. I would have liked to see some more advanced stuff. There have been a number of articles on NeWS in various journals, as well as some conference papers. A good place too start is the X Technical Bibliography, posted regularly to comp.windows.x (maybe we should have a NeWS Technical Bibliography :-). /Lars -- Lars Fischer, fischer@iesd.auc.dk | NeXT: A disaster looking for a place CS Dept., Univ. of Aalborg, DENMARK. | to happen -- Bill Joy From don Thu May 24 08:04:37 1990 Date: Thu, 24 May 90 08:04:37 -0400 To: NeWS-makers@brillig.umd.edu Subject: NeWS framebuffer From: cs.utexas.edu!uwm.edu!rpi!uupsi!sunic!peabd!ptve@tut.cis.ohio-state.edu (Peter Verst{ndig) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) We would like to run NeWS on a small (14" - 15") color monitor. Sun does not appear to have such stuff. Is there anything available from any other supplier ? How about NeWS Terminals ?? From don Thu May 24 08:05:02 1990 Date: Thu, 24 May 90 08:05:02 -0400 To: NeWS-makers@brillig.umd.edu Subject: NeFS - Network Extensible File System From: mcsun!unido!ztivax!sinix!pete@uunet.uu.net (Pete Delany) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Carl Smith mentioned that: > > The NFS version 3 protocol (now called NeFS - Network extensible > File System) is available as a PostScript file via anonymous > FTP as > > ./public/nefs.doc.ps on titan.rice.EDU (128.42.1.30). > > the file is ~250K and generates 52 pages. Is there a recient posting on usenet and if not could someone post one to make it easily available? It would take a non-trivial amount of work to FTP a copy and get it here. It sounds very important, and more than worthy of a posting. For those that have read the new NFS spec, any opinion? Sounds a bit like Microsoft focusing more on Windows 3.0 than OS2 (See Wall Street Journal 22-May-90). -pete From don Thu May 24 08:05:13 1990 Date: Thu, 24 May 90 08:05:13 -0400 To: NeWS-makers@brillig.umd.edu Subject: Automated Playback Software for Window Environments From: ontologic!tpk@uunet.uu.net (Ted Kyriakakis) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) We are interested in performing automated test scripts on a windows-based application (currently based on X Windows - Motif, but probably based on others in the future). To do this, we believe that we would need some software which would play back window events (i.e., mouse clicks). Is their any public domain or commercial software available which does this sort of thing? As mentioned above, we are currently interested in something for the X Windows-Motif environment, but would be interested in such software for other windowing environments. In fact, the ultimate software would work on a variety of, if not all, windowing environments. Please send responses to me at: uunet!ontologic!tpk If there is interest, I will summarize the responses to the respective newsgroups. Thanks. - Ted @ Ontologic From don Thu May 24 08:06:00 1990 Date: Thu, 24 May 90 08:06:00 -0400 To: NeWS-makers@brillig.umd.edu Subject: buildimage (one more time) From: hbo!bice (Brent A. Bice) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Well, I greatly appreciate all the mail on buildimage... I seem ta have run across the right solution (fer me anyway). I originally was tryin' ta use buildimage to make a canvas, then do a setcanvas on it, and then try ta use scale to set up the transformation so that I could draw to it... DUMB! What makes more sense (and 'pears ta work) is to give buildimage a desired transformation matrix instead of tryin' ta use scale and such. I did somethin' kinda like this: /win framebuffer /new LiteWindow send def /reshapefromuser win send /map win send /ClientCanvas win send setcanvas /ClientWidth win send /ClientHeight win send % make my canvas same size 8 matrix currentmatrix % 8 bits, and same transformation as ClientCanvas null buildimage /tcan exch def % now tcan is the right width/height/transformation gsave tcan setcanvas erasepage 1 0 0 setrgbcolor 0 0 moveto 100 100 lineto stroke % rather arbitrary, but.... grestore gsave /ClientWidth win send /ClientHeight win send scale tcan imagecanvas grestore % At this point, the ClientCanvas has a red line from 0 0 to 100,100. % This even worked on the SGI. As far as bein' faster than just mapping % or unmapping retained canvases I don't know, but it probably takes % considerably less memory if you have several "frames" (canvases) that % are being "flipped" through (or several pages of double buffering). Brent Bice Applied Computing Systems 2075 Trinity Drive Suite Lower Level Los Alamos, NM 87544 (505) 662-3309 bice@atlantis.ees.anl.gov % I program, therefore I am. From don Thu May 24 08:06:14 1990 Date: Thu, 24 May 90 08:06:14 -0400 To: NeWS-makers@brillig.umd.edu Subject: Postscript limitations on iris news? From: phoenix!rlwald@princeton.edu (Robert L. Wald) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) I have a problem with previewing postscript files on a Personal Iris running NeWS (Iris 3.2, 4Sight). The file (which is produced by dag, from ATT) prints out on the Laserwriter IINT attached to the Iris cluster, it can be previewed on a NeXT, but psview can't deal with it. It has a bunch of nodes, each of which is a box or a diamond or some such, each of which is labeled, and splined arrows are drawn between them (its a directed graph). Is this a problem with NeWS postscript? SHould it be able to do something like this? psview fails, and I tried going through psh directly and it did the same thing (both draw one diamond for the first node, and then nothing more). Is there a better previewer available via ftp from somewhere? Are there known limitations or a filter which can be used to make the postscript work? Thanks a lot for any help. -Rob Wald rlwald@phoenix.princeton.edu From don Thu May 24 08:06:42 1990 Date: Thu, 24 May 90 08:06:42 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: Postscript limitations on iris news? From: wind.Eng.Sun.COM@sun.com (Patrick Naughton) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Due to implementation differences between NeWS and the LaserWriter there were many types of machine generated PostScript which printed just fine on the printer but could not be previewed by NeWS. 4Sight is based on NeWS 1.1, which is over two years old and thus suffers from most of these incompatibilities. Most (all?) of the problems are gone in OpenWindows Version 2. Notably TeX output from dvi2ps, Scribe, Macintosh LaserPrep, and Interleaf files should now all preview properly in pageview. -Patrick In article <16588@phoenix.Princeton.EDU>, rlwald@phoenix.Princeton.EDU (Robert L. Wald) writes: |> |> I have a problem with previewing postscript files on a Personal Iris |> running NeWS (Iris 3.2, 4Sight). The file (which is produced by |> dag, from ATT) prints out on the Laserwriter IINT attached to the |> Iris cluster, it can be previewed on a NeXT, but psview can't deal |> with it. It has a bunch of nodes, each of which is a box or a diamond |> or some such, each of which is labeled, and splined arrows are drawn |> between them (its a directed graph). |> Is this a problem with NeWS postscript? SHould it be able to |> do something like this? psview fails, and I tried going |> through psh directly and it did the same thing (both draw one |> diamond for the first node, and then nothing more). |> Is there a better previewer available via ftp from somewhere? Are there |> known limitations or a filter which can be used to make the postscript |> work? |> Thanks a lot for any help. |> |> |> |> -Rob Wald |> rlwald@phoenix.princeton.edu ______________________________________________________________________ Patrick J. Naughton ARPA: naughton@sun.com Window Systems Group UUCP: ...!sun!naughton Sun Microsystems, Inc. AT&T: (415) 336 - 1080 From don Thu May 24 08:07:04 1990 Date: Thu, 24 May 90 08:07:04 -0400 To: NeWS-makers@brillig.umd.edu Subject: overlays on color displays From: socrates.ucsf.edu!kneller@cgl.ucsf.edu (Don Kneller) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) I have an application that uses color raster images that I would like to put dynamic images on top of (e.g. drag boxes, crosshairs, etc). Dynamic images are usually easy to do on an overlay canvas. However, the overlay canvas uses XOR to draw the dynamic image. XORing on a color map involves XORing the color map index. If an XORed index refers to a very similar color, no image will be seen on the overlay. I have two alternatives: 1) use overlays and reserve 1/2 of the color map indices for colors that have "reasonable" contrast with the 1/2 of the color map representing true data. 2) use some other technique which is reasonably fast and does not use the XORing method Has anyone tried 2)? Does anyone have an other suggestions? I really don't want to give up 1/2 of the the color map as data resolution is critical in this application. Thank you in advance. Don Kneller Computer Graphics Laboratory UCSF ----- Don Kneller UUCP: ...ucbvax!ucsfcgl!kneller INTERNET: kneller@cgl.ucsf.edu BITNET: kneller@ucsfcgl.BITNET From don Thu May 24 08:07:38 1990 Date: Thu, 24 May 90 08:07:38 -0400 To: NeWS-makers@brillig.umd.edu Subject: buildimage From: don (Don Hopkins) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Date: Mon, 21 May 90 11:12:50 BST From: Anthony Worrall All this recent talk about buildimage prompts me ask about a problem have sidelined for a bit. What is the best (most reliable) way to download an image from the client to server. The problem is that the image can be larger than the maximum size of a string. Anthony The best thing to do is to use shared memory canvases. Next best thing, you can use readcanvas followed by a Sun raster file. -Don From don Thu May 24 17:20:05 1990 Date: Thu, 24 May 90 17:20:05 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: buildimage From: hbo!bice (Brent A. Bice) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Anthony Worrall writes: >All this recent talk about buildimage prompts me ask about a problem have >sidelined for a bit. What is the best (most reliable) way to download an >image from the client to server. The problem is that the image can be >larger than the maximum size of a string. Try using a socket. On the NeWS side, if you want to work on both 1.1 and 2.0, use the acceptconnection side of the socket. Under 1.1, sockets seem to work reliably only if the NeWS side of the socket is the server side... Weird. But using a socket works for sending images or large amounts of any data. From don Mon May 28 23:44:06 1990 Date: Mon, 28 May 90 23:44:06 -0400 To: NeWS-makers@brillig.umd.edu Subject: How to use toolplaces in openwindows From: skdutta@cs.tamu.edu (Saumen K Dutta) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) I am a new user of openwindows. I would like to have a default screen in the openwindow environment in the same way as you create in the sunview environment by the command toolplaces > .sunview I think it is very simple and straight forward but I am unable to figure it out. Please help ! - the dumbo From don Mon May 28 23:44:32 1990 Date: Mon, 28 May 90 23:44:32 -0400 To: NeWS-makers@brillig.umd.edu Subject: Xframemaker in OpenLook From: eru!luth!sunic!tut!ks@bloom-beacon.mit.edu (Syst{ Kari) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Few months ago I asked why the search window of the x-framemager (v1.3) cannot get the focus. Now, I found a hack-hack solution. While beeing in the search-window I must send "/ReDistribute /setfocus ClassFocus send". The easiest way to do that is to add that to BaseFrameMenu like follows: 7 (Set Focus) null { /ReDistribute /setfocus ClassFocus send } /insert OpenLookFrame /SharedBaseFrameMenu get send PS. I'm running OpenWindows 1.0. This might be a bug which is fixed in 1.0.1, but I have not received it yet. Your local Sun distributer told that I should receive 1.0.1 automatically. Unfortunately noone seem to know when. Next year ? -- This article represents my personal views. Quote of the year: "X is the Fortran of windowing systems." Kari Systa, Tampere Univ. Technology, Box 527, 33101 Tampere, Finland work: +358 31 162585 fax: +358 31 162913 home: +358 31 177412 From don Mon May 28 23:44:42 1990 Date: Mon, 28 May 90 23:44:42 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: buildimage - shared canvases From: cs.utexas.edu!news-server.csri.toronto.edu!torsqnt!jtsv16!kevin@tut.cis.ohio-state.edu (kevin) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Can anyone post a code fragment giving an example of using shared canvases? I've never gotten this to work reliably. -- Kevin Brighton kevin@jtsv16.jts.com JTS Computer Systems Ltd. { torsqnt | suncan | geac | uunet }!jtsv16!kevin Toronto, Ontario, CANADA +1 416 665 8910 From don Mon May 28 23:46:25 1990 Date: Mon, 28 May 90 23:46:25 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: NeWS framebuffer From: c-art!jae@Canada.Sun.COM (Yukon Kid) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) In NeWS-makers mailing list: |We would like to run NeWS on a small (14" - 15") color monitor. |Sun does not appear to have such stuff. Is there anything available |from any other supplier ? How about NeWS Terminals ?? We sell an Australian-designed X11/NeWS terminal, the Osiris Technology GraphicServer. It is a NeWS compatible box that you can buy your own monitor for. It will display on any monitor with 75 ohm rgb inputs. The North American debut is taking place this week at UNIX'90 in Toronto, May 30, May 31, and June 1. We will be showing it in the Sun Microsystems booth. Pricing is roughly $5K US for the basic box - more details are available at the show. I enclose a few specifications after my .signature. Please mail me or call us after the show for more information. -john John Eadie Computing Art Inc Tel (416) 536-9951 FAX (416) 536-6252 Studio #303, 25 Liberty St, Toronto, CANADA .. jeadie@Sun.COM | jae@c-art.UUCP `_The riddle_ does not exist' 6.5, Tractatus Logico-Philosophicus, Wittgenstein -% The GraphicServer %- A fast, optionally hi-res, colour X11/NeWS terminal. Software: Software consists of X11R3 and OpenScript. Work on X11R4 is now in progress. OpenScript does a Red Book implementation of PostScript with the exception of virtual memory semantics, lack of `banddevice', lack of `renderbands', and more generous stack limits. `framedevice', `setmatrix', `setscreen' & `settransfer' _are_ implemented. (For use with printers). OpenScript implements operators and type extensions in the NeWS 1.1 Reference Manual. However context switching is fully pre-emptive. Memory management uses spare memory for font caching & off-screen bit map retention. There is garbage collection. And a special file to read frame devices as byte streams for raster printer driving. OpenScript uses floating point in most algorithms until device space is addressed. There is a built-in OPEN LOOK compliant window manager. Full outline fonts available at all sizes. And ANSI terminal emulators. TCP, TELNET, FTP, are supported. Hardware: NS32532 (8 MIPS). NS32381 floating point. Thin ethernet. 2 RS232 ports. Centronics port. 3 button mouse, mouse systems interface. 2Kb non-volatile memory. 4Mb RAM, expandable to 8Mb. 1Mb video memory, expandable to 2Mb. 8 bit colour, for now. Standard broadcast format video capability. Maximum video rate 120Mhz. Optional disk for PostScript storage or Unix. From don Mon May 28 23:46:54 1990 Date: Mon, 28 May 90 23:46:54 -0400 To: NeWS-makers@brillig.umd.edu Subject: Looking for Public domain NeWS archives From: sun-barr!newstop!exodus!aiki.Eng.Sun.COM!kron@lll-winken.llnl.gov (Kenneth Kron) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Just wondering whose got it avalable by anon. ftp. kk -- Kenneth Kron (kron@eng.sun.com) ----- The opinions I gave were mine, the opinions you form are yours. From don Mon May 28 23:50:29 1990 Date: Mon, 28 May 90 23:50:29 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: Automated Playback Software for Window Environments From: chinet!patrickd@gargoyle.uchicago.edu (Patrick Deupree) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) In article <820@ontologic.UUCP> tpk@ontologic.UUCP (Ted Kyriakakis) writes: >We are interested in performing automated test scripts on a windows-based >application (currently based on X Windows - Motif, but probably based on others >in the future). There is now a Windows event recorder that comes with Windows 3.0. This'll at least do the job for Windows. (It's pretty cool, too.) -- "Organized fandom is composed of a bunch of nitpickers with a thing for trivial pursuit." -Harlan Ellison Patrick Deupree -> patrickd@chinet.chi.il.us From don Tue May 29 21:41:16 1990 Date: Tue, 29 May 90 21:41:16 -0400 To: NeWS-makers@brillig.umd.edu Subject: Scaling From: swrinde!cs.utexas.edu!uwm.edu!rpi!uupsi!sunic!nuug!ifi!Lazy@ucsd.edu Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Is it possible for a window (under NeWS 1.1) to have a non-evenly-spaced scale ? Something like a mercator map projection ? Have someone written such a scale-function ? Lasse Bjerde lazy@ifi.uio.no Department of Informatics University of Oslo, Norway From don Tue May 29 21:43:13 1990 Date: Tue, 29 May 90 21:43:13 -0400 To: NeWS-makers@brillig.umd.edu Subject: Wanted, development browser for NeWS 2 From: mcsun!ukc!canon!laukee@uunet.uu.net (David Lau-Kee) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Does anyone know of an editor-browser for NeWS 2? I have Bruce Schwartz's lite browser with his fixes for OpenWindows, it is great, but really what's needed is something which will let the user develop code (incrementally) as well as just view it. I don't know about others, but I'm finding it a real pig to force the natural hierarchies and groupings of the NeWS class approach onto the linear top-to-bottom code layout of a text file... especially with TNT (there's just *sooo* much of it). After working with Smalltalk for 5 years maybe I'm a bit out of touch with how Real Programmers doIt, but I'll be damned if I'm going back to poring over a sweaty 15 page listing in order to get a feel for the code. I want to be able to modify and add code and have it picked up on the fly...this should be no problem for NeWS. Maybe someone wants to build an editor-browser? Taking Schwartz's as a good starting point would mean that the job wouldn't be *too* difficult. Anyone got a grad student looking for a project? How about 'support tools for NeWS'? Anybody at Sun want to pay me to do it in my spare time? Anyone want to talk to my boss and get him to let me do it in the company's time? Anybody doing it now and looking for alpha sites? ------------- David Lau-Kee Canon Research Centre Europe, 17/20 Frederick Sanger Rd, Surrey Research Park, Guildford, Surrey, GU25YD, UK. NRS: laukee@uk.co.canon, INET: laukee%canon@nsfnet-relay.ac.uk UUCP: laukee@canon.uucp, PATH: ..!mcsun!ukc!uos-ee!canon!laukee Tel: +44 (0) 483 574325 Fax: +44 (0) 483 574360 From don Tue May 29 21:43:37 1990 Date: Tue, 29 May 90 21:43:37 -0400 To: NeWS-makers@brillig.umd.edu Subject: shared memory canvas animation: mapper.shar From: don (Don Hopkins) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) This is a program that uses a shared memory canvas in the X11/NeWS server to quickly animate a sequence of raster images on the screen. The input file should contain a sequence of raw 8 bit images, no headers, no colormaps, just the the uncompressed pixel values. It read the images from the input file into shared memory, and tells the NeWS server to "imagecanvas" each frame on the screen, then waits for it to finish, plus a specified delay, before reading and displaying the next frame. I don't know how it'll deal with the strange framebuffer colormap situation in OpenWindows 2.0. It should work slowly in monochrome because "imagecanvas" has to dither the images, but it should be easy to modify it to animate 1 bit deep images. -Don --- DELETE EVERYTHING ABOVE & INCLUDING THIS LINE, AND RUN THROUGH SH --- : Run this shell script with "sh" not "csh" PATH=/bin:/usr/bin:/usr/ucb:/etc:$PATH export PATH all=false if [ x$1 = x-a ]; then all=true fi echo Extracting Makefile sed 's/^X//' <<'//go.sysin dd *' >Makefile XCFLAGS = -O4 X#CFLAGS = -g XNEWSHOME = /usr/NeWS XLIBCPS = ${NEWSHOME}/lib/libcps.a X Xmapper: mapper.o X cc ${CFLAGS} mapper.o ${LIBCPS} -o mapper X Xmapper.o: mapper.c mapper.h X cc ${CFLAGS} -I${NEWSHOME}/include -c mapper.c X Xmapper.h: mapper.cps X cps mapper.cps X Xclean: X rm -f mapper mapper.o mapper.h *.BAK *~ core //go.sysin dd * if [ `wc -c < Makefile` != 311 ]; then made=false echo error transmitting Makefile -- echo length should be 311, not `wc -c < Makefile` else made=true fi if $made; then chmod 644 Makefile echo -n ' '; ls -ld Makefile fi echo Extracting mapper.c sed 's/^X//' <<'//go.sysin dd *' >mapper.c X/* X * mapper.c X * Copyright (C) 1990 by Don Hopkins X * X * SunOS 4.0 memory mapping client for X11/NeWS X * X * mapper InputFile SharedFile Width Height USleep SkipBytes X */ X X#include X#include X#include X#include X#include X#include X#include "mapper.h" X Xchar *InputFile; Xchar *SharedFile; Xint X, Y, Width, Height; Xint USleep; Xint SkipBytes; Xint ImageBytes; Xint RowBytes; Xint Input; Xchar *Image; Xchar *Padding; X Xchar *mmap_sharedfile(); Xint unmap_sharedfile(); X Xmain (argc, argv) Xint argc; Xchar *argv[]; X{ X if (argc != 9) { X fprintf(stderr, X "usage: mapper InputFile SharedFile X Y Width Height USleep SkipBytes\n"); X exit(1); X } X X InputFile = argv[1]; X SharedFile = argv[2]; X X = atoi(argv[3]); X Y = atoi(argv[4]); X Width = atoi(argv[5]); X Height = atoi(argv[6]); X USleep = atoi(argv[7]); X SkipBytes = atoi(argv[8]); X X ImageBytes = Width * Height; X X if (strcmp(InputFile, "-") == 0) { X Input = fileno(stdin); X } else if ((Input = open(InputFile, O_RDONLY, 0)) < 0) { X fprintf(stderr, "Can't open input file %s\n", InputFile); X exit(1); X } X X ps_open_PostScript(); X ps_initialize(SharedFile, Width, Height, &RowBytes); X X if ((Image = mmap_sharedfile(SharedFile, ImageBytes)) == (char *)-1) { X fprintf(stderr, "Can't mmap %d byte file %\n", ImageBytes, SharedFile); X } X X Padding = (char *)malloc(SkipBytes); X X pump(); X} X X/* X * mmap_sharedfile - mmap the given absolute filename for memlen number X * of bytes rounded to page boundary. File will be mapped R/W. X * Caller should check for validity of returned pointer. X */ X Xchar * Xmmap_sharedfile(absfn, memlen) X char *absfn; X int memlen; X{ X struct stat statbuf; X char *buf; X register int wtemp, fd; X register int pagesize; X static char ar[] = {0x0}; X X pagesize = getpagesize(); X memlen = pagesize * ((memlen + pagesize - 1) / pagesize); X X if (!(fd = open(absfn, O_RDWR, 0666))) X return((char *)-1); X /* check out the filesize, extend if needed */ X if (stat(absfn, &statbuf)) X return((char *)-1); X if (statbuf.st_size < memlen) { X wtemp = lseek(fd, (off_t)(memlen-1), L_SET); X if (wtemp == -1) { X close(fd); X return((char *)-1); X } X if (write(fd, ar, 1) != 1) { X close(fd); X return((char *)-1); X } X } X X /* Map the file pages */ X buf = (char *)mmap((caddr_t)0, memlen, PROT_READ|PROT_WRITE, X MAP_SHARED, fd, (off_t)0); X close(fd); X return(buf); X} X X X/* X * unmap_sharedfile - munmap the given pointer for memlen number of X * bytes rounded to page boundary. Caller should check for return X * value. X */ X Xint Xunmap_sharedfile(buf, memlen) X caddr_t buf; X int memlen; X{ X register int pagesize; X X pagesize = getpagesize(); X memlen = pagesize * ((memlen + pagesize - 1) / pagesize); X X if (msync(buf, memlen, MS_INVALIDATE) < 0) X return(-1); X if (munmap(buf, memlen) < 0) X return(-1); X X return(0); X} X Xpump() X{ X char *p; X int syncin, syncout; X int n; X int dontseek = 0; X X vadvise(VA_SEQL); X X while (1) { X if (!dontseek && X (lseek(Input, (off_t)SkipBytes, L_INCR) < 0)) { X fprintf(stderr, "Seek failed -- trying to read instead!\n"); X dontseek = 1; X } X if (dontseek && X ((n = read(Input, Padding, SkipBytes)) != SkipBytes)) { X fprintf(stderr, "Read %d/%d skip bytes -- exiting!\n", n, SkipBytes); X break; X } X X if ((n = read(Input, Image, ImageBytes)) == ImageBytes) { X ps_splat(X, Y); X ps_sync(syncin,&syncout); X syncin++; X usleep(USleep); X } else { X fprintf(stderr, "Read %d/%d image bytes -- exiting!\n", n, ImageBytes); X break; X } X } X} //go.sysin dd * if [ `wc -c < mapper.c` != 3671 ]; then made=false echo error transmitting mapper.c -- echo length should be 3671, not `wc -c < mapper.c` else made=true fi if $made; then chmod 644 mapper.c echo -n ' '; ls -ld mapper.c fi echo Extracting mapper.cps sed 's/^X//' <<'//go.sysin dd *' >mapper.cps XC: #define ROWBYTES_TAG 1 XC: #define SYNC_TAG 2 X#define ROWBYTES_TAG 1 X#define SYNC_TAG 2 X Xcdef ps_initialize(string SharedFile, Width, Height, LineBytes) X => ROWBYTES_TAG(LineBytes) X X /height Height def X /width Width def X /sharedfile SharedFile def X /canvas X width height 8 [width 0 0 height neg 0 height] null buildimage X def X canvas /RowBytes get ROWBYTES_TAG tagprint typedprint X canvas /SharedFile sharedfile put X Xcdef ps_splat(x, y) X gsave X framebuffer setcanvas X x y translate X width height scale X canvas imagecanvas X grestore X Xcdef ps_sync(In, Out) => SYNC_TAG(Out) X SYNC_TAG tagprint In typedprint //go.sysin dd * if [ `wc -c < mapper.cps` != 634 ]; then made=false echo error transmitting mapper.cps -- echo length should be 634, not `wc -c < mapper.cps` else made=true fi if $made; then chmod 644 mapper.cps echo -n ' '; ls -ld mapper.cps fi From don Tue May 29 23:04:41 1990 Date: Tue, 29 May 90 23:04:41 -0400 To: NeWS-makers@brillig.umd.edu Subject: pseudoscientific animation available via ftp ("mapper" example) From: don (Don Hopkins) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) As an example of how to use the "mapper" program I just posted, I have made available for anonymous ftp the animation that I ran as part of the "Empowered" performance at CHI'90. It shows an animated spinning zoom around an extremely detailed pseudoscientific visualization of the class hierarchy in X11/NeWS. The uncompressed file is 44,910,000 bytes long: 499 300x300 8 bit frames. The compressed file that you should fetch is 9,312,254 bytes, and you have to uncompress it to view it since "uncompress < spin/zoom.raw | mapper - ..." doesn't work for some stupid reason. I hope you can get a good ftp connection and have lots of disk space. Just ftp to tumtum.cs.umd.edu (128.8.128.49), set binary mode, and get the files "NeWS/spin/zoom.raw.Z" and "NeWS/spin/startspin". Put them in a subdirectory called "spin" under where you started the X11/NeWS server, uncompress zoom.raw, compile "mapper" and put it into a directory on your path, then run "spin/startspin" from the directory where you ran NeWS. I think it should work. For extra cheap thrills: run the color wheel, and rotate part or all of the color table during the animation!!! Under SunOS 4.0.x, the "mapper" program has the annoying tendancy of paging everything else out by reading through the input file sequentialy (vadvise doesn't quite work). I have been told that under 4.1, vadvise() can be used to cure this behavior. (I might have to mmap the input file as well as the shared file, and vadvise sequential access on the input file's range of memory.) -Don From don Tue May 29 23:39:50 1990 Date: Tue, 29 May 90 23:39:50 -0400 To: NeWS-makers@brillig.umd.edu Subject: oops From: don (Don Hopkins) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Oops, I meant to say that "uncompress < spin/zoom.raw.Z | mapper - ..." doesn't work for some stupid reason. I tried putting dd between the two processes, but I still couldn't get it to work. Does "mapper" need to be taught to try harder, or is there some other way to make it work? -Don From don Wed May 30 04:14:29 1990 Date: Wed, 30 May 90 04:14:29 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: The essence of Atkinson's regions patent From: don (Don Hopkins) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) [This is an interesting NeWS-related article from comp.graphics. -Don] From: rjg@nosun.UUCP (Richard Greco) Subject: Re: The essence of Atkinson's regions patent Date: 24 May 90 23:32:36 GMT Organization: Intel Scientific Computers, Beaverton, Oregon In article <30128@cup.portal.com> mmm@cup.portal.com (Mark Robert Thorson) writes: >A couple years ago, I wrote a short article for the BMUG newsletter about >the significance of the Atkinson patent on regions, and the small set of >efficient operations you can do on regions. At the time, I said the patent >would allow Apple to prevent a Mac clone from appearing, irrespective >of any silly copyright claims about look and feel. Actually it is even easier then this. While Atkinson's patent covers one way of dealing with regions, there are several other methods of representing regions that do not violate the patent, yet are still compact and efficient enough to implement on small microprocessors. The most notable of these is the one James Gosling developed for NeWS using a set of (x,y) sorted rectangles to represent the region. Although James never published this, Nola Donato and Robert Rocchetti of Sun presented a rework of James' algorithms at Usenix in 1988. The ideas in this paper were reworked and included as part of the course notes for "Introduction to Window Management" which was presented at Siggraph 89 and will be presented again this year at Siggraph 90. The Siggraph 88 course notes for "Introduction to Window Management" contain a reprint of the Donato and Rocchetti paper. The Siggraph 89 course notes are the source referenced by the forthcoming second edition of Foley and Van Dam which uses this algorithm for regions in the raster sections of the book. From don Wed May 30 18:06:11 1990 Date: Wed, 30 May 90 18:06:11 -0400 To: NeWS-makers@brillig.umd.edu Subject: Books and Papers on NeWS From: zaphod.mps.ohio-state.edu!usc!cs.utexas.edu!helios!skdutta@tut.cis.ohio-state.edu (Saumen K Dutta) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) I am collecting books and papers published on NeWS which explains more about the programming in NeWS. If somebody knows of any such books, I would like to know the name of the book, author, cost and publication. It would be nice if you could also send the ISBN number and a few words about the content of the book. For papers please send the journal name, month and issue number. Please send me your replies by e-mail. I will summarize them later on the net. Thanks a ton -- _ ||Internet: skdutta@cssun.tamu.edu ( /_ _ / --/-/- _ ||Bitnet : skd8107@tamvenus.bitnet __)_/(_____(_/_(_/_(_(__(_/_______ ||Uucp : uunet!cssun.tamu.edu!skdutta .. ||Yellnet: (409) 846-8803 From don Fri Jun 1 05:07:13 1990 Date: Fri, 1 Jun 90 05:07:13 -0400 To: NeWS-makers@brillig.umd.edu Subject: Color Images with image From: David Burgess Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) I asked a question about using the image operator to produce color images instead of grey scale. In the meantime I browsed the Adobe documents server (ps-file-server@adobe.com) and found a document called Color Extensions (dated 23-jan-1990) describing some new PostScript operators including colorimage and setcolortransfer The first is analagous to image but uses RGB or CMYK input, and the latter is an expansion of settransfer to four color components. Color PostScript printers are going to become more common, so will these operators be in NeWS? David Burgess ===== Astronomy Unit, QMW, University of London +44 71 975 5460 From don Fri Jun 1 11:42:46 1990 Date: Fri, 1 Jun 90 11:42:46 -0400 To: NeWS-makers@brillig.umd.edu Subject: Uncompressing to stdout (was Re: oops) From: sun-barr!newstop!exodus!aiki.Eng.Sun.COM!kron@ames.arc.nasa.gov (Kenneth Kron) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) In article <9005300339.AA23506@brillig.UMD.EDU>, don@CS.UMD.EDU (Don Hopkins) writes: >Oops, I meant to say that "uncompress < spin/zoom.raw.Z | mapper - >..." doesn't work for some stupid reason. I tried putting dd between >the two processes, but I still couldn't get it to work. Does "mapper" >need to be taught to try harder, or is there some other way to make it >work? > > -Don You should be using zcat instead of uncompress. uncompress specifically wants to uncompress 1 file to another (it truncates the ".Z"). zcat on the other hand will uncompress a file to a pipe. Good luck -- Kenneth Kron (kron@eng.sun.com) ----- The opinions I gave were mine, the opinions you form are yours. From don Sat Jun 2 17:20:35 1990 Date: Sat, 2 Jun 90 17:20:35 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: Scaling From: wind!naughton@sun.com (Patrick Naughton) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) In article , Lazy@ifi.uio.no writes: |> |> Is it possible for a window (under NeWS 1.1) to have a |> non-evenly-spaced scale ? Something like a mercator |> map projection ? |> |> Have someone written such a scale-function ? Transformations in NeWS and PostScript are linear, thus this is impossible. |> |> Lasse Bjerde lazy@ifi.uio.no |> Department of Informatics |> University of Oslo, Norway ______________________________________________________________________ Patrick J. Naughton ARPA: naughton@sun.com Window Systems Group UUCP: ...!sun!naughton Sun Microsystems, Inc. AT&T: (415) 336 - 1080 From don Sat Jun 2 17:20:52 1990 Date: Sat, 2 Jun 90 17:20:52 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: Color Images with image From: wind.Eng.Sun.COM@sun.com (Patrick Naughton) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) In article <7083.9005310829@qmwms.maths.qmw.ac.uk>, dhb@maths.qmw.ac.uk (David Burgess) writes: |> I asked a question about using the image operator to produce color images |> instead of grey scale. |> |> In the meantime I browsed the Adobe documents server (ps-file-server@adobe.com) |> and found a document called Color Extensions (dated 23-jan-1990) describing |> some new PostScript operators including colorimage and setcolortransfer |> The first is analagous to image but uses RGB or CMYK input, and the latter |> is an expansion of settransfer to four color components. |> |> Color PostScript printers are going to become more common, so will these |> operators be in NeWS? |> David Burgess ===== Astronomy Unit, QMW, University of London +44 71 975 5460 These operators were described in colorops.mss dated 28 April 1988. These operators are not very useful in the window system context since they deal in 24 and 32 bits per pixel to define the image. Thus they will not be in Version 2 of OpenWindows, but may appear in later releases as TrueColor framebuffers become more common. ______________________________________________________________________ Patrick J. Naughton ARPA: naughton@sun.com Window Systems Group UUCP: ...!sun!naughton Sun Microsystems, Inc. AT&T: (415) 336 - 1080 From don Thu Jun 7 21:35:42 1990 Date: Thu, 7 Jun 90 21:35:42 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: Scaling From: mcsun!ukc!slxsys!dircon!uad1077@uunet.uu.net Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Actually, you can do it, depending on your PostScript interpreter. If you have a procedure like x1 y1 xfm => x2 y2 (which is the case for most useful non-linear transformations) then you can just shovel everything through `pathforall'. (well, everything except text, that is!) On my laser printer, pathforall just appends any new points I add to the path to the one I'm trying to distort, so it goes very quiet, and then after a few minutes I get a limitcheck... On my window manager, pathforall goes through the same code that `stroke' does though, so it actually produces a finite path, and has the desired effect. I think it's a case of taking pot luck (and your courage in both hands) if you want to try it on NeWS... Interesting question: basically this is the 2D ananlogue of the way that Renderman achieves non-linear transformations. DO I treat the departure of my PostScript from true POstScript which allows this to happen as a bug or an enhancement? :-) "Computer oxymorons #1: operating system" -- Ian D. Kemmish Tel. +44 767 601 361 18 Durham Close uad1077@dircon.UUCP Biggleswade ukc!dircon!uad1077 Beds SG18 8HZ United Kingdom From don Thu Jun 7 21:35:51 1990 Date: Thu, 7 Jun 90 21:35:51 -0400 To: NeWS-makers@brillig.umd.edu Subject: Looking to add some graphics characters to a standard font From: philmtl!philabs!ppgbms!cable@uunet.uu.net (Cable Pyen) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Greetings! We have a slight problem inserting (adding?) a user defined font into an existing font set under OpenWin Version 2. We would like to extend an existing font with some primitive graphical charaters: four corners, a horizontal line and a vertical line. There are quite a few ostensible examples in the blue book that show how one might go about creating, re-encoding, and changing existing fonts. Thus no problem in PostScript, however, when we try to merge(?) two font sets into one, we are stuck because there seems to be no way of getting beneath the '/BuildChar' procedure, where we felt that we can retrieve the name of the array that holds the path construction procedures. The following lines run in 'psh' might help me to clarify my predicatment: /You_Name_The_Font findfont % puts it on the statck /BuildChar get == As you can see, /BuildChar is not a procedure according to the NeWS server, but rather a label for a fonttype. Why? Is it by design that we are deprived of knowing what the NeWS font machinary really is ? Or are we barking up the wrong tree? It would be most helpful if someone can tell us that 'there is no need for merging two fonts because there, already is one and it's called XXXXX font' or 'we had a same problem but we solved it by doing XXXXX'. What we don't want to do is font switching, for performance reasons. Other than that, any suggestions are appreciated. Thanks a gig! _____________________________________________________________ |Regards, One Campus Drive | |Cable Pyen PPG Biomedical Systems | |914-741-4626 Pleasantville, NY. 10570| ------------------------------------------------------------- path ppgbms!moe!cable@philabs.philips.com From don Thu Jun 7 21:36:37 1990 Date: Thu, 7 Jun 90 21:36:37 -0400 To: NeWS-makers@brillig.umd.edu Subject: Looking to add some graphics characters to a standard font From: philmtl!philabs!ppgbms!cable@uunet.uu.net (Cable Pyen) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Greetings! We have a slight problem inserting (adding?) a user defined font into an existing font set under OpenWin Version 2. We would like to extend an existing font with some primitive graphical charaters: four corners, a horizontal line and a vertical line. There are quite a few ostensible examples in the blue book that show how one might go about creating, re-encoding, and changing existing fonts. Thus no problem in PostScript, however, when we try to merge(?) two font sets into one, we are stuck because there seems to be no way of getting beneath the '/BuildChar' procedure, where we felt that we can retrieve the name of the array that holds the path construction procedures. The following lines run in 'psh' might help me to clarify my predicatment: /You_Name_The_Font findfont % puts it on the statck /BuildChar get == As you can see, /BuildChar is not a procedure according to the NeWS server, but rather a label for a fonttype. Why? Is it by design that we are deprived of knowing what the NeWS font machinary really is ? Or are we barking up the wrong tree? It would be most helpful if someone can tell us that 'there is no need for merging two fonts because there, already is one and it's called XXXXX font' or 'we had a same problem but we solved it by doing XXXXX'. What we don't want to do is font switching, for performance reasons. Other than that, any suggestions are appreciated. Thanks a gig! _____________________________________________________________ |Regards, One Campus Drive | |Cable Pyen PPG Biomedical Systems | |914-741-4626 Pleasantville, NY. 10570| ------------------------------------------------------------- path ppgbms!moe!cable@philabs.philips.com From don Thu Jun 7 21:36:58 1990 Date: Thu, 7 Jun 90 21:36:58 -0400 To: NeWS-makers@brillig.umd.edu Subject: Frame Technology Wants You! From: frame!safari!sit (Sheila Tabuena) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Frame Technology is a small (130+) privately held startup company located in San Jose, California. We are seeking software development staff for an OPEN LOOK version of our best-selling workstation publishing software, FrameMaker. We are looking for good engineers with OPEN LOOK and NeWS experience. User interface experience or previous exposure to FrameMaker or publishing background highly desirable. Experience with or exposure to X, XView, SunView, desktop publishing or other publishing products is desirable. We need someone who is already in the area, or willing to relocate. If you are potentially interested in a position at Frame Technology, please email a postscript verion of your resume, or otherwise contact: Sheila Tabuena sit@frame.com 1010 Rincon Circle San Jose, CA 95131 (408) 922-2722 From don Thu Jun 7 21:38:04 1990 Date: Thu, 7 Jun 90 21:38:04 -0400 To: NeWS-makers@brillig.umd.edu Subject: A beginner's problem ! From: zaphod.mps.ohio-state.edu!usc!cs.utexas.edu!helios!cs.tamu.edu@tut.cis.ohio-state.edu (Saumen K Dutta) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) I have just started learning NeWS. I have the NeWS manual with me but this did not help me to solve the following problem. I tried to simplify the example program "lines" from the sources supplied with the openlook package in order to understand the operation. Here is the program /LinesCanvas ClassCanvas [] classbegin /LineCount 20 def /setvalue{ /LineCount exch def } def /LineDraw { 0 2 LineCount div 1 { 0 0 moveto 1 1 index lineto stroke 0 0 moveto 1 lineto stroke } for } def /PaintCanvas{ FillColor /FillCanvas self send clippath emptypath not { pathbbox scale translate StrokeColor setcolor /LineDraw self send } if } def /win [LinesCanvas] [/Footer false] framebuffer /newdefault ClassBaseFrame send def [LinesCanvas] /seticon win send (Lines Demo) /setlabel win send null /seticonlabel win send /place win send /activate win send /map win send This draws the default window on the screen with 20 lines. Now if I want change the number of lines from 20 to 5 I need to send a message to the LinesCanvas to do this. I tried it as 5 /setvalue LinesCanvas send Now I try to refresh the window by {/paint self send} win send this refreshes the window all right but suppose I only want to refresh the canvas and want to do it smoothly what do I do? I tried to do it as /paintclient LinesCanvas send but it gives error. I tried so many other things (of course by not understanding the full process very clearly!) but was not able to do it. I don't want the full window to blink in order to refresh but only the canvas. Can somebody enlighten me. I think that the NeWS manual is not very informative as far as the details of the NeWS class instances and methods are concerned (At least not for the beginner!). Can somebody tell me if a better text is available for this. Note:- The above comments reflect my views Thanks for the time and patience for this novice -- _ ||Internet: skdutta@cssun.tamu.edu ( /_ _ / --/-/- _ ||Bitnet : skd8107@tamvenus.bitnet __)_/(_____(_/_(_/_(_(__(_/_______ ||Uucp : uunet!cssun.tamu.edu!skdutta .. ||Yellnet: (409) 846-8803 From don Thu Jun 7 21:38:11 1990 Date: Thu, 7 Jun 90 21:38:11 -0400 To: NeWS-makers@brillig.umd.edu Subject: building cursors From: mcsun!ukc!canon!smith@uunet.uu.net (Mark Smith) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) I know that someone just posted something on this subject, but naturally I can't find it now. Does anyone have an example of a custom cursor under Open Windows? I'm getting nowhere. ==================================================================== Mark Smith Canon Research Centre Europe smith@canon.co.uk 19 Frederick Sanger Road ..ukc!uos-ee!canon!smith Guildford Surrey UK -------------------------------------------------------------------- "We always planned to ease ourselves into pure research anyway..." -- David Cronenberg, _Dead Ringers_ From don Mon Jun 18 03:56:53 1990 Date: Mon, 18 Jun 90 03:56:53 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: A beginner's problem ! From: hbo!bice (Brent A. Bice) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) > I don't want the full window to blink in order to refresh but only the > canvas. Well, instead of /paint self send, try /paintclient self send. Remember that /paint tells the window to paint itself (all of the window), but /paintclient tells it to paint only the ClientCanvas. Also, I noticed that you did "{/paint self send} win send" This really is the same as "/paint win send"... From don Mon Jun 18 03:58:39 1990 Date: Mon, 18 Jun 90 03:58:39 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: Eyes (was Just some sortof anecdotes) From: sgi!shinobu!odin!ramoth.esd.sgi.com!msc@ucbvax.Berkeley.EDU (Mark Callow) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Lara here at SGI drew the following article to my attention. In article <3772@trantor.harris-atd.com>, chuck@melmac.harris-atd.com (Chuck Musciano) writes: |> Regarding items 3 and 4: "those darn neat eyes" first appeared running |> under SunView, and were later ported to X. I should know; I wrote the |> original "eyecon" program in August of 1988 and released it to the net. |> Subsequent versions appeared for X and NeWS later. The xeyes demo released |> with X is dated July, 1989, a year after my version. However, is there even |> a mention of my name in the code? At least I was proper enough to credit |> Mark Callow, of Silicon Graphics, in my version. I first saw a version of |> the eyes program running on an SGI machine under NeWS at SIGGRAPH '88 in |> Atlanta. Mark produced that version, to the best of my knowledge. I was so |> taken by it I wrote a version for suntools as soon as I got home. |> |> I was a little disappointed to see the X version appear without |> proper credit, both to myself and Mark. |> While I would love to take credit for creating the eyes, I can't. The NeWS eyes (which were the first) were created by Jeremy Huxtable from England. Here is the program header. #! /usr/NeWS/bin/psh % eye.ps % % Jeremy Huxtable % % "Big Brother" implementation in PostScript. Jeremy posted the eyes to comp.windows.news in late July 1988 about a week before the Atlanta Siggraph. I started eye.ps not knowing what it would do and then I couldn't stop laughing for about 5 minutes. They were so much fun I decided to use them during my talk at Siggraph. I sent email to Chuck a couple of years ago telling him this. It must have fallen into a hole somewhere. The version I use now was modified by Mike Russell from Pixar to stop the flashing. I don't subscribe to rec.humor so please email any replies to me. -- From the TARDIS of Mark Callow msc@ramoth.sgi.com, ...{ames,decwrl}!sgi!msc "There is much virtue in a window. It is to a human being as a frame is to a painting, as a proscenium to a play. It strongly defines its content." From don Mon Jun 18 03:59:36 1990 Date: Mon, 18 Jun 90 03:59:36 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: building cursors From: voder!wlbr!awds26!mh@ucbvax.Berkeley.EDU (Mike Hoegeman) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) In article <1990Jun7.131252.11001@canon.co.uk> smith@canon.co.uk (Mark Smith) writes: >I know that someone just posted something on this subject, but >naturally I can't find it now. Does anyone have an example of >a custom cursor under Open Windows? I'm getting nowhere. check out the backgammon game for news, it uses a custom cursor i believe. From don Mon Jun 18 04:00:49 1990 Date: Mon, 18 Jun 90 04:00:49 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: Eyes (was Just some sortof anecdotes) From: snorkelwacker!mintaka!xenon.lcs.mit.edu!keith@tut.cis.ohio-state.edu (Keith Packard) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) In article <8743@odin.corp.sgi.com> msc@sgi.com writes: >Lara here at SGI drew the following article to my attention. > >In article <3772@trantor.harris-atd.com>, chuck@melmac.harris-atd.com >(Chuck Musciano) writes: >|> Regarding items 3 and 4: "those darn neat eyes" first appeared running >|> under SunView, and were later ported to X. I should know; I wrote the >|> original "eyecon" program in August of 1988 and released it to the net. >|> Subsequent versions appeared for X and NeWS later. The xeyes demo released >|> with X is dated July, 1989, a year after my version. However, is there even >|> a mention of my name in the code? At least I was proper enough to credit >|> Mark Callow, of Silicon Graphics, in my version. I first saw a version of >|> the eyes program running on an SGI machine under NeWS at SIGGRAPH '88 in >|> Atlanta. Mark produced that version, to the best of my knowledge. I was so >|> taken by it I wrote a version for suntools as soon as I got home. >|> >|> I was a little disappointed to see the X version appear without >|> proper credit, both to myself and Mark. >|> > >While I would love to take credit for creating the eyes, I can't. The NeWS >eyes (which were the first) were created by Jeremy Huxtable from England. >Here is the program header. As the author of xeyes, I'd certainly like to apologize to all of the original authors whose estimable work was followed by my own meager implementation. I saw the eyes at the '88 SIGGRAPH in Atlanta during the talk cited above and raced home to write the X version. As no citation was given during the talk (although it was arguably one of the most entertainly portions), I had no idea who to credit. Even though the Sunview version may have appeared in public before the R3 version, xeyes had been running within MIT since a few days after SIGGRAPH '88. Actually, the original copyright on xeyes is from 1988. The xeyes sources included with R3 had an attribution which attempted to identify as closely as possible the original source: "This directory is new to R3. It is a fun little toy that was stolen from a demo at SIGGRAPH '88." Now that we know the true author, I'll certainly add a reference in the manual. Always important to document the history of these leaps in user interface technology to preserve them for posterity. Keith Packard MIT X Consortium From don Mon Jun 18 04:01:19 1990 Date: Mon, 18 Jun 90 04:01:19 -0400 To: NeWS-makers@brillig.umd.edu Subject: A definitive NeWS reference? From: alps!image!p2.f250.n107.z1.FIDONET.ORG!Edward.Currie@sbcs.sunysb.edu (Edward Currie) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) To: rlh2@ukc.ac.uk (Richard Hesketh) > I need a definitive reference(s) for NeWS (i.e. > something that defines what > NeWS it and how it was created etc.) How about "The NeWS Book" by Gosling, Rosenthal and Arden. Published by the Sun Technical Reference Library ... ISBN 0-387-96915-2 ISBN 3-540-96915-2 --- FD 1.99c * Origin: ImageSoft BBS .2 (1:107/250.2) -- Edward Currie - via FidoNet node 1:107/250 UUCP: alps!image!250.2!Edward.Currie From don Mon Jun 18 04:02:06 1990 Date: Mon, 18 Jun 90 04:02:06 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: Any NeWs implementations for MSDOS? From: alps!image!p2.f250.n107.z1.FIDONET.ORG!Edward.Currie@sbcs.sunysb.edu (Edward Currie) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) To: doc@sangria.UUCP (Tom Dockery) Hi Tom ... Haven't talked to you in a long time. Thanks for sending the docs for the Toshiba ... we finally have everything including the ether net card for the machine which just came ... expect to have something interesting for you to play with before long. Regards to Tom Scrivner ... eddie currie --- FD 1.99c * Origin: ImageSoft BBS .2 (1:107/250.2) -- Edward Currie - via FidoNet node 1:107/250 UUCP: alps!image!250.2!Edward.Currie From don Mon Jun 18 04:06:08 1990 Date: Mon, 18 Jun 90 04:06:08 -0400 To: NeWS-makers@brillig.umd.edu Subject: NeWS on Amiga 3000 [Done? Being done?] From: alps!image!p2.f250.n107.z1.FIDONET.ORG!Edward.Currie@sbcs.sunysb.edu (Edward Currie) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) To: "Michael_Powers.Roch817"@XEROX.COM > Organization: The Internet > Message-ID: <900516-125110-10034@Xerox> > Newsgroups: comp.windows.news > > If you are interested let me know (especially > if you know someone or > somefirm willing to invest in such a development > endeaver). Suggest that you contact me at ImageSoft ... we are very involved with a number of NeWS-related activities .. 516-767-2233 --- FD 1.99c * Origin: ImageSoft BBS .2 (1:107/250.2) -- Edward Currie - via FidoNet node 1:107/250 UUCP: alps!image!250.2!Edward.Currie From don Mon Jun 18 11:02:50 1990 Date: Mon, 18 Jun 90 11:02:50 -0400 To: NeWS-makers@brillig.umd.edu Subject: How to obtain the window hierarchy From: software.org!marshall@uunet.uu.net (Eric Marshall) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) How can you obtain information concerning the window hierarchy, e.g. all of the created windows, their parents, their size and location, etc? Thanks in advance. Eric Marshall Software Productivity Consortium SPC Building 2214 Rock Hill Road Herndon, VA 22070 (703) 742-7153 UUCP: ...!uunet!software!marshall ARPANET: marshall%software.org@relay.cs.net From don Mon Jun 18 11:03:14 1990 Date: Mon, 18 Jun 90 11:03:14 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: How to obtain the window hierarchy From: usc!elroy.jpl.nasa.gov!mahendo!wlbr!awds26!mh@ucsd.edu (Mike Hoegeman) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) > > How can you obtain information concerning the window >hierarchy, e.g. all of the created windows, their parents, their >size and location, etc? > > Thanks in advance. canvases have in them attributes such as TopChild CanvasAbove CanvasBelow etc... see NeWS ref. man. for descriptions. You could first start by sending a message to all the windows (see the All Windows menu code for the root menu) from this list you can figure out who is above who etc... using the keys i mentioned above for each windows FrameCanvas. -mike From don Mon Jun 18 23:35:50 1990 Date: Mon, 18 Jun 90 23:35:50 -0400 To: NeWS-makers@brillig.umd.edu Subject: Using NeWS and X11 from the same application ? From: socrates.ucsf.edu!kneller@cgl.ucsf.edu (Don Kneller) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Basically, is it possible to have an application running both X and NeWS at the same time? What I mean is can I, say, use X dialog boxes for input and use NeWS canvases for output? I have a preference for the NeWS imaging model, but the new DevGuide (which looks pretty slick) would be more than incredibly handy for writing dialogs -- however, it produces X code. How does an application handle events from both servers? How is the graphics end handled? - don ----- Don Kneller UUCP: ...ucbvax!ucsfcgl!kneller INTERNET: kneller@cgl.ucsf.edu BITNET: kneller@ucsfcgl.BITNET From don Mon Jun 18 23:36:07 1990 Date: Mon, 18 Jun 90 23:36:07 -0400 To: NeWS-makers@brillig.umd.edu Subject: How to locate the position of a canvas From: software.org!marshall@uunet.uu.net (Eric Marshall) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Given a canvas object, how can I determine where on the screen the canvas is located? Thanks in advance. Eric Marshall Software Productivity Consortium SPC Building 2214 Rock Hill Road Herndon, VA 22070 (703) 742-7153 UUCP: ...!uunet!software!marshall ARPANET: marshall%software.org@relay.cs.net From don Mon Jun 18 23:36:18 1990 Date: Mon, 18 Jun 90 23:36:18 -0400 To: NeWS-makers@brillig.umd.edu Subject: Wanted: Terrain display program From: gmt@arizona.edu (Gregg Townsend) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) I have some digital terrain data (a regular grid of elevation measurements) that I'd like to display in perspective under X-windows or NeWS on a Sun, or in any manner on an SGI Personal Iris. Can anyone offer a pointer to such a program? Something to display a function of two variables would also do the job. Gregg Townsend / Computer Science Dept / Univ of Arizona / Tucson, AZ 85721 +1 602 621 4325 gmt@cs.arizona.edu 110 57 16 W / 32 13 45 N / +758m From don Mon Jun 18 23:37:12 1990 Date: Mon, 18 Jun 90 23:37:12 -0400 To: NeWS-makers@brillig.umd.edu Subject: buildimage From: hbo!bice (Brent A. Bice) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) This may be a stupid question, but did buildimage get broken between 1.1 and 2.0? After talking to the fella from SGI and bein' told that I shouldn't rely on canvases being able to be "Retained", I decided to take the time to change my double-buffering code so that it uses buildimage instead of reshaping Retained Unmapped canvases. This way, my code works on the SGI too which is kinda nice (even though rendering images on the SGI 'pears to be way slow!). And using buildimage works on the SUNs in NeWS 1.1... But under 2.0 I get strange behavior. Here is an example: %--------------------------------------------------------------------- /win framebuffer /new LiteWindow send def {/PaintClient{0 0 1 rgbcolor fillcanvas} def} win send /reshapefromuser win send /map win send .05 sleep % pause fer a bit /CW {/ClientWidth win send} def /CH {/ClientHeight win send} def /can {/ClientCanvas win send} def gsave can setcanvas % I wanna get the transformation matrix from my window 0 1 0 rgbcolor fillcanvas CW CH 8 matrix currentmatrix null buildimage /tempcan exch def grestore gsave % now draw on our temporary canvas tempcan setcanvas erasepage 1 0 0 setrgbcolor 0 0 moveto CW CH lineto stroke % after drawing on the temporary canvas, try rendering it to the window can setcanvas CW CH scale tempcan imagecanvas grestore %------------------------------------------------------------------------ This code makes a window, fills it with blue, sleeps fer a few seconds, then fills it with green (ta show that it really is getting to my code to do the buildimage, and is waiting for the window to be mapped first). Then it does a buildimage to make a canvas with the exact same dimensions and transformation matrix as the ClientCanvas has. Then, I set the current canvas to my new canvas, paint on it (just a red line on a white field). Finally, I try to render this canvas on the ClientCanvas. Under 1.1, and on the SGI, this works just fine, but under NeWS 2.0 this has 2 sets of behavior I've seen. If I make the window small, the window will paint blue, flash to green, and then to white as if the canvas built with buildimage is ok, but there is no red line. If I make the window rather large, it merely goes from blue to green, and the imagecanvas 'pears to have no effect at all... Weird... Am I missing something??? Brent Bice Applied Computing Systems 2075 Trinity Drive Suite Lower Level Los Alamos, NM 87544 (505) 662-3309 bice@atlantis.ees.anl.gov % I program, therefore I am. From don Mon Jun 18 23:37:26 1990 Date: Mon, 18 Jun 90 23:37:26 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: How to obtain the window hierarchy From: eru!luth!sunic!mcsun!hp4nl!ecn!wim@bloom-beacon.mit.edu (Wim Rijnsburger) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) In article <54110@wlbr.IMSD.CONTEL.COM> mh@awds26.UUCP (Mike Hoegeman) writes: >> >> How can you obtain information concerning the window >>hierarchy, e.g. all of the created windows, their parents, their >>size and location, etc? ... > canvases have in them attributes such as TopChild CanvasAbove > CanvasBelow etc... see NeWS ref. man. for descriptions. NeWS version 2.0, which we have in beta here, supports this with: - canvasesunderpath - canvasesunderpoint Wim. ---------- Netherlands Energy Research Foundation, ECN -------------- Wim Rijnsburger email: RIJNSBURGER@ECN.NL P.O. Box 1, 1755 ZG Petten, Holland phone: +31 2246 4673 From don Mon Jun 25 21:49:03 1990 Date: Mon, 25 Jun 90 21:49:03 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: Using NeWS and X11 from the same application ? From: prosper@sun.com (Vladimir G. Ivanovic) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) In article <14346@cgl.ucsf.EDU>, kneller@socrates (Don Kneller) writes: >Basically, is it possible to have an application running both X and >NeWS at the same time? > Yes. >How does an application handle events from both servers? There is only one server, the X11/NeWS server. It understands both the X11 protocol and the NeWS protocol. -- Vladimir -- Vladimir G. Ivanovic vladimir@sun.com M/S 12-33 vladimir@prosper.ebb.eng.sun.com Sun Microsystems, Inc. vivanovic@sun.com From don Mon Jun 25 21:49:19 1990 Date: Mon, 25 Jun 90 21:49:19 -0400 To: NeWS-makers@brillig.umd.edu Subject: The NeWS Book From: cs.utexas.edu!helios!cs.tamu.edu@tut.cis.ohio-state.edu (Saumen K Dutta) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) We have just purchased "The NeWS Book" by Gosling et.al. Published by Springer-Verlag in 1989. Now somebody tells me that the 1990 edition of the book is out and published by Printice Hall Inc. I could very easily confirm this by talking to the publisher, but what I want to know is how different are they. Are there considerable additions in the later version ( I am still not sure it exists !) of this book which should justify our purchase? If anybody knows about this book please drop me an e-mail. Thanks -- _ ||Internet: skdutta@cssun.tamu.edu ( /_ _ / --/-/- _ ||Bitnet : skd8107@tamvenus.bitnet __)_/(_____(_/_(_/_(_(__(_/_______ ||Uucp : uunet!cssun.tamu.edu!skdutta .. ||Yellnet: (409) 846-8803 From don Mon Jun 25 21:49:33 1990 Date: Mon, 25 Jun 90 21:49:33 -0400 To: NeWS-makers@brillig.umd.edu Subject: How to locate the position of a canvas From: software.org!marshall@uunet.uu.net (Eric Marshall) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Given a canvas object, how can I determine where on the screen the canvas is located? Thanks in advance. Eric Marshall Software Productivity Consortium SPC Building 2214 Rock Hill Road Herndon, VA 22070 (703) 742-7153 UUCP: ...!uunet!software!marshall ARPANET: marshall%software.org@relay.cs.net From don Mon Jun 25 21:50:54 1990 Date: Mon, 25 Jun 90 21:50:54 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: How to locate the position of a canvas From: hbo!bice (Brent A. Bice) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Well, we can find the width and height of a canvas (in it's own coord. space) by making it the current canvas, setting the path to the current clipping path, and doing a pathbbox. ie. framebuffer setcanvas clippath pathbbox 4 2 roll pop pop % we generally toss x and y I s'pose that you could keep the x and y coords, and transform them to whatever coord space you wanted the x and y of the canvas to be relative to (although I haven't actually done this myself...) Hope this helps... From don Mon Jun 25 21:51:31 1990 Date: Mon, 25 Jun 90 21:51:31 -0400 To: NeWS-makers@brillig.umd.edu Subject: Problem in OW 1.0 start up From: David Burgess Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) I have been using OW 1.0 regularly for months. Then, for various reasons, I build a new kernel. This is ok, but then I try to start up xnews ... For the first time ever I get the following error: Process: 0x1b8a34 (Unnamed process) Error: undefined Stack: (NeWS/NDE/colors.ps) marker /ColorCanvas /ClassCanvas vm('Shared VM') true false (NeWS/NDE/canvas.ps) marker /ClassSharedInterest Executing: ClassInterest At: Reading file ('NeWS/NDE/canvas.ps',R) Sic transit gloria PostScript (And it's at times like these that cute error messages are really annoying.) Going back to the old kernel (GENERIC) _didn't_ stop the problem, neither did reinstalling OW. BUT then I discovered that if I was logged in as root I could start up OW just fine! (although it appears depend on what is current directory(?)) I recall that there were some comments in this list about the way that at startup processes are forked which have definition interdependencies. But I can't find them. Has any one got any suggestions? (So far I have been a satisfied OpenWindows user.) David Burgess ===== Astronomy Unit, QMW, University of London +44 71 975 5460 (JANET: dhb@uk.ac.qmw.maths NFSNET: dhb%maths.qmw.uk.ac@nfsnet-relay.ac.uk) (SPAN: RLESIS::VMSFE::DHB (RLESIS=19527 if not known) ) From don Mon Jun 25 21:51:41 1990 Date: Mon, 25 Jun 90 21:51:41 -0400 To: NeWS-makers@brillig.umd.edu Subject: Color Images From: alexis@CS.UCLA.EDU (Alexis Wieland) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Apologies for such a simple question, but I've been going around and around on this. I need to build a color canvas from some synthetic data. I used to use "buildimage" with 24 bits/pixel, but our newer version of NeWS doesn't seem to support 24 bits/pixel. This can't be so difficult ... it's too basic. Thanks in advance, Alexis Wieland alexis@cs.ucla.edu From don Mon Jun 25 21:51:54 1990 Date: Mon, 25 Jun 90 21:51:54 -0400 To: NeWS-makers@brillig.umd.edu Subject: Configuring Open Windows From: bert!dolphin!ctim@aaet.csc.ti.com (Craig Timmerman) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) I am preparing to give a demo/talk on Open Windows next week and would like to configure some of the Open Windows applications so they are more readable from a distance. I would like to be able to change the fonts used by pswm, filemgr, mailtool, and maybe others (I want to make the titles, menus, and buttons use a larger font). I would also like to make the border/resize handles used by pswm larger too. None of the documentation for Open Windows 1.0.1 seem to cover this area, can anyone give me some pointers? (Actually a complete list of all the settable resources would be great!) I would also like to make the same font and border changes to olwm. I have found the right resources to set for the fonts (TitleBarFont, IconFont, MenuTitleFont, MenubuttonFont) but changing the font values to a larger font reveals many bugs (title bar does not resize, menu highlight bar does not resize). Are there fixes/workarounds to these bugs in olwm? Is there a resource to make the border/resize handles larger in olwm? I am using Open Windows 1.0.1, and the olwm from the demo directory. Thanks in advance, ---------------------------------------------------------------------- Craig Timmerman ctim@aaet.csc.ti.com Texas Instruments Austin, TX ---------------------------------------------------------------------- From don Mon Jun 25 21:52:10 1990 Date: Mon, 25 Jun 90 21:52:10 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: The NeWS Book From: jag@sun.com (James Gosling) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Contrary to rumour, there is no "1990 edition of the NeWS book" coming from Prentice Hall. A new edition (it's almost a new book) is being worked on, but it will be coming from Springer, and we have no idea when it will be ready. (certainly not real soon; for the most part we're feverishly working on products) From don Mon Jun 25 21:52:30 1990 Date: Mon, 25 Jun 90 21:52:30 -0400 To: NeWS-makers@brillig.umd.edu Subject: ScrollableView From: mcsun!ukc!canon!rjf@uunet.uu.net (Robin Faichney) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) In OW 1.0, ScrollableView is mentioned in OPENWINHOME/etc/NeWS/NDE/bag.ps as an example of the use of ClassContainer. Going by the name, this seems ideal for what I'm trying to do just now (essentially, scrolling a bag), but I cannot find any other reference to it. OpenLookPane, for this purpose, is just that! Does ScrollableView appear in OW 2.0 -- or is there another way of doing it? -- Robin Faichney, Canon Research Centre Europe Ltd, NRS: rjf@uk.co.canon 17-20 Frederick Sanger Road, ARPA: rjf@canon.co.uk Surrey Research Park, Guildford. GU2 5YD UUCP: rjf@canon.uucp Tel (+44)||(0) 483 574325 Fax (+44)||(0) 483 574360 From don Mon Jun 25 21:52:59 1990 Date: Mon, 25 Jun 90 21:52:59 -0400 To: NeWS-makers@brillig.umd.edu Subject: Colors and NeWS From: fk03+@andrew.cmu.edu (Frank Eugene Kietzke) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) I love my boss. I just manage to get the R4 color map installed for X11 in my sparc station and my boss tells me to switch to NeWS. Fine, it is a nice server, but the color map is derived from R2. This looks REAL bad on my monitor. Has anybody succeded in upgrading the color map to R4 RGB values and names. I tried to translate my rgb.txt into a colors.ps file, but it came out 1220 entries and from the color behavior, I think that I overran storage somewhere since the server still complains that it doesn't know about some of the named colors and others come out REALLY weird. Is there another file that I should be twiddling or am I just stuck with the R2 colors? ------------------------------------------------------------------------- |Frank Kietzke | That was the "stun" setting, this is not.| |Carnegie-Mellon University | Lt. Commander Data, | |Data Communications | STNG, The Ensigns of Command. | ------------------------------------------------------------------------- | I can hardly speak for myself, let alone for CMU Data Communications | ------------------------------------------------------------------------- From don Mon Jun 25 21:53:52 1990 Date: Mon, 25 Jun 90 21:53:52 -0400 To: NeWS-makers@brillig.umd.edu Subject: Display lock broken From: cs.utexas.edu!news-server.csri.toronto.edu!torsqnt!jtsv16!kevin@tut.cis.ohio-state.edu (kevin) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) I am plagued by messages, usually when loading large files into the server: Jun 22 14:46:56 apricot Window display lock broken after time limit exceeded by pid 1213 Jun 22 14:46:56 apricot You may see display garbage because of this action The only garbage I ever see is the message itself, on my console. Is there a way to disable this feature? -- Kevin Brighton kevin@jtsv16.jts.com JTS Computer Systems Ltd. { torsqnt | suncan | geac | uunet }!jtsv16!kevin Toronto, Ontario, CANADA +1 416 665 8910 From don Mon Jun 25 22:01:39 1990 Date: Mon, 25 Jun 90 22:01:39 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: How to obtain the window hierarchy From: mcsun!ukc!axion!ist!jh@uunet.uu.net (Jeremy Huxtable) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) From article <1300@software.software.org>, by marshall@software.org (Eric Marshall): > > How can you obtain information concerning the window > hierarchy, e.g. all of the created windows, their parents, their > size and location, etc? For those without NeWS2.0 etc, here is a piece of code which walks the window hierarchy. It is a useful script that unmaps those 'dead' windows so that they don't clutter up your screen. Simply replace the business end with your own code. %! % zapcanvas.ps % % by: Jeremy Huxtable jh@uk.co.ist % % This program will remove all those irritating 'dead' windows and canvases % from your screen. When run, it will let you choose a point on the screen % and will then walk the canvas tree, zapping all (mapped) canvases which enclose that % point. The canvases will be unmapped, made non-retained, and all their % interests revoked. This will at least hide them from your gaze, and may % even make them go away altogether, though I wouldn't count on it. What is % really needed is to trawl through the whole NeWS data structures trying to % find the reference which is keeping the canvases there. This is not trivial. % Before running: % Make sure that your windows are out of the way as there is no unzapping % a window. % The canvas tree walking routine is useful for all sorts of things such as % popping up an object browser on a window and for investigating all those % unmapped canvases which lurk behind your screen. /zapcanvas { % x y canvas => dup /Mapped get { dup getcanvaslocation 2 index setcanvas clippath pathbbox 4 2 roll pop pop framebuffer setcanvas % If the point is in this canvas, and the canvas is a) not the % framebuffer, and b) mapped, zap it. The most we can do is % to unmap the canvas, stop it being retained, and remove its % interests. rectpath 3 copy pop pointinpath { dup framebuffer ne 1 index /Mapped get and { dup /Mapped false put dup /Retained false put dup /Interests get { revokeinterest } forall } if } if /TopChild get % get first child { dup null eq { exit } if % exit loop if no more 3 copy zapcanvas % recurse for this child /CanvasBelow get % get next child } loop } if pop pop pop } def fboverlay setcanvas getclick framebuffer setcanvas framebuffer zapcanvas From don Mon Jun 25 22:01:42 1990 Date: Mon, 25 Jun 90 22:01:42 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: Display lock broken From: usc!cs.utexas.edu!helios!cs.tamu.edu@apple.com (Saumen K Dutta) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) >I am plagued by messages, usually when loading large files into the >server: > >Jun 22 14:46:56 apricot Window display lock broken after time limit exceeded >by pid 1213 >Jun 22 14:46:56 apricot You may see display garbage because of this action > > >The only garbage I ever see is the message itself, on my console. > >Is there a way to disable this feature? Sometime back this problem had been addressed in this group. I don't remember who answered it but it was like: %psh executive Wlecome to X11/NeWS ........ statusdict begin jobtimeout == 15 60 jobtimeout jobtimeout == 60 quit psh: NeWS server disconnected -- _ ||Internet: skdutta@cssun.tamu.edu ( /_ _ / --/-/- _ ||Bitnet : skd8107@tamvenus.bitnet __)_/(_____(_/_(_/_(_(__(_/_______ ||Uucp : uunet!cssun.tamu.edu!skdutta .. ||Yellnet: (409) 846-8803 From don Mon Jun 25 22:19:54 1990 Date: Mon, 25 Jun 90 22:19:54 -0400 To: NeWS-makers@brillig.umd.edu Subject: SOME NeWS QUESTIONS ( Ignore if u r 2 busy) From: usc!cs.utexas.edu!helios!cs.tamu.edu@apple.com (Saumen K Dutta) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Pardon me if I am missing something obvious. I have started with NeWS developing application using windows, canvases, processes ..... I have few questions from some of the NeWSXperts who regularly write (/don't write) to this group. I am using openwindows 1.0 1. Is there any tool available using which I can browse the classes objects, and associated methods I create in NeWS. 2. Is there any tool available presently which can convert SunView application directly to the NeWS code. 3. I have created several independent windows and canvases writing separate NeWS programs using DefaultWindow as the parent class. Now, I want to combine all of them into one window using multiple canvases. I can do this by changing /PaintClient, /CreateClientCanvas etc. and combining them into one. What I want to know is that is it possible to keep these classes as separate and yet combining the canvases into one window. Do you have any idea! 4. Lastly, where can I get the documentation for the NeWS internal class descriptions e.g. ClassCanvas, SliderItem etc. Sorry for asking too many questions Thanks for your time -- _ ||Internet: skdutta@cssun.tamu.edu ( /_ _ / --/-/- _ ||Bitnet : skd8107@tamvenus.bitnet __)_/(_____(_/_(_/_(_(__(_/_______ ||Uucp : uunet!cssun.tamu.edu!skdutta .. ||Yellnet: (409) 846-8803 From don Mon Jun 25 22:20:08 1990 Date: Mon, 25 Jun 90 22:20:08 -0400 To: NeWS-makers@brillig.umd.edu Subject: buildimage/imagecanvas/OpenLook From: hbo!bice (Brent A. Bice) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Well, it appears that my earlier claims about buildimage being broken in OpenLook are not necessarily correct. I was using imagecanvas to try to render the canvas I made with buildimage. So far, I haven't been able to render ANY canvas with imagecanvas except for the special case of canvases returned by readcanvas. Is it just me or doesn't this seem kinda wrong? Under NeWS 1.1, imagecanvas will render any canvas whether it's a Retained canvas made with newcanvas, or made with buildimage, or even those returned by readcanvas. Of course, I am still doing the appropriate scale command before imagecanvas (to make 1,1 the coord. of the upper right corner of the canvas)... Anyone know what I'm doing wrong? From don Mon Jun 25 22:20:14 1990 Date: Mon, 25 Jun 90 22:20:14 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: Colors and NeWS From: zephyr.ens.tek.com!tekcrl!brucec@uunet.uu.net (Bruce Cohen;;50-662;LP=A;) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) I had the same problem when I went to a Sparc. I wrote an awk script to turn the R4 color file into something close to colors.ps form, then edited the file and wrapped the required postscript stuff around the color specs. You have to do some manual smoothing (I think you can get duplicate entries, for instance; it's been awhile since I did this). The storage problem you see is probably that the stock colors.ps defines the color dictionary to be 200 elements long; I set it to 2048 just for luck: < systemdict /ColorDict 200 dict dup begin > systemdict /ColorDict 2048 dict dup begin Here's the awk script (actually, it's GAWK): ---------------------------------------------------------------------- # convert X11 rgb.txt color specs into NeWS colors.ps color specs { if (NF == 4) { name = tolower($4) if (!(name in names)) { names[name] = 1 colors[name,"R"] = $1 colors[name,"G"] = $2 colors[name,"B"] = $3 colors[name,"caps"] = capitalize(name) } } else if (NF == 5) { capname = capitalize($4) capitalize($5) spacename = tolower($4)" " tolower($5) name = tolower(capname) if (!(name in names)) { names[name] = 1 colors[name,"R"] = $1 colors[name,"G"] = $2 colors[name,"B"] = $3 colors[name,"caps"] = capname colors[name,"space"] = spacename } } else if (NF == 6) { capname = capitalize($4) capitalize($5) capitalize($6) spacename = tolower($4)" " tolower($5) " " tolower($6) name = tolower(capname) if (!(name in names)) { names[name] = 1 colors[name,"R"] = $1 colors[name,"G"] = $2 colors[name,"B"] = $3 colors[name,"caps"] = capname colors[name,"space"] = spacename } } } END { for (name in names) { capname = colors[name, "caps"] red = colors[name, "R"] green = colors[name, "G"] blue = colors[name, "B"] print "\t/" capname "\t" red " " green " " blue " RGBcolor def\n\t/"name"\t" capname" def" if ((name, "space") in colors) { spacename = colors[name, "space"] print "\t("spacename") cvn\t" capname " def" } } } function capitalize (instring, out) { out = toupper(substr(instring,1,1)) substr(instring,2,length(instring)-1) return out } -- --------------------------------------------------------------------------- Bruce Cohen, Computer Research Lab email: brucec@tekcrl.labs.tek.com Tektronix Laboratories, Tektronix, Inc. phone: (503)627-5241 M/S 50-662, P.O. Box 500, Beaverton, OR 97077 From don Mon Jun 25 22:20:23 1990 Date: Mon, 25 Jun 90 22:20:23 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: Colors and NeWS From: wind.Eng.Sun.COM@sun.com (Patrick Naughton) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) In article , brucec@phoebus.phoebus.labs.tek.com (Bruce Cohen;;50-662;LP=A;) writes: |> |> I had the same problem when I went to a Sparc. I wrote an awk script to |> turn the R4 color file into something close to colors.ps form, then edited |> the file and wr... Just to let you folks know, OpenWindows Version 2 has the R4 colornames database in it, and we changed from a PostScript dictionary to the X11 format for color names, so if MIT adds the whole Pantone Color Database to X11R5 you'll be able to simply use that rgb.txt ______________________________________________________________________ Patrick J. Naughton ARPA: naughton@sun.com Window Systems Group UUCP: ...!sun!naughton Sun Microsystems, Inc. AT&T: (415) 336 - 1080 From don Wed Jun 27 05:02:10 1990 Date: Wed, 27 Jun 90 05:02:10 -0400 To: NeWS-makers@brillig.umd.edu Subject: imagecanvas under X11-NeWS From: hbo!bice (Brent A. Bice) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Well, I think I've figured out my problem. It appears that under XNeWS, imagecanvas expects the CTM to be the same as the transformation matrix of the canvas you give it IF you want the contents of it to fill the current canvas. Just curious... Now that I think I know how imagecanvas is behaving... How come it was changed? Am I missing any other pieces to this puzzle? Brent Bice Applied Computing Systems 2075 Trinity Drive Suite Lower Level Los Alamos, NM 87544 Voice:(505) 662-3309 Fax:(505) 662-3518 bice@atlantis.ees.anl.gov % I program, therefore I am. From don Wed Jun 27 05:02:26 1990 Date: Wed, 27 Jun 90 05:02:26 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: How to locate the position of a canvas From: hbo!bice (Brent A. Bice) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) > Given a canvas object, how can I determine where on >the screen the canvas is located? > > Thanks in advance. Well, it seems the most obvious solution is getcanvaslocation... Just a thought From don Wed Jun 27 05:02:38 1990 Date: Wed, 27 Jun 90 05:02:38 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: SOME NeWS QUESTIONS ( Ignore if u r 2 busy) From: hbo!bice (Brent A. Bice) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) >I have few questions from some of the NeWSXperts who regularly write >/don't write) to this group. I am using openwindows 1.0 > >1. Is there any tool available using which I can browse the classes > objects, and associated methods I create in NeWS. Yes. I'll include it at the end of this message >3. I have created several independent windows and canvases > writing separate NeWS programs using DefaultWindow as the parent > class. Now, I want to combine all of them into one window using > multiple canvases. I can do this by changing /PaintClient, > /CreateClientCanvas etc. and combining them into one. What I > want to know is that is it possible to keep these classes as > separate and yet combining the canvases into one window. Do you > have any idea! Hmm... I don't think I quite understand what you're asking. A window instance can use instances from several different subclasses without actually incorporating the subclasses. For instance, an sub-class of DefaultWindow could create / reshape several other canvases, and INSTANCES of other objects (like items, menus, buttons, etc). Methods in your subclass of DefaultWindow that would possibly need to be changed are things like reshape, PaintClient (or maybe paintclient), destroy (if you had some forked processes in another process group for instance)... >4. Lastly, where can I get the documentation for the NeWS internal > class descriptions e.g. ClassCanvas, SliderItem etc. Dunno. I've read several of the NeWS 1.1 and XNeWS sources several times and am still learning new things all the time. Try writing your own Window sub-class from scratch... That learned me a lot (grin). Just kiddin'. From don Wed Jun 27 05:03:20 1990 Date: Wed, 27 Jun 90 05:03:20 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: SOME NeWS QUESTIONS ( Ignore if u r 2 busy) From: hbo!bice (Brent A. Bice) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) >I have few questions from some of the NeWSXperts who regularly write >/don't write) to this group. I am using openwindows 1.0 > >1. Is there any tool available using which I can browse the classes > objects, and associated methods I create in NeWS. Yes. I'll include it at the end of this message >3. I have created several independent windows and canvases > writing separate NeWS programs using DefaultWindow as the parent > class. Now, I want to combine all of them into one window using > multiple canvases. I can do this by changing /PaintClient, > /CreateClientCanvas etc. and combining them into one. What I > want to know is that is it possible to keep these classes as > separate and yet combining the canvases into one window. Do you > have any idea! Hmm... I don't think I quite understand what you're asking. A window instance can use instances from several different subclasses without actually incorporating the subclasses. For instance, an sub-class of DefaultWindow could create / reshape several other canvases, and INSTANCES of other objects (like items, menus, buttons, etc). Methods in your subclass of DefaultWindow that would possibly need to be changed are things like reshape, PaintClient (or maybe paintclient), destroy (if you had some forked processes in another process group for instance)... >4. Lastly, where can I get the documentation for the NeWS internal > class descriptions e.g. ClassCanvas, SliderItem etc. Dunno. I've read several of the NeWS 1.1 and XNeWS sources several times and am still learning new things all the time. Try writing your own Window sub-class from scratch... That learned me a lot (grin). Just kiddin'. From don Wed Jun 27 05:03:38 1990 Date: Wed, 27 Jun 90 05:03:38 -0400 To: NeWS-makers@brillig.umd.edu Subject: xclassbrowser From: hbo!bice (Brent A. Bice) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Oooops. Forgot to include the class browser for skdutta at the end of my last post... Here it is. #!/bin/sh # # This file is a product of Sun Microsystems, Inc. and is provided for # unrestricted use provided that this legend is included on all tape # media and as a part of the software program in whole or part. Users # may copy or modify this file without charge, but are not authorized to # license or distribute it to anyone else except as part of a product # or program developed by the user. # # THIS FILE IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE # WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR # PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. # # This file is provided with no support and without any obligation on the # part of Sun Microsystems, Inc. to assist in its use, correction, # modification or enhancement. # # SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE # INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY THIS FILE # OR ANY PART THEREOF. # # In no event will Sun Microsystems, Inc. be liable for any lost revenue # or profits or other special, indirect and consequential damages, even # if Sun has been advised of the possibility of such damages. # # Sun Microsystems, Inc. # 2550 Garcia Avenue # Mountain View, California 94043 # # (c) 1988, 1989, 1990 Sun Microsystems # psh << EOF % % This file contains a NeWS server class browser. % % The browser is built on the classes defined in pw.ps. The class % browser has 5 panes. It is similar in appearance to the Smalltalk % browser. The first pane on the top of the window contains the list of % classes in the server. The next 3 contain the list of methods, class % variables, and instance variables associated with the selected class in % the first pane. The bottom pane is used to display information about % the current selection. % % This code was mostly written in August 1987 but was revised to work with % NeWS 1.1 in May 1988. % % Many changes in November 1988. Integrated several of Richard Hess's % improvements. New features include improved scrolling, caching of browsed % classes, addition of the NoClass class for browsing the systemdict, better % decompilation of dictionaries, and process control (new request cancels % previous, better error handling, and looks better on B/W screen. % % Bruce V. Schwartz % Sun Microsystems % bvs@sun.com % % Reworked June 1989 to work with OpenWindows 1.0beta2 % Reworked March 1990 to work with OpenWindows 2.0beta % This file contains the classes used by the class browser. % The classes included are: % Picture -- an Item similar in concept to the NeWS1.1 textcanvas % PicWindow -- a LiteWindow that holds Pictures % PicScroll -- a SimpleScrollbar with a few modifications (auto scrolling) % % This code was mostly written in August 1987 but was revised to work with % NeWS 1.1 in May 1988. % % Bruce V. Schwartz % Sun Microsystems % bvs@sun.com % systemdict begin systemdict /Item known not { (NeWS/liteitem.ps) run } if systemdict /SimpleScrollbar known not { (NeWS/liteitem.ps) run } if end %% This file contains classes: PicWindow Picture PicScroll /PicWindow LiteWindow dictbegin /PicArray [] def dictend classbegin /BorderRight 1 def /BorderLeft 1 def /BorderBottom 1 def /PaintIcon { 1 fillcanvas 0 strokecanvas .8 setgray IconWidth 2 div 1 sub IconHeight 4 div 5 sub 5 Sunlogo 0 setgray IconWidth 2 div 3 moveto (Browse!) cshow } def /PaintClient { %% (paint client %\n) [ PicArray ] dbgprintf %% PicArray { ( %\n) [ 3 2 roll ] dbgprintf } forall PicArray paintitems } def /setpicarray { /PicArray exch def } def /destroy { %% (destroying arrays\n) [] dbgprintf PicArray { /destroy exch send } forall %% (destroying window\n) [] dbgprintf /destroy super send %% (destroyed window\n) [] dbgprintf } def % OPEN LOOK-ize: use select button to move window /CreateFrameInterests { % - => - (Create frame control interests) /CreateFrameInterests super send FrameInterests begin /FrameMoveEvent PointButton {/slide self send pause /totop self send pop} /DownTransition FrameCanvas eventmgrinterest def FrameMoveEvent /Exclusivity true put /FrameAdjustEvent AdjustButton {pop} null FrameCanvas eventmgrinterest def FrameAdjustEvent /Exclusivity true put end } def /CreateIconInterests { % - => - (Create icon control interests) /CreateIconInterests super send FrameInterests begin /IconOpenEvent null def /IconMoveEvent PointButton {/slide self send pause /totop self send pop} /DownTransition IconCanvas eventmgrinterest def IconMoveEvent /Exclusivity true put /IconAdjustEvent AdjustButton {pop} null IconCanvas eventmgrinterest def IconAdjustEvent /Exclusivity true put end } def /flipiconic { % - => - (swaps between open & closed) /unmap self send /Iconic? Iconic? not def IconX null eq { FrameX FrameY FrameHeight add IconHeight sub /move self send } if ZoomProc /totop self send /map self send } def classend def /PicScrollbar SimpleScrollbar dictbegin /Owner null def /LastX null def /LastY null def dictend classbegin /ItemShadeColor .5 def /setowner { /Owner exch def } def /ClientDown { /ClientDown super send } def /ClientUp { % - => - /ClientUp super send ItemValue ItemInitialValue ne { /Notify Owner send } if } def /PaintBar { } def /EraseBox { } def /PaintButtons { BarViewPercent 1 gt true or { /PaintButtons super send } if } def /PaintBox { % - => - (paint box) %(PaintBox %\n) [ BarViewPercent ] dbgprintf %(pause...) [] dbgprintf 1 60 div sleep (!!\n) [] dbgprintf gsave 10 dict begin /x 1 def /w ItemWidth 1 sub def BarViewPercent 1 le { 1 setgray x ButtonSize w ItemHeight ButtonSize dup add sub rectpath fill } { 1 1 BarViewPercent div sub 1 ItemValue sub mul ItemHeight ButtonSize dup add sub mul ButtonSize add /y exch def 1 BarViewPercent div ItemHeight ButtonSize dup add sub mul /h exch def % % do the normal bar % ItemFillColor setcolor x ButtonSize w y ButtonSize sub rectpath fill x y h add w ItemHeight ButtonSize sub y sub h sub rectpath fill % % do the big scroll box % /ybut ItemValue ValueToY def ItemShadeColor setgray x y w ybut y sub rectpath fill x ybut ButtonSize add w h ButtonSize sub ybut sub y add rectpath fill % % do the little scroll box % ItemValue BoxPath BoxFillColor setcolor gsave fill grestore } ifelse end /ItemPaintedValue ItemValue def grestore /Notify Owner send } def /HiliteItem { ScrollMotion { /ScrollAbsolute { } /ScrollPageForward { } /ScrollPageBackward { } /ScrollLineForward % top { 0 ItemHeight ButtonSize ButtonSize neg rectpath 5 setrasteropcode fill } /ScrollLineBackward % bottom { 0 0 ButtonSize ButtonSize rectpath 5 setrasteropcode fill } } case } def /UnhiliteItem { gsave ScrollMotion { /ScrollAbsolute {} /ScrollPageForward {} /ScrollPageBackward {} /ScrollLineForward % top { 0 ItemHeight ButtonSize sub ButtonSize ButtonSize rectpath clip PaintButtons } /ScrollLineBackward % bottom { 0 0 ButtonSize ButtonSize rectpath clip PaintButtons } } case grestore } def classend def /Picture Item dictbegin /BufferCanvas null def /BufferWidth 0 def /BufferHeight 0 def /HScrollbar null def /VScrollbar null def /HScrollbar? true def /VScrollbar? true def /HScrollWidth 0 def /VScrollWidth 0 def /ScrollWidth 16 def /NotifyUserDown { pop pop } def % x y => - /NotifyUserUp { pop pop } def % x y => - /NotifyUserDrag { pop pop } def % x y => - /NotifyUserEnter { pop pop } def % x y => - /NotifyUserExit { pop pop } def % x y => - dictend classbegin /new { % parentcanvas width height => instance % (new begin\n) [] dbgprintf /new super send begin /BufferHeight ItemHeight def /BufferWidth ItemWidth def CreateScrollbars CreateBuffer currentdict end % (new end\n) [] dbgprintf } def /destroy { HScrollbar null ne { null /setowner HScrollbar send } if VScrollbar null ne { null /setowner VScrollbar send } if %% BufferCanvas /Mapped false put %% /BufferCanvas null def } def /reshape { % x y w h => - /reshape super send ReshapeScrollbars } def /reshapebuffer { % w h => - /BufferHeight exch ItemHeight HScrollbar? { HScrollWidth sub } if max def /BufferWidth exch ItemWidth VScrollbar? { VScrollWidth sub } if max def ReshapeBuffer %ReshapeScrollbars AdjustScrollbars } def /getcanvas { BufferCanvas } def /updatecanvas { PaintBuffer } def /makestartinterests { /makestartinterests HScrollbar send /makestartinterests VScrollbar send [ exch aload length 2 add -1 roll aload pop ] % join 2 arrays /makestartinterests super send [ exch aload length 2 add -1 roll aload pop ] % join 2 arrays } def /PaintItem { %% (PaintItem begin\n) [] dbgprintf PaintBuffer /paint VScrollbar send /paint HScrollbar send %% (PaintItem end\n) [] dbgprintf } def /Notify { % (picture got notified\n) [] dbgprintf NotifyUser PaintBuffer } def /PaintBuffer { % (PaintBuffer begin \n) [ ] dbgprintf gsave ItemCanvas setcanvas % % Stroke canvas % 0 setgray 0 HScrollWidth ItemWidth VScrollWidth sub ItemHeight HScrollWidth sub rectpath stroke % % compute clipping region % 1 HScrollWidth 1 add ItemWidth VScrollWidth sub 2 sub ItemHeight HScrollWidth sub 2 sub rectpath % (clip to % % % %\n) [ pathbbox ] dbgprintf clip % % compute translation % BufferWidth ItemWidth sub VScrollWidth add neg dup 0 lt { 1 /getvalue HScrollbar send sub mul } { pop 0 } ifelse BufferHeight ItemHeight sub HScrollWidth add neg dup 0 lt { 1 /getvalue VScrollbar send sub mul } { } ifelse HScrollWidth add % 2 copy (translate by % %\n) [ 4 2 roll ] dbgprintf translate % XNeWS fix % BufferWidth BufferHeight % 2 copy (scale by % %\n) [ 4 2 roll ] dbgprintf % scale % (currentmatrix % % % % % %\n) [ matrix currentmatrix aload pop ] dbgprintf pause BufferCanvas imagecanvas pause grestore % (PaintBuffer end\n) [ ] dbgprintf } def /CreateBuffer { % - => - /BufferCanvas framebuffer newcanvas def BufferCanvas /Retained true put BufferCanvas /Mapped false put ReshapeBuffer } def /ReshapeBuffer { % - => - gsave framebuffer setcanvas 0 0 BufferWidth BufferHeight rectpath BufferCanvas reshapecanvas grestore } def /CreateScrollbars { % - => - % (begin CreateScrollbars\n) [] dbgprintf /HScrollWidth HScrollbar? { ScrollWidth } { 0 } ifelse def /VScrollWidth VScrollbar? { ScrollWidth } { 0 } ifelse def ItemWidth VScrollWidth le { /VScrollWidth ScrollWidth 2 div def } if ItemHeight HScrollWidth le { /HScrollWidth ScrollWidth 2 div def } if /HScrollbar [1 0 .01 .1 BufferWidth ItemWidth VScrollWidth sub div ] 1 {} ItemCanvas /new PicScrollbar send dup /BarVertical? false put def /VScrollbar [1 0 .01 .1 BufferHeight ItemHeight HScrollWidth sub div ] 1 {} ItemCanvas /new PicScrollbar send def self /setowner HScrollbar send self /setowner VScrollbar send % (end CreateScrollbars\n) [] dbgprintf } def % Set the range for the scrollbars % /AdjustScrollbars { [1 0 .01 .1 BufferWidth ItemWidth VScrollWidth sub div ] /setrange HScrollbar send [1 0 .01 .1 BufferHeight ItemHeight HScrollWidth sub div ] /setrange VScrollbar send } def /ReshapeScrollbars { /HScrollWidth HScrollbar? { ScrollWidth } { 0 } ifelse def /VScrollWidth VScrollbar? { ScrollWidth } { 0 } ifelse def AdjustScrollbars 10 dict begin /h ItemHeight def /w ItemWidth def /s ScrollWidth def HScrollbar? { 0 0 w VScrollWidth sub s } { 0 0 0 0 } ifelse % 4 copy (hscroll % % % %\n) [ 6 2 roll ] dbgprintf /reshape HScrollbar send VScrollbar? { w s sub HScrollWidth s h HScrollWidth sub } { 0 0 0 0 } ifelse % 4 copy (vscroll % % % %\n) [ 6 2 roll ] dbgprintf /reshape VScrollbar send end } def /ClientDown { % (Picture ClientDown\n) [] dbgprintf % compute translation % BufferWidth ItemWidth sub VScrollWidth add neg dup 0 lt { 1 /getvalue HScrollbar send sub mul } { pop 0 } ifelse BufferHeight ItemHeight sub HScrollWidth add neg dup 0 lt { 1 /getvalue VScrollbar send sub mul } { } ifelse HScrollWidth add % translatex translatey CurrentEvent /YLocation get sub neg exch CurrentEvent /XLocation get sub neg exch % (n: %\n) [ NotifyUserDown ] dbgprintf { NotifyUserDown } fork } def /ClientUp { % (Picture ClientUp\n) [] dbgprintf CurrentEvent begin XLocation YLocation end NotifyUserUp } def /ClientDrag { % (client drag\n) [] dbgprintf CurrentEvent begin XLocation YLocation end NotifyUserDrag } def /ClientEnter { %% (client enter\n) [] dbgprintf CurrentEvent begin XLocation YLocation end NotifyUserEnter } def /ClientExit { %% (client exit\n) [] dbgprintf CurrentEvent begin XLocation YLocation end NotifyUserExit } def classend def %%%%%%%%%%%%%%%%Browser code%%%%%%%%%%%%%%% /Font15 /Times-Roman findfont 15 scalefont def /PickProcess null def /PicArray [ ] def /win framebuffer /new PicWindow send def { /FrameLabel (Class Browser for X11/NeWS) def } /doit win send /can win /ClientCanvas get def /LastClassPick null def /LastInstPick null def /LastMethodPick null def /LastVarPick null def /ClassKeys [] def /InstKeys [] def /MethodKeys [] def /VarKeys [] def /W 200 def /H 300 def /TextW 800 def /TextH 300 def 100 100 TextW TextH H add 16 add /reshape win send /ClassPic win /ClientCanvas get W H /new Picture send def % classes /MethodPic win /ClientCanvas get W H /new Picture send def % methods /VarPic win /ClientCanvas get W H /new Picture send def % class var /InstPic win /ClientCanvas get W H /new Picture send def % ints var /TextPic win /ClientCanvas get TextW TextH /new Picture send def % text /PicArray [ ClassPic InstPic MethodPic VarPic TextPic ] def PicArray /setpicarray win send ClassPic /HScrollbar? false put InstPic /HScrollbar? false put MethodPic /HScrollbar? false put VarPic /HScrollbar? false put TextPic /HScrollbar? false put 000 TextH W H /reshape ClassPic send 200 TextH W H /reshape MethodPic send 400 TextH W H /reshape VarPic send 600 TextH W H /reshape InstPic send 0 0 TextW TextH /reshape TextPic send 0 /setvalue ClassPic /VScrollbar get send pop % pop the null ret value 0 /setvalue InstPic /VScrollbar get send pop % pop the null ret value 0 /setvalue MethodPic /VScrollbar get send pop % pop the null ret value 0 /setvalue VarPic /VScrollbar get send pop % pop the null ret value 0 /setvalue TextPic /VScrollbar get send pop % pop the null ret value ColorDisplay? { /ClassColor 1 .8 .8 rgbcolor def /InstColor 1 .8 1 rgbcolor def /MethodColor .8 1 .8 rgbcolor def /VarColor .8 .8 1 rgbcolor def /TextColor 1 1 1 rgbcolor def } { /ClassColor 1 1 1 rgbcolor def /InstColor 1 1 1 rgbcolor def /MethodColor 1 1 1 rgbcolor def /VarColor 1 1 1 rgbcolor def /TextColor 1 1 1 rgbcolor def } ifelse ClassPic /NotifyUserDown { { ClassPick } HandlePick } put InstPic /NotifyUserDown { { InstPick } HandlePick } put MethodPic /NotifyUserDown { { MethodPick } HandlePick } put VarPic /NotifyUserDown { { VarPick } HandlePick } put %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % Utilities for expanding NeWS object types /String256 256 string def /Expand % thing -> - { ExpandDict begin 10 dict begin /ArrayDepth 0 def /TabWidth ( ) stringwidth pop def () exch dup type exec end end } def /StartArray % string array -> string (string) array { /tmparray exch def StartLine ([) AddString /tmparray load /ArrayDepth ArrayDepth 1 add def } def /EndArray % string -> string (string) { /ArrayDepth ArrayDepth 1 sub def (] ) append StartLine } def /StartXArray % string array -> string (string) array { /tmparray exch def StartLine ({) AddString /tmparray load /ArrayDepth ArrayDepth 1 add def } def /EndXArray % string -> string (string) { /ArrayDepth ArrayDepth 1 sub def (} ) append StartLine } def /StartLine % string -> string (string) { dup stringwidth pop TabWidth ArrayDepth mul gt { () ArrayDepth { ( ) append } repeat } if } def /AddString % string string -> string (string) { append ( ) append dup stringwidth pop 700 gt { StartLine } if pause } def /ExpandDict 35 dict begin /arraytype %% Should handle auto-loaded classes here { dup xcheck { StartXArray { dup type exec } forall EndXArray } { StartArray { dup type exec } forall EndArray } ifelse } def /packedarraytype //arraytype def /dicttype % note that this is overridden below { dup /ClassName known { /ClassName get String256 cvs AddString } { /tmp exch def StartLine (<>) AddString StartLine tmp { /tmp exch def dup type exec ( ) AddString /tmp load dup type exec StartLine } forall StartLine (<>) AddString StartLine } ifelse } def % /dicttype % { % dup /ClassName known % { % /ClassName get % } if % String256 cvs AddString % } def /booleantype { String256 cvs AddString} def /filetype { String256 cvs AddString} def /fonttype { String256 cvs AddString} def /integertype { String256 cvs AddString} def /marktype { ([ ) AddString} def /nametype { dup String256 cvs exch xcheck not { (/) exch append } if AddString } def /nulltype { String256 cvs AddString} def /operatortype { String256 cvs dup length 2 sub 1 exch getinterval AddString} def /realtype { String256 cvs AddString} def /savetype { String256 cvs AddString} def /stringtype { String256 cvs (\() exch append (\)) append AddString} def %% NeWS types /vmtype { String256 cvs AddString} def /canvastype { String256 cvs AddString} def /colortype { String256 cvs AddString} def /eventtype { String256 cvs AddString} def /graphicsstatetype { String256 cvs AddString} def /monitortype { String256 cvs AddString} def /processtype { String256 cvs AddString} def /shapetype { String256 cvs AddString} def currentdict end def %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % Sorting Utilities /FindSmall % proc array -> int { 10 dict begin /a exch def /proc exch def /result 0 def /key a 0 get def /i 0 def 0 1 a length 1 sub { /j exch def key a j get proc { /i j def /key a j get def } if } for i end } def /FasterSort % proc array -> array { 10 dict begin /arrayin exch def /arrayout [] def /proc exch def { arrayin length 0 eq { arrayout exit } if /proc load arrayin FindSmall /i exch def arrayout arrayout length arrayin i get arrayinsert /arrayout exch def /arrayin arrayin i arraydelete def pause } loop end } def /Sort % array -> array { { gt } exch FasterSort } def /BubbleSort % array -> array { 20 dict begin /keys exch def /bound keys length 1 sub def /check 0 def { /t -1 def 0 1 bound 1 sub { /i exch def /j i 1 add def /keysi keys i get def /keysj keys j get def keysi keysj gt { keys i keysj put keys j keysi put /t j def } if } for t -1 eq { exit } { /bound t def } ifelse pause } loop keys end %% EndWait } def %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % Main Class code /ShowArray { % array color pic % (showarray: count %\n) [ count ] dbgprintf 10 dict begin /pic exch def /color exch def /a exch def Font15 setfont W a length 18 mul 15 add /reshapebuffer pic send % { /paint VScrollbar send /paint HScrollbar send } pic send /getcanvas pic send setcanvas color fillcanvas mark /PaintItem pic send cleartomark % PaintItem seems to leave 2 things on the stack 0 0 0 rgbcolor setcolor /k pic /BufferHeight get def a { /k k 18 sub def 5 k moveto show } forall /updatecanvas pic send end } def /DoClasses { [ systemdict { /val exch cvlit def /key exch cvlit def val type /dicttype eq { val /ClassName known { key val /ClassName get eq { % leave this on the stack key 256 string cvs } if } if } if pause } forall ] Sort userdict begin /ClassKeys exch def end ClassKeys ClassColor ClassPic ShowArray userdict /ClassesDict ClassKeys length dict put [] MethodColor MethodPic ShowArray [] VarColor VarPic ShowArray [] InstColor InstPic ShowArray [] TextColor TextPic ShowArray % fork off a process to fill the ClassesDict for % all classes % { ClassKeys { DoClass } forall } fork } def /DoClass % classname -> - (sorts all class attributes) { 10 dict begin /classname exch def ClassesDict classname known not { /classarrays 3 dict def /classdict systemdict classname get def classdict GetSortedMethods classdict GetSortedClassVars classdict GetSortedInstVars classarrays begin /InstVars exch def /ClassVars exch def /Methods exch def end ClassesDict classname classarrays put } if end } def /GetSortedMethods { % classdict => - [ exch { /val exch def /key exch def /val load type dup /arraytype eq exch /packedarraytype eq or /val load xcheck and { key 256 string cvs } if pause } forall ] Sort } def /GetSortedClassVars { % classdict => - [ exch { /val exch def /key exch def /val load type { /arraytype /packedarraytype { /val load xcheck not } /operatortype { false } /dicttype { /val load /ClassName known not } /Default { true } } case { key 256 string cvs } if pause } forall ] Sort } def /GetSortedInstVars { % classdict => - [ exch /InstanceVars get dup null eq { pop [] } if { /val exch def /key exch def key 256 string cvs pause } forall ] Sort } def /DoMethods % classname => - { ClassesDict exch get /Methods get userdict begin /MethodKeys exch def end MethodKeys MethodColor MethodPic ShowArray } def /DoVars % classname => - { ClassesDict exch get /ClassVars get userdict begin /VarKeys exch def end VarKeys VarColor VarPic ShowArray } def /DoInsts % classname => - { ClassesDict exch get /InstVars get userdict begin /InstKeys exch def end InstKeys InstColor InstPic ShowArray } def /ClassPick % x y => - { 10 dict begin /y exch def /x exch def /k ClassPic /BufferHeight get y sub 18 div floor cvi def /lastpick LastClassPick def userdict /LastClassPick k put Font15 setfont lastpick null ne { null SetMethodPick null SetVarPick null SetInstPick gsave %(unhilite %\n) [ lastpick ] dbgprintf /getcanvas ClassPic send setcanvas 0 ClassPic /BufferHeight get lastpick 1 add 18 mul sub 3 sub W 18 rectpath ClassColor setcolor fill 0 0 0 rgbcolor setcolor 5 ClassPic /BufferHeight get lastpick 1 add 18 mul sub moveto ClassKeys lastpick get show grestore } if lastpick null ne lastpick k ne and { %% put scroll bars back to top 0 /setvalue InstPic /VScrollbar get send 0 /setvalue MethodPic /VScrollbar get send 0 /setvalue VarPic /VScrollbar get send 0 /setvalue TextPic /VScrollbar get send } if %(pick is % \n ) [ k ] dbgprintf k ClassKeys length 1 sub le { % (pick is % '%' \n ) [ ClassKeys k get k ] dbgprintf % (Lastpick was '%' \n ) [ lastpick ] dbgprintf /getcanvas ClassPic send setcanvas % (hilite %\n) [ k ] dbgprintf 0 ClassPic /BufferHeight get k 1 add 18 mul sub 3 sub W 18 rectpath 0 0 0 rgbcolor setcolor fill ClassColor setcolor 0 5 ClassPic /BufferHeight get k 1 add 18 mul sub moveto ClassKeys k get show /updatecanvas ClassPic send lastpick k ne { [(Loading Menus...)] TextColor TextPic ShowArray [] MethodColor MethodPic ShowArray [] VarColor VarPic ShowArray [] InstColor InstPic ShowArray ClassKeys k get cvn dup DoClass dup DoMethods dup DoVars dup DoInsts pop } if [ (CLASS ") ClassKeys k get 256 string cvs (") append append systemdict ClassKeys k get cvn get /ParentDictArray known { systemdict ClassKeys k get cvn get /ParentDictArray get { /ClassName get 256 string cvs ( ) exch append } forall } if ] TextColor TextPic ShowArray k } { /updatecanvas ClassPic send null } ifelse end } def /SetInstPick % newpick => - { 10 dict begin Font15 setfont LastInstPick null ne { gsave /getcanvas InstPic send setcanvas 0 InstPic /BufferHeight get LastInstPick 1 add 18 mul sub 3 sub W 18 rectpath InstColor setcolor fill 0 0 0 rgbcolor setcolor 5 InstPic /BufferHeight get LastInstPick 1 add 18 mul sub moveto InstKeys LastInstPick get show grestore } if userdict begin /LastInstPick exch def end % pick up newpick %% (new InstPick is % \n ) [ LastInstPick ] dbgprintf LastInstPick null ne { /getcanvas InstPic send setcanvas 0 InstPic /BufferHeight get LastInstPick 1 add 18 mul sub 3 sub W 18 rectpath 0 0 0 rgbcolor setcolor fill InstColor setcolor 0 5 InstPic /BufferHeight get LastInstPick 1 add 18 mul sub moveto InstKeys LastInstPick get show } if /updatecanvas InstPic send LastInstPick null ne { /val systemdict ClassKeys LastClassPick get cvn get % class /InstanceVars get % instdict InstKeys LastInstPick get % class variable get def [] TextColor TextPic ShowArray [ (INSTANCE VARIABLE) ( ") InstKeys LastInstPick get 256 string cvs (") append append append val Expand ] TextColor TextPic ShowArray } if end } def /InstPick { null SetMethodPick null SetVarPick 10 dict begin /y exch def /x exch def /k InstPic /BufferHeight get y sub 18 div floor cvi def %% (pick is % \n ) [ k ] dbgprintf k dup end InstKeys length 1 sub le { SetInstPick } { pop } ifelse } def /SetMethodPick % newpick => - { Font15 setfont LastMethodPick null ne { gsave /getcanvas MethodPic send setcanvas 0 MethodPic /BufferHeight get LastMethodPick 1 add 18 mul sub 3 sub W 18 rectpath MethodColor setcolor fill 0 0 0 rgbcolor setcolor 5 MethodPic /BufferHeight get LastMethodPick 1 add 18 mul sub moveto MethodKeys LastMethodPick get show grestore } if userdict begin /LastMethodPick exch def end % pick up newpick %% (new MethodPick is % \n ) [ LastMethodPick ] dbgprintf LastMethodPick null ne { /getcanvas MethodPic send setcanvas 0 MethodPic /BufferHeight get LastMethodPick 1 add 18 mul sub 3 sub W 18 rectpath 0 0 0 rgbcolor setcolor fill MethodColor setcolor 0 5 MethodPic /BufferHeight get LastMethodPick 1 add 18 mul sub moveto MethodKeys LastMethodPick get show } if /updatecanvas MethodPic send LastMethodPick null ne { [] TextColor TextPic ShowArray [ (METHOD ") MethodKeys LastMethodPick get 256 string cvs (") append append systemdict ClassKeys LastClassPick get cvn get % class MethodKeys LastMethodPick get % class method get Expand ] TextColor TextPic ShowArray } if } def /MethodPick { null SetVarPick null SetInstPick 10 dict begin /y exch def /x exch def /k MethodPic /BufferHeight get y sub 18 div floor cvi def %% (pick is % \n ) [ k ] dbgprintf k dup end MethodKeys length 1 sub le { SetMethodPick } { pop } ifelse } def /SetVarPick % newpick => - { 10 dict begin Font15 setfont LastVarPick null ne { gsave /getcanvas VarPic send setcanvas 0 VarPic /BufferHeight get LastVarPick 1 add 18 mul sub 3 sub W 18 rectpath VarColor setcolor fill 0 0 0 rgbcolor setcolor 5 VarPic /BufferHeight get LastVarPick 1 add 18 mul sub moveto VarKeys LastVarPick get show grestore } if userdict begin /LastVarPick exch def end % pick up newpick %% (new VarPick is % \n ) [ LastVarPick ] dbgprintf LastVarPick null ne { /getcanvas VarPic send setcanvas %(hilite %\n) [ LastVarPick ] dbgprintf 0 VarPic /BufferHeight get LastVarPick 1 add 18 mul sub 3 sub W 18 rectpath 0 0 0 rgbcolor setcolor fill VarColor setcolor 0 5 VarPic /BufferHeight get LastVarPick 1 add 18 mul sub moveto VarKeys LastVarPick get show } if /updatecanvas VarPic send LastVarPick null ne { /val systemdict ClassKeys LastClassPick get cvn get % class VarKeys LastVarPick get % class variable get def [] TextColor TextPic ShowArray [ { (CLASS VARIABLE) ( ") VarKeys LastVarPick get 256 string cvs (") append append append val Expand } errored { cleartomark [ (CLASS VARIABLE) ( ") VarKeys LastVarPick get 256 string cvs (") append append append (Error in CLASS VARIABLE) () $error Expand } if ] TextColor TextPic ShowArray } if end } def /VarPick { null SetMethodPick null SetInstPick 10 dict begin /y exch def /x exch def /k VarPic /BufferHeight get y sub 18 div floor cvi def % (pick is % %\n ) [ k VarKeys] dbgprintf k dup end VarKeys length 1 sub le { SetVarPick } { pop } ifelse } def /SetupNoClass { % - -> - Set up systemdict to look like a class % systemdict /NoClass systemdict put systemdict /NoClass dictbegin systemdict { dup type /dicttype ne { def } { dup /ClassName known { pop pop } { def } ifelse } ifelse } forall dictend put NoClass /InstanceVars 0 dict put % systemdict /ClassName (NoClass) put NoClass /ClassName (NoClass) put } def /HandlePick { % procedure -> - PickProcess null ne { PickProcess killprocess } if fork userdict begin /PickProcess exch def end } def SetupNoClass DoClasses PicArray forkitems pop /map win send % /win null def % newprocessgroup % currentfile closefile EOF From don Wed Jun 27 05:04:05 1990 Date: Wed, 27 Jun 90 05:04:05 -0400 To: NeWS-makers@brillig.umd.edu Subject: NeWS 1.1 version of unmap From: booga.Eng.Sun.COM!siegel@sun.com (Josh Siegel) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) --- I havn't posted this in a while and since there have been so many questions concerning canvas locations, canvas tree's, etc.. Another interesting use of this is to grab the canvas clicked on, look at the events associated with that canvas, look at the dicts associated with those events, grab the second one, and you have the user-dict assocated with the canvas. Nice for debugging windows and great with programs like cyberspace. This is only useful with NeWS 1.1. OpenWindows has a nice operator that does all this work for you. --josh siegel P.S. Yes, I am now at Sun working in the OpenWindows group. Don Hopkins is also here. -- #!/usr/NeWS/bin/psh % unmap version 1.1 % % Written by Josh Siegel (Wed Jun 29 1988) % last modified Tue Oct 4 01:10:38 MDT 1988 % This programs purpose is to unmap windows. All you do % is click on a canvas and it will vanish. Useful for those % windows that have failed to garbage collect. % % getxyloc returns the position of the next left-button % mouse up event. It passes all other events. /getxyloc { % => x y 10 dict begin createevent dup /Priority 20 put dup /Name /LeftMouseButton put dup /Action /UpTransition put /foobar exch def foobar expressinterest { awaitevent dup /Name get /LeftMouseButton eq { exit } if redistributeevent } loop foobar revokeinterest dup /XLocation get exch /YLocation get end } def % find_tree traverses the canvas tree passed to it and calls % check_canvas to check to see if the point is in the % canvas. It is also a example of a recursive NeWS routine. /find_tree { % canvas => dup null eq { pop } { dup check_canvas { dup [ exch ] answer exch append /answer exch def } if dup /TopChild get find_tree { /CanvasBelow get dup null eq { pop exit } if dup check_canvas { dup [ exch ] answer exch append /answer exch def } if } loop } ifelse } def % Check canvas checks to see if the point is inside of the % clipping path of the canvas. This is VERY important for things % like the clock where the clipping path is round. % /check_canvas { % canvas => boolean dup /Mapped get { dup getcanvaslocation % can xwin ywin ypnt exch sub % can xwin ypnt-ywin exch xpnt exch sub exch % can xpnt-xwin ypnt-ywin 3 -1 roll setcanvas clipcanvaspath pointinpath % boolean framebuffer setcanvas } { pop false } ifelse } def % find_canvas is a convient front end to the whole system. % I use a local dictionary to help in garbage collected in case % this routine is later used as part of a larger piece of code. /find_canvas { % x y => [canvas] 10 dict begin /answer [ ] def /ypnt exch def /xpnt exch def framebuffer find_tree answer end } def getxyloc find_canvas dup length 1 le % Do we only have the framebuffer in the list? { pop } % if so, just clear the stack and finish. { 1 get dup /Mapped false put /Retained false put } ifelse % unmap the canvas. From don Wed Jun 27 05:05:03 1990 Date: Wed, 27 Jun 90 05:05:03 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: SOME NeWS QUESTIONS ( Ignore if u r 2 busy) From: ronin.Eng.Sun.COM!ronin@sun.com (Brian Raymor) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) 1. Is there any tool available using which I can browse the classes objects, and associated methods I create in NeWS. There is a smalltalk-like class browser written by Bruce Schwartz. This is *not* a source browser and is not supported by Sun. I will email the source to you. 2. Is there any tool available presently which can convert SunView application directly to the NeWS code. There is no tool which will perform a direct conversion. The NeWS Technology Group is developing a NeWS Toolkit post-processor for DevGuide. 3. I have created several independent windows and canvases writing separate NeWS programs using DefaultWindow as the parent class. Now, I want to combine all of them into one window using multiple canvases. I can do this by changing /PaintClient, /CreateClientCanvas etc. and combining them into one. What I want to know is that is it possible to keep these classes as separate and yet combining the canvases into one window. Do you have any idea! If you are beginning to program with NeWS toolkits, I would recommend using the experimental NeWS Toolkit release (TNT). We are currently working on a "new and improved" version of this toolkit. While Lite is supported, I do not encourage developing new applications with it. Lite bugs will be fixed as the system evolves; however, no further enhancements will be added. Using the NeWS Toolkit, you would use ClassBag and its subclasses to manage collections of canvas clients. I have included some comments from the header : % Many canvases in NeWS may be said to properly contain some other % canvases. These classes formalize that concept and allow some % degree of control over a subtree of the canvas hierarchy. % % ClassBag is the most general case. It provides some control over % an arbitrary number of immediate child canvases. ClassBag will % manage activation and destruction issues as well as providing a % convenient place to enforce layout policies on subcanvases. % % The bag provides an organizational abstraction based upon the % canvas tree. The bag class is pivotal in the distribution and % maintainance of focus and damage events, as well as being the % arbitor of activate and destroy protocols. 4. Lastly, where can I get the documentation for the NeWS internal class descriptions e.g. ClassCanvas, SliderItem etc. For documentation on the NeWS Toolkit, you should send email to tnt-request@sun.com. Brian Raymor NeWS Technology Group From don Wed Jun 27 05:05:26 1990 Date: Wed, 27 Jun 90 05:05:26 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: Display lock broken From: sevans@Eng.Sun.COM (Steve Evans) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) > I am plagued by messages, usually when loading large files into the > server: These messages comes from the SunWindows kernel driver. They are generated when the NeWS or xnews server doesn't release the SunWindows display lock within a given number of process virtual seconds (2 is the default). If you don't run any SunView programs under NeWS you shouldn't see them. However, once you run any SunView programs under NeWS you may continue to see them even if there are no longer any SunView programs running. In the "SunView System Programmer's Guide" in the chapter entitled "Workstations" in the section entitled "Kernel Tuning Options" you will see a kernel variable named ws_lock_limit that may be changed to modify the 2 second default. The following would permanently modify the setting to be 8 seconds. % su # adb -w /vmunix /dev/kmem ws_lock_limit?W 8 ws_lock_limit/W 8 ^D The main drawback of doing this is that the kernel will deal less swiftly with display lock hogs. sevans From don Wed Jun 27 05:05:51 1990 Date: Wed, 27 Jun 90 05:05:51 -0400 To: NeWS-makers@brillig.umd.edu Subject: How to locate a canvas From: rbogen@EBay.Sun.COM (Richard A. Bogen) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) There is an operator called: getcanvaslocation (documented) and another called: getbbox (undocumented). The latter takes a canvas & boolean. Yet another way is: .1 sleep currentcursorlocation followed by moving the cursor ontop of your canvas. From don Wed Jun 27 05:06:18 1990 Date: Wed, 27 Jun 90 05:06:18 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: Color Images From: wind.Eng.Sun.COM@sun.com (Patrick Naughton) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) NeWS 1.0 and NeWS 1.1 had simple offscreen support for 24 bit memory rasters. OpenWindows V1.0, V1.0.1 and V2 (this summerish) do not support 24 bit canvases at all. You can build color images using buildimage to create an 8 bit deep raster, then rendering pixels into it (using 'setpixel') then creating your own colormap to map from pixels to colors. This is a little cumbersome, but then 8 bit colormapped displays are a little cumbersome. OpenWindows Version 3 (next yearish) will have full support for 24 bit screen and memory rasters. In article <9006202149.AA29288@oahu.cs.ucla.edu>, alexis@CS.UCLA.EDU (Alexis Wieland) writes: |> Apologies for such a simple question, but I've been going around and |> around on this. |> |> I need to build a color canvas from some synthetic data. I used to |> use "buildimage" with 24 bits/pixel, but our newer version of NeWS |> doesn't seem to support 24 bits/pixel. |> |> This can't be so difficult ... it's too basic. |> |> Thanks in advance, |> |> Alexis Wieland |> alexis@cs.ucla.edu ______________________________________________________________________ Patrick J. Naughton ARPA: naughton@sun.com Window Systems Group UUCP: ...!sun!naughton Sun Microsystems, Inc. AT&T: (415) 336 - 1080 From don Wed Jun 27 05:07:16 1990 Date: Wed, 27 Jun 90 05:07:16 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: ScrollableView From: ronin.Eng.Sun.COM!ronin@sun.com (Brian Raymor) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) In article <1990Jun22.133601.26553@canon.co.uk>, rjf@canon.co.uk (Robin Faichney) writes: > In OW 1.0, ScrollableView is mentioned in > OPENWINHOME/etc/NeWS/NDE/bag.ps as an example of the use of > ClassContainer. Going by the name, this seems ideal for > what I'm trying to do just now (essentially, scrolling a > bag), but I cannot find any other reference to it. > OpenLookPane, for this purpose, is just that! Does > ScrollableView appear in OW 2.0 -- or is there another way > of doing it? > -- The trouble with comments is that they are often wrong :-) The ScrollableView will not appear in the toolkit. For the time being, OpenLookPane is the solution. In the next toolkit release, ClassContainer and OpenLookPane will be replaced by ClassBorderBag, a new ClassBag subclass. Instantiating and adding a scrollbar to a borderbag instance will not be performed automatically. There are a number of problems associated with the OpenLookPane approach : 1. The scrollbars cannot be repositioned based on user preferences. For example, a user might prefer to have the vertical scrollbar positioned on the west rather than the east side. 2. The pane interface conceals neither the scrollbar nor the bag implementation. The developer must read the pane code to discover that the pane is a bag and that scrollbars are named clients in this bag. Locating the /CreateHorizontalScrollbar and /CreateVerticalScrollbar utilities, the developer will then discover the secret names of the scrollbar clients, which I am not allowed to document here :-) ClassBorderBag provides general purpose placement while avoiding "intimate" knowledge of its clients. Five designated clients are managed : /central, /east, /west, /north, and /south. For a scrolling pane, you would add a central client and then a vertical scrollbar as the east or west client. There are well documented interfaces to establish the connection between the central client and the scrollbar. As the application is running, you can move the east scrollbar to the west side with this small code fragment : /e /removeclient aborderbag send % client true pop % client /w exch /addclient aborderbag send % - Brian Raymor NeWS Technology Group From don Wed Jun 27 05:07:32 1990 Date: Wed, 27 Jun 90 05:07:32 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: buildimage/imagecanvas/OpenLook From: wind!naughton@sun.com (Patrick Naughton) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) NeWS 1.1 had a different default CTM for buildimage canvases... Try this on any version of OpenWindows. -Patrick %! /cv 16 16 8 [] null buildimage def % make 16x16x8 canvas cv setcanvas % make it the current canvas 1 16 div dup scale % set ctm so cv is 0..15 x 0..15 1 0 0 setrgbcolor 0 0 16 16 rectpath fill % fill it with red 0 0 1 setrgbcolor 1 1 14 14 rectpath fill % fill middle with blue 0 1 0 setrgbcolor 15 15 1 1 rectpath fill % fill upper right pixel with green framebuffer setcanvas % draw on the root canvas 50 50 translate % move it out of the corner 160 160 scale % scale it up from 1x1 cv imagecanvas % copy the bits In article <9006251727.AA01895@>, bice@hbo.UUCP (Brent A. Bice) writes: |> |> Well, it appears that my earlier claims about buildimage being broken in |> OpenLook are not necessarily correct. I was using imagecanvas to try to |> render the canvas I made with buildimage. So far, I haven't been able to |> render ANY canvas with imagecanvas except for the special case of canvases |> returned by readcanvas. Is it just me or doesn't this seem kinda wrong? |> Under NeWS 1.1, imagecanvas will render any canvas whether it's a Retained |> canvas made with newcanvas, or made with buildimage, or even |> those returned by readcanvas. Of course, I am still doing the appropriate |> scale command before imagecanvas (to make 1,1 the coord. of the upper right |> corner of the canvas)... Anyone know what I'm doing wrong? ______________________________________________________________________ Patrick J. Naughton ARPA: naughton@sun.com Window Systems Group UUCP: ...!sun!naughton Sun Microsystems, Inc. AT&T: (415) 336 - 1080 From don Wed Jun 27 05:08:44 1990 Date: Wed, 27 Jun 90 05:08:44 -0400 To: NeWS-makers@brillig.umd.edu Subject: Illegal Instruction From: David Huelsbeck Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Server: NeWS 1.1 OS: SunOS 4.0.3 Mach: Sun 4/260 I'm hoping someone out there might be able to give me some insight about what causes NeWS to crash with the message "Illegal Instruction." I've done strings on the NeWS server and it's not in there. My guess is that NeWS (the server) gets so hosed up internally under certain conditions that it causes a SIGILL to be generated, which it does not handle, so the server is killed by the kernel. This makes it kind of difficult to debug. I know that this bug can be caused by reading from a file when that file has no bytes available. While that is certainly something a well written program should not do, I think that blowing up completely is a less then wonderful means of reporting the problem. Unfortunately it seems that this problem can be generated by other less debuggable means. I have a program that seems to cause this to happen only on some machines and only when certain other programs are running at the same time. Worse yet it doesn't occur during the normal operation of the program but rather it happens when the program is exiting following the user selecting "Zap" from the program's main menu. It seems to happen sometimes when children (windows) of the main window are destroyed. (Very Nice!) I called Sun but I didn't have much luck. The person I talked with tried to be helpful but really didn't know anything about NeWS internals. She said that she did not have access to the source code and she was not in a position to call and ask anyone that did. So it seems that none of the people who are qualified to answer my questions can be bothered with them. So I'm mailing in hopes of contacting someone who might have some insight into what might be happening inside the NeWS server. Since in this case it would be nearly impossible to figure out exactly what piece of code is causing the problem I'm hoping more for some general information about "Illegal Instruction", and how to debug it, than I am for a specific solution to this instance of the problem. Thank you, David Huelsbeck Applied Computing Systems, Inc. 505/662-3309 WARNING: Long complaint follows. If someone who actually works on NeWS at Sun sees this and thinks that maybe there should be some kind of official channel of communication for problems like this I'd be more than happy to put you in touch with the poor folks in your customer support group. So far I've received both apologies and expressions of embarrassment at their impotence to help me from both the people at the 1-800-USA-4SUN number, who said that the windows support people never seem to answer customer calls and they feel bad because they don't know what to tell the customers when they call back wondering why no one has called them, and from the people in windows support who've told me that they don't currently have a NeWS guru that they can ask questions of, don't have access to source code, and aren't allowed to call the people who do and ask them. Perhaps the word seems kind of strong but the only word I can think of to describe this system for customer support is 'stupid.' How could these poor people possibly be expected to support a product when they can't even get in touch with the people who actually work on it? I realize it's a bother for coders to do customer support but it seems like there should at least be a way for customer support people to get the answers to questions that they don't know. Does that really seem unreasonable? From don Wed Jun 27 05:09:11 1990 Date: Wed, 27 Jun 90 05:09:11 -0400 To: NeWS-makers@brillig.umd.edu Subject: scrolling lists in XView - a file dialog From: dufy.mmwb.ucsf.edu!kneller@cgl.ucsf.edu (Don Kneller) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Here seems like an easy project: Create a file open dialog that shows the contents of the current directory and allows selection of a file or directory. If a directory is chosen, show the contents of that directory. If a file is chosen, make it the selected file. I'm trying to use the XView Scrolling List (aka PANEL_LIST panel item) as documented in section 7.9 of the XView programming manual. I'm having the following problems with setting the elements in the list: 1) using xv_set, it is possible to either set a fixed number of strings for the list, or set an indexed string for the list. What I need is a variable number of strings. Something like **argv would have done the trick. To get a variable number of strings, it is necessary to insert one entry for each string. This is painfully slow and causes unnecessary flashing on the screen. Moreover, it is not possible to start with an empty list of entries --- there must be at least one or PANEL_LIST_INSERT dumps core. xv_set(thing, PANEL_LIST_STRINGS, "", (char *) NULL, 0); xv_set(thing, PANEL_LIST_INSERT, i PANEL_LIST_STRING, i, newvalue, 0); 2) to change the entries, it is not possible to change all of them at once. I would have hoped something like: xv_set(thing, PANEL_LIST_STRINGS, (char *) NULL, 0); would have done the trick. Instead it is necessary to delete them one at a time: xv_set(thing, PANEL_DELETE_STRING, i, 0); Again, painfully slow and causes unnecessary screen updates. Surely (you don't mind if I call you "Shirley?") this has been done before. Any help would be appreciated. - don From don Wed Jun 27 05:09:23 1990 Date: Wed, 27 Jun 90 05:09:23 -0400 To: NeWS-makers@brillig.umd.edu Subject: the NeWS ReNaiSSaNCe From: hopkins@poit.Eng.Sun.COM (Don Hopkins) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) I've just started working full time at Sun in the NeWS toolkit group! (In case you thought I was going to accept an internship at PARC this the summer, you can read my posting to alt.drugs.) Since the recent rash of "NeWS is dead" messages, I and several other people have been convinced enough to bet our careers that Sun has completely changed its attitude towards NeWS, and is now totally committed to investing the resources to develop NeWS into its full potential, and doing what has to be done to make it succeed. It's always been darkest before the dawn (puns intentionally avoided). I was pretty depressed a while there myself, but a lot has changed! There have been some *significant* changes to tNt (the NeWS toolkit, aka NDE) and the underlying substratum to make it much smaller and faster, and a lot of work is going into improving the PostScript interpreter. But what's even more important is that there is a real commitment to developing tools and applications for the NeWS toolkit. Since I've started here, I've read the new tNt documentation, and I am very impressed! I've attended a couple of design review sessions, and I am very impressed by the thought and attention everyone puts into speed, size, consistent naming, and learnability for both application writers and subclassers! Then I read the code, and I am very very impressed at how well factored it is, that you can get so much out of so little code! And after all that, I was not surprised but certainly very impressed at how fast it runs! It's not ready yet, but it's *definitily* going to happen, and it'll be *great* when it does! And it will keep getting better, because it's designed to take advantage of the future! -Don From don Wed Jun 27 20:32:43 1990 Date: Wed, 27 Jun 90 20:32:43 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: Color Images From: mcsun!ukc!canon!laukee@uunet.uu.net (David Lau-Kee) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) naughton@wind.Eng.Sun.COM (Patrick Naughton) writes: >OpenWindows Version 3 (next yearish) will have full support for 24 bit >screen and memory rasters. [ ... ] Hmmmm..... does this mean 24 bit framebuffers like the CG9, and maybe the GP2 board will support OpenWindows? If not, can we have the reference port and we'll do it ourselves? ------------- David Lau-Kee Canon Research Centre Europe, 17/20 Frederick Sanger Rd, Surrey Research Park, Guildford, Surrey, GU25YD, UK. NRS: laukee@uk.co.canon, INET: laukee%canon@nsfnet-relay.ac.uk UUCP: laukee@canon.uucp, PATH: ..!mcsun!ukc!uos-ee!canon!laukee Tel: +44 (0) 483 574325 Fax: +44 (0) 483 574360 From don Wed Jun 27 20:32:52 1990 Date: Wed, 27 Jun 90 20:32:52 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: scrolling lists in XView - a file dialog From: byennaco@suneast.East.Sun.COM (Robert Yennaco - Sun BOS Software) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) I ran across a similar problem in SunView, so I'll describe it in those terms and leave it to you to convert it to XView. > 1) using xv_set, it is possible to either set a fixed number of > strings for the list, or set an indexed string for the list. > What I need is a variable number of strings. Something like > **argv would have done the trick. > To get a variable number of strings, it is necessary to insert > one entry for each string. This is painfully slow and causes > unnecessary flashing on the screen. Moreover, it is not possible > to start with an empty list of entries --- there must be at least > one or PANEL_LIST_INSERT dumps core. > xv_set(thing, PANEL_LIST_STRINGS, "", (char *) NULL, 0); > xv_set(thing, PANEL_LIST_INSERT, i > PANEL_LIST_STRING, i, newvalue, > 0); You can set up an attribute list, and make one call to panel_set(). The disadvantage here is that (at least in SunView) you're limited to ATTR_STANDARD_SIZE=256 attributes in the list. Needing 3 per value, means you can bundle only 80 or so values into one panel_set() call, keeping in mind that you still need the list NULL-terminator. To get rid of screen flickering, keep the item's PANEL_SHOW_ITEM attribute to FALSE until you've completed list construction, then set the attribute to TRUE. This scheme might not suffice (performance-wise) if you're dealing with a very large list, but it's better than doing each entry one at a time, and the list can be as long as you want. char *attr[ATTR_STANDARD_SIZE]; int num_attr = 0; for (i=0; i= ATTR_STANDARD_SIZE) { attrs[num_attr+3] = NULL; panel_set(thing, ATTR_LIST, attrs, 0); num_attr = 0; } else num_attr += 3; } /* * If any attribute settings still on attribute buffer, * then send them now. */ if (num_attr) { attrs[num_attr] = NULL; panel_set(thing, ATTR_LIST, attrs, 0); } As you state, a better way is to use a string vector argument (**argv) for PANEL_CHOICE_STRINGS. I tried this long ago, and I recall getting it to work (it was lightning-fast!), but now I can't for the life of me figure out how I did it. The disadvantage here (at least in SunView) is that your list cannot exceed ATTR_STANDARD_SIZE=256 string values. > 2) to change the entries, it is not possible to change all of them > at once. I would have hoped something like: > > xv_set(thing, PANEL_LIST_STRINGS, (char *) NULL, 0); > > would have done the trick. Instead it is necessary to delete > them one at a time: > > xv_set(thing, PANEL_DELETE_STRING, i, 0); > > Again, painfully slow and causes unnecessary screen updates. Try the same scheme as described above. Good luck! -Bob From don Wed Jun 27 20:33:04 1990 Date: Wed, 27 Jun 90 20:33:04 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: Color Images From: wind.Eng.Sun.COM@sun.com (Patrick Naughton) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) |>laukee@canon.co.uk (David Lau-Kee) writes: |> naughton@wind.Eng.Sun.COM (Patrick Naughton) writes: |> |> >OpenWindows Version 3 (next yearish) will have full support for 24 bit |> >screen and memory rasters. |> [ ... ] |> |> Hmmmm..... does this mean 24 bit framebuffers like the CG9, and maybe the GP2 |> board will support OpenWindows? If not, can we have the reference port and |> we'll do it ourselves? |> |> ------------- |> David Lau-Kee |> Canon Research Centre Europe, Remember, I'm just an engineer trying to be helpful with responses to technical questions, for information about exact features and release dates of future releases you should contact you local sales representative. No one really knows exactly what will be in any future release until we ship it... -Patrick ______________________________________________________________________ Patrick J. Naughton ARPA: naughton@sun.com Window Systems Group UUCP: ...!sun!naughton Sun Microsystems, Inc. AT&T: (415) 336 - 1080 From don Wed Jun 27 20:33:17 1990 Date: Wed, 27 Jun 90 20:33:17 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: Color Images From: usc!zaphod.mps.ohio-state.edu!rpi!rodney@ucsd.edu (Rodney Peck II) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) naughton@wind.Eng.Sun.COM (Patrick Naughton) writes: >|>laukee@canon.co.uk (David Lau-Kee) writes: >|> naughton@wind.Eng.Sun.COM (Patrick Naughton) writes: >|> >|> >OpenWindows Version 3 (next yearish) will have full support for 24 bit >|> >screen and memory rasters. >|> [ ... ] >|> >|> Hmmmm..... does this mean 24 bit framebuffers like the CG9, and maybe >the GP2 >|> board will support OpenWindows? If not, can we have the reference port and >|> we'll do it ourselves? >|> >|> ------------- >|> David Lau-Kee >|> Canon Research Centre Europe, >Remember, I'm just an engineer trying to be helpful with responses to >technical questions, for information about exact features and release >dates of future releases you should contact you local sales >representative. No one really knows exactly what will be in any future >release until we ship it... I've been told by Sun not to hold my breath for openwindows support of the cg9. It would be nice if they admitted that they aren't going to use it or if they decided to support it instead of continually hinting and playing guessing games with people who spent thousands of dollars for their products. -- Rodney From don Wed Jun 27 20:33:29 1990 Date: Wed, 27 Jun 90 20:33:29 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: Colors and NeWS From: europa.Eng.Sun.COM!jdn@sun.com (Jeff Nisewanger) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) In article <8aUcIJ600iU_I3jUte@andrew.cmu.edu> fk03+@andrew.cmu.edu (Frank Eugene Kietzke) writes: >I love my boss. I just manage to get the R4 color map installed for X11 >in my sparc station and my boss tells me to switch to NeWS. Fine, it is >a nice server, but the color map is derived from R2. This looks REAL >bad on my monitor. Has anybody succeded in upgrading the color map to >R4 RGB values and names. I tried to translate my rgb.txt into a >colors.ps file, but it came out 1220 entries and from the color >behavior, I think that I overran storage somewhere since the server >still complains that it doesn't know about some of the named colors and >others come out REALLY weird. Is there another file that I should be >twiddling or am I just stuck with the R2 colors? > >------------------------------------------------------------------------- >|Frank Kietzke | That was the "stun" setting, this is not.| >|Carnegie-Mellon University | Lt. Commander Data, | >|Data Communications | STNG, The Ensigns of Command. | >------------------------------------------------------------------------- >| I can hardly speak for myself, let alone for CMU Data Communications | >------------------------------------------------------------------------- When it comes out, the OpenWindows 2.0 server will have a color database derived from the one in R4. Jeff -- Jeff Nisewanger ARPA: jdn@Eng.Sun.COM Window Systems Group UUCP: ...!sun!jdn Sun Microsystems, Inc. 415/336-5743 From don Wed Jun 27 20:33:49 1990 Date: Wed, 27 Jun 90 20:33:49 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: Display lock broken From: europa.Eng.Sun.COM!jdn@sun.com (Jeff Nisewanger) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) In article <6111@helios.TAMU.EDU> skdutta@cs.tamu.edu (Saumen K Dutta) writes: > >>I am plagued by messages, usually when loading large files into the >>server: >> >>Jun 22 14:46:56 apricot Window display lock broken after time limit exceeded >>by pid 1213 >>Jun 22 14:46:56 apricot You may see display garbage because of this action >> >> >>The only garbage I ever see is the message itself, on my console. >> >>Is there a way to disable this feature? > >Sometime back this problem had been addressed in this group. I >don't remember who answered it but it was like: > >%psh >executive >Wlecome to X11/NeWS ........ >statusdict begin >jobtimeout == >15 >60 jobtimeout >jobtimeout == >60 >quit >psh: NeWS server disconnected >-- > _ ||Internet: skdutta@cssun.tamu.edu > ( /_ _ / --/-/- _ ||Bitnet : skd8107@tamvenus.bitnet > __)_/(_____(_/_(_/_(_(__(_/_______ ||Uucp : uunet!cssun.tamu.edu!skdutta > .. ||Yellnet: (409) 846-8803 Different problem. The "display lock" stuff is caused by the SunView compatibility support in the server. SunView has the concept of a display lock during which only one process can draw into the screen's framebuffer. Processes are supposed to get the display lock and then draw something and then release it. Occasionally the server holds the lock too long and the kernel emits the above warning message. This isn't a big deal, but it's annoying to get the messages. There is a way to patch the kernel to increase the default display lock timeout but I don't know off hand what it is. Jeff -- Jeff Nisewanger ARPA: jdn@Eng.Sun.COM Window Systems Group UUCP: ...!sun!jdn Sun Microsystems, Inc. 415/336-5743 From don Thu Jul 5 16:25:23 1990 Date: Thu, 5 Jul 90 16:25:23 -0400 To: NeWS-makers@brillig.umd.edu Subject: OW 2 and %pipe From: eru!luth!sunic!mcsun!ukc!canon!rjf@bloom-beacon.mit.edu (Robin Faichney) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Can anyone tell me what is going on here? camille% psh dex Welcome to X11/NeWS Version 1.0 (%pipe echo hello) (r) file 20 string readline { print } if hello camille% psh dex Welcome to X11/NeWS Version 2 (Beta) (%pipe echo hello) (r) file 20 string readline { print } if ***ERROR*** Process: 0x328088 (camille client) Error: undefinedfilename Stack: (%pipe echo hello) (r) Executing: 'file' At: Reading file(?,W,R) It looks like %pipe doesn't work anymore. Is this a bug, or has %pipe been dropped; in either case, what is the alternative? -- Robin Faichney, Canon Research Centre Europe Ltd, NRS: rjf@uk.co.canon 17-20 Frederick Sanger Road, ARPA: rjf@canon.co.uk Surrey Research Park, Guildford. GU2 5YD UUCP: rjf@canon.uucp Tel (+44)||(0) 483 574325 Fax (+44)||(0) 483 574360 From don Thu Jul 5 16:25:28 1990 Date: Thu, 5 Jul 90 16:25:28 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: OW 2 and %pipe From: ronin.Eng.Sun.COM!ronin@sun.com (Brian Raymor) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) In article <1990Jun28.090832.22020@canon.co.uk>, rjf@canon.co.uk (Robin Faichney) writes: > > It looks like %pipe doesn't work anymore. Is this a bug, or > has %pipe been dropped; in either case, what is the alternative? > -- There is a new pipe extension. Here is a description from the NeWS 2.1 Programmer's Guide (Revision 50, of 23 February 1990) : command pipe => rfile wfile Executes the utility whose name is command. The input for command can be provided with writes on the wfile object. The output from command can be read from the rfile object. The wfile object is normally removed from the stack if command does not expect input. Popping either object is sufficient to close that portion of the connection. If a two-way, read-write connection is established, it is good practice to close the wfile before consuming command's output via rfile to overcome potential buffering problems. Your example would be rewritten as : (echo hello) pipe % rfile wfile pop % rfile 20 string readline { print } if Brian Raymor NeWS Technology Group From don Thu Jul 5 16:25:40 1990 Date: Thu, 5 Jul 90 16:25:40 -0400 To: NeWS-makers@brillig.umd.edu Subject: Job opportunity From: fajita!sangria!doc@suntan.West.Sun.COM (Tom Dockery) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Market Focus Technologies, a software firm of about a dozen people in Carlsbad (San Diego county) California is looking for a new member of the software development team. This individual will be working in the on-going development of a leading edge applications/interface development environment. Qualified applicants should be experienced in C and UNIX, with familiarity with either NeWS or X Window System (shudder) development, and have a BS or equivalent degree. Other areas that will increase our interest in you are experience with XView (OpenLook) or Motif toolkits; C++, Objective C, or other OOP environment; 4GL/non-procedural programming; business graphics; PostScript; or mainframe connectivity. If you are located in the San Diego area, and are interested in this position, please send me a copy of your resume, references, and requirements via email, fax, or snail-mail. Tom Dockery {...}scripps.edu!mfti!doc or {...}sun!suntan!fajita!doc VOX 619 431-9495 FAX 619 431-9497 Market Focus Technologies, Inc. 5964 LaPlace Ct., Ste. 100 Carlsbad CA 92008 From don Thu Jul 5 16:25:45 1990 Date: Thu, 5 Jul 90 16:25:45 -0400 To: NeWS-makers@brillig.umd.edu Subject: Help with NeWS/PostScript/C From: gistdev!andy@uunet.uu.net (Andy Warinner) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) I have been struggling with the world of NeWS/PostScript on a Silicon Graphics Personal Iris. I am trying to develop a program written in C and C++ whose interface uses the NeWS/PostScript user interface. The SGI documentation does not have a good introduction to NeWS and how to incorporate it with C programs. So wise people out there in netland, I would greatly appreciate pointers to: - good introductory texts to NeWS - any experiences, hints, sage advice on integrating C and NeWS/PostScript - C++ class libraries to control the NeWS interface (I know it's a long shot but I'll give it a try :-) Thanks in advance! Andrew Warinner | "Semper ubi sub ubi" - J. Caesar GIST, Inc. | Standard | EMAIL: andy@gistdev.gist.com disclaimer... | {uunet, uiucuxc}!gistdev!andy From don Thu Jul 5 17:04:13 1990 Date: Thu, 5 Jul 90 17:04:13 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: scrolling lists in XView - a file dialog From: dufy.mmwb.ucsf.edu!kneller@cgl.ucsf.edu (Don Kneller) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) kneller@dufy.mmwb.ucsf.edu (Don Kneller) writes: >Here seems like an easy project: > Create a file open dialog using scrolling lists. >I'm having the following problems with setting the elements in the list: > 1) using xv_set, it is possible to either set a fixed number of > strings for the list, or set an indexed string for the list. > What I need is a variable number of strings. Something like > **argv would have done the trick. Thanks to everyone that responsed to my posting. It turns out that it is possible to pass argv-style attributes with the ATTR_LIST attribute and an attribute-value list (avlist) which is NULL-terminated. If I have strings STRING_1 through STRING_N which I want to be the strings in the scrolling list, I set up an avlist with the following: argv[0] = PANEL_LIST_STRINGS; argv[1] = STRING_1; ... argv[N] = STRING_N; argv[N+1] = NULL; /* NULL-terminate the strings */ argv[N+2] = NULL; /* NULL-terminate the avlist */ Setting this scrolling-list's set of strings is done with one call to xv_set: xv_set(thing, ATTR_LIST, argv, NULL); In what I consider an XView bug, if you use this to try to change the strings to a different set, and the new set has fewer members than the old set, the extra members from the old set will remain. Thus it is necessary to delete the extra members. Again, an avlist can be used to reduce the calls to xv_set(). NOTE: A SunView programmer has told me that there is a limit on the length of the avlist of about (I think) 250 elements. I don't know if that is the case with XView. Here is the routine I use to update a scrolling list: /* * scrolling_list_update: * * Given a scrolling list and an argv-style array of strings, * update the contents of the scrolling list. */ scrolling_list_update(list, argc, argv) Xv_opaque list; int argc; char **argv; { register int i, j; char **avlist; int rows = xv_get(list, PANEL_LIST_NROWS); /* * Copy the string information to an avlist. */ if (argc > 0) { /* * Allocate memory for the list and fill it in. */ avlist = (char **) emalloc((argc + 3) * sizeof (char *)); avlist[0] = (char *) PANEL_LIST_STRINGS; for (i = 0; i < argc; i++) avlist[i + 1] = argv[i]; avlist[++i] = (char *) NULL; /* NULL-terminate strings */ avlist[++i] = (char *) NULL; /* NULL-terminate avlist */ /* * Set the scrolling list and free the avlist. */ xv_set(list, ATTR_LIST, avlist, NULL); free((char *) avlist); } /* * This should not be necessary, but ... clear any entries * in excess of the new entries. */ if (rows > argc) { /* * Set up an avlist with PANEL_LIST_DELETE,index pairs. The * panel entries are deleted from bottom (high index) to * top (low index) which might reduce copying of entries. */ avlist = (char **) emalloc(((rows-argc)*2+1) * sizeof (char *)); for (j = 0, i = rows - 1; i >= argc; i--) { avlist[j++] = (char *) PANEL_LIST_DELETE; avlist[j++] = (char *) i; } avlist[j] = (char *) NULL; /* NULL-terminate avlist */ /* * Delete the excess entries and free the avlist. */ xv_set(list, ATTR_LIST, avlist, NULL); free((char *) avlist); } } From don Thu Jul 5 17:04:18 1990 Date: Thu, 5 Jul 90 17:04:18 -0400 To: NeWS-makers@brillig.umd.edu Subject: GoodNeWS, HyperNeWS on SGI, FFT From: mcsun!unido!tub!fauern!tumuc!lan!LRZSUN4_7.lrz.de!uh311ae@uunet.uu.net Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Hi, I have to do physics work (STM data) on a SGI and would like to use GoodNeWS1.3 and HyperNeWS1.3. Does anyone have experience with the stability of these systems or some installation hints, if necessary ? How good is HyperNeWS without prolog ? BTW, I need image proc software (FFT) ... Thank You very much Henrik Klagges From don Thu Jul 5 17:18:52 1990 Date: Thu, 5 Jul 90 17:18:52 -0400 To: NeWS-makers@brillig.umd.edu Subject: Colormap installation by X server - XView From: dufy.mmwb.ucsf.edu!kneller@cgl.ucsf.edu (Don Kneller) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) I have an application with both NeWS (for display) and X (for dialog) windows. I install a color map when the pointer enters the NeWS windows. However, *the server* installs a color map when the pointer enters the X windows. This leads to unnecessary flashing of the display. Question: Can I prevent the server from automatically installing a color map? Note: It appears that the server decides to switch the color map only for FRAMES that contain a PANEL, but I don't know why this is. Any help would be greatly appreciated. - don From don Thu Jul 5 17:18:55 1990 Date: Thu, 5 Jul 90 17:18:55 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: the NeWS ReNaiSSaNCe From: mcsun!unido!fauern!tumuc!lan!LRZSUN4_7.lrz.de!uh311ae@uunet.uu.net Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Hearing talk about a 'You see here a NeWS corpse' and such makes me think ... It may sound crazy to give NeWS away for free, but if someone takes a look at the big software standards today, you see something like NFS, X, TCP/IP or UNIX, all of which are (or were) freely available. If good stuff is on the net, everyone will use it, improve it or fix bugs (Hello 1.1) - which is very useful ! It would be a real biggie to swap X and NeWS, wouldn't it ? At least I haven't seen a MiCS on X so far, and I guess they have a long way to go for it (XR20). Sun makes its money from hardware, anyway. Henrik Klagges (Postscript fonts are cracked by now, I hear 8) From don Thu Jul 5 17:19:03 1990 Date: Thu, 5 Jul 90 17:19:03 -0400 To: NeWS-makers@brillig.umd.edu Subject: Selections question From: mcsun!ukc!canon!rjf@uunet.uu.net (Robin Faichney) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) I've been looking into using the selection stuff and have ended up fairly mind-boggled. The problem is that what I want to do is (I guess) very simple, and I'm not keen on investing the effort to really get to grips with this stuff right now. What I want to do is make a text label selectable so that the contents can be pasted into a termulator. I guess the way to do it would be to use StringSelection, which I've tried, getting nowhere. As I say, I think it should be really simple. If some kind and clever person was good enough to put together and post an example of a class which did this, I think it would be highly educative. (Not to mention solving my problem!) Of course, if it's not that easy, I'll just have to RTFM! :-( -- Robin Faichney, Canon Research Centre Europe Ltd, NRS: rjf@uk.co.canon 17-20 Frederick Sanger Road, ARPA: rjf@canon.co.uk Surrey Research Park, Guildford. GU2 5YD UUCP: rjf@canon.uucp Tel (+44)||(0) 483 574325 Fax (+44)||(0) 483 574360 From don Thu Jul 19 02:09:52 1990 Date: Thu, 19 Jul 90 02:09:52 -0400 To: NeWS-makers@brillig.umd.edu Subject: SunFlash:19.10 PR: Frame & OPEN LOOK From: lugs@Sun.COM (Miyong Byun, User Programs) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) ---------------------------------------------------------------------------- FRAME ANNOUNCES FRAMEMAKER SUPPORT FOR OPEN LOOK UNDER NeWS SunFLASH Vol 19 #10 July 1990 ---------------------------------------------------------------------------- The following announcement was made by Frame on July 5, 1990. SAN JOSE, CA-July 5, 1990-Frame Technology Corporation today TM announced that its FrameMaker workstation publishing software TM TM will support the OPEN LOOK graphical user interface on SPARCstation workstations made by Sun Microsystems, Inc. TM TM Frame's OPEN LOOK products will run under NeWS, Sun's Network- extensible Window System, which excels at high-quality text and graphics. The most recent release of Frame's software, FrameMaker 2.1, provides full-featured word-processing, graphics, layout, equation editing, and book-building tools for creating a wide range of business and technical documents. OPEN LOOK is a sophisticated, yet easy-to-use interface designed by AT&T and Sun. OPEN LOOK gives applications a uniform "look and feel" across multiple platforms through consistent graphical metaphors, pop-up windows, and point-and-click mouse controls. NeWS is a flexible, network-based window system built on the PostScript imaging model. A key advantage of NeWS to Frame is that it will allow FrameMaker users to view an exact on-screen representation of their final output, which is critical to achieving high-quality documents. "Our decision to support OPEN LOOK and NeWS was based on the growing demand for these standards expressed by our large Sun customer base, and the particular advantages OPEN LOOK and NeWS offer for developing very high-quality publishing products," said Paul R. Robichaux, Frame's president and CEO. According to Scott McNealy, Sun Microsystems' president and CEO, "Frame's commitment to the OPEN LOOK and NeWS standards will give their products a competitive edge in the marketplace." Since OPEN LOOK was introduced in April 1988, more than 8,000 software vendors have been working with the OPEN LOOK toolkit. There are currently 52 OPEN LOOK applications being shipped by 38 vendors. The OPEN LOOK version of FrameMaker will ship in 1991. Versions TM TM of FrameMaker are currently available for Sun-3, Sun 386i, and TM TM SPARC workstations running under SunView, X Windows, and the TM OpenWindows Application Environment. Sun Microsystems, Inc., headquartered in Mountain View, Calif., is a leading worldwide supplier of network-based distributed computing systems, including professional workstations, servers, and UNIX" operating system and productivity software. Frame is a leading supplier of workstation publishing software for creating business and technical documents.Versions of its FrameMaker software are available for multiple user interfaces and more than 25 different computer platforms. Frame markets its products worldwide through distributors, VARs, OEMs, and directly to end-users. The privately held company is located at 1010 Rincon Circle, San Jose, California 95131 USA. Press Contacts: Frame Technology Sun Microsystems Kristin Vais Nancy Groves (408) 433-3311 (415) 336-6411 Frame Technology Corporation FrameMaker and Frame Technology are registered trademarks, and Frame is a trademark of Frame Technology Corporation. OPEN LOOK is a trademark and UNIX is a registered trademark of AT&T. NeWS is a registered trademark of Sun Microsystems, Inc.SPARCstation, Sun-3, Sun 386i, SunView, and OpenWindows are trademarks of Sun Microsystems, Inc. SPARC is a trademark of SPARC International. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Sunflash is an electronic mail news service from Sun Microsystems, Ft. Lauderdale, Florida, USA. It is targeted at Sun Users and Customers. As a field sales and support office, we try to keep SunFlash useful and interesting to you. If you have any comments or suggestions for enhancing SunFlash, please send them to us. SunFlash is ditributed via a hierarchy of aliases. Please try to address change requests to the owner of the alias that you belong to. Please address comments to the SunFlash editor John McLaughlin (sun!sunvice!flash or flash@sunvice.East.Sun.COM). (305) 776-7770. From don Thu Jul 19 02:41:20 1990 Date: Thu, 19 Jul 90 02:41:20 -0400 To: NeWS-makers@brillig.umd.edu Subject: awaitevent in NeWS 2.0 From: smc%infidel@LANL.GOV (Susan Coghlan) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Help! Does anyone know why awaitevent would NOT block a process until an event was received? for instance in the section of code below: createevent dup /Name /SPDone put expressinterest { awaitevent dup /Name get /SPDone eq {exit}{pop}ifelse } loop this crashes on " /Name get " because there is no event on the stack! In fact, the event in which interest had been expressed hadn't even occurred when it crashed. Ok, so something weird is happening - let's check the type of the top item on the stack after awaitevent, print it's type, and then loop until an event is left on it. Here's the code: createevent dup /Name /SPDone put expressinterest { awaitevent % generate a message to the message window dup type 20 string cvs (Type: ) exch append (Event Received) 2 SendMessage % check type of event and exit the loop if the % right event dup type /eventtype eq { dup /Name get /SPDone eq {exit}{pop}ifelse } if } loop so what happens? Not quite what you'd expect: before the sendevent code is executed a message is received: Event Received Type: Integer and then nothing - no more messages, doesn't exit the loop, it just hangs - as if awaiting an event - even though you send the correct event several times.... Any ideas? Other loops of this type seem to work at various other places in the code......... Susan Coghlan smc@infidel.lanl.gov From don Thu Jul 19 02:42:03 1990 Date: Thu, 19 Jul 90 02:42:03 -0400 To: NeWS-makers@brillig.umd.edu Subject: MacDraw in NeWS From: agate!bionet!uwm.edu!cs.utexas.edu!helios!cs.tamu.edu@ucbvax.Berkeley.EDU (Saumen K Dutta) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Has anybody out there implemented something similar to MacDraw in NeWS. I know such a thing exist in GoodNeWS, but I need an implementation on Litewin package. I am thinking of writing such a thing for myself . I thought it might be a good idea to use somebody else's if it is available. If you have written such a package and willing to share with me send a mail. Don't worry it is purely for non-commercial ..... Thanks S.K. Dutta -- _ ||Internet: skdutta@cssun.tamu.edu ( /_ _ / --/-/- _ ||Bitnet : skd8107@tamvenus.bitnet __)_/(_____(_/_(_/_(_(__(_/_______ ||Uucp : uunet!cssun.tamu.edu!skdutta .. ||Yellnet: (409) 846-8803 From don Thu Jul 19 02:42:15 1990 Date: Thu, 19 Jul 90 02:42:15 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: MacDraw in NeWS From: swrinde!cs.utexas.edu!helios!cs.tamu.edu@ucsd.edu (Saumen K Dutta) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) In my last article I requested for a package like Macdraw in NeWS. I forgot to mention that I need one which works on openwindows. Thanks S.K. Dutta -- _ ||Internet: skdutta@cssun.tamu.edu ( /_ _ / --/-/- _ ||Bitnet : skd8107@tamvenus.bitnet __)_/(_____(_/_(_/_(_(__(_/_______ ||Uucp : uunet!cssun.tamu.edu!skdutta .. ||Yellnet: (409) 846-8803 From don Thu Jul 19 02:43:12 1990 Date: Thu, 19 Jul 90 02:43:12 -0400 To: NeWS-makers@brillig.umd.edu Subject: What is needed in a "shell"-program From: eru!luth!sunic!dkuug!resam!andrew@bloom-beacon.mit.edu (Leif Andrew Rump) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) We want to use _standard_ OpenLook from Sun as mush as possible - i.e. no reprogramming if the functionallity that is already there may be used even if it requires minor changes of the project. What I want to do is change the .openwin-menu-file so our applications may be started easily. But my applications don't seem to start! If I write: ... "RESAM" MENU "OpenLook..." POSTSCRIPT XVIEWHOME \ (/home0/acct/andrew/X/OpenLook/OpenLook) \ append runprogram "RESAM" END ... Then nothing happens, but if I write: ... "RESAM" MENU "OpenLook..." POSTSCRIPT XVIEWHOME \ (/bin/xview/cmdtool \ /home0/acct/andrew/X/OpenLook/OpenLook) \ append runprogram "RESAM" END ... The commandtool window pops up and starts my XView/OpenLook-application. Conclusion: I must be missing something that shell-programs like: sh and csh should do - what? (It's probably very simple I know!) Leif Andrew Rump, AmbraSoft A/S, Stroedamvej 50, DK-2100 Copenhagen OE, Denmark UUCP: andrew@ambra.dk, phone: +45 39 27 11 77 / Currently at Scandinavian Airline Systems =======/ UUCP: andrew@resam.dk, phone: +45 32 32 22 79 \ SAS, RESAM Project Office, CPHML-V, P.O.BOX 150, DK-2770 Kastrup, Denmark > > Read oe as: o / (slash) and OE as O / (slash) < < From don Thu Jul 19 02:43:31 1990 Date: Thu, 19 Jul 90 02:43:31 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: What is needed in a "shell"-program From: wind!naughton@sun.com (Patrick Naughton) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) I think what you want is the following: "RESAM" MENU "OpenLook..." /home0/acct/andrew/X/OpenLook/OpenLook "RESAM" END By using the POSTSCRIPT keyword, you were trying to use NeWS operators to prepend the default location of the XView tools to the path of the executable you wanted to run, so xnews was trying to fork: ${XVIEWHOME}/home0/acct/andrew/X/OpenLook/OpenLook which is not what you wanted. -Patrick In article <1990Jul11.144108.2220@resam.dk>, andrew@resam.dk (Leif Andrew Rump) writes: |> We want to use _standard_ OpenLook from Sun as mush as possible - i.e. |> no reprogramming if the functionallity that is already there may be |> used even if it requires minor changes of the project. What I want to |> do is change the .openwin-menu-file so our applications may be started |> easily. But my applications don't seem to start! |> |> If I write: |> ... |> "RESAM" MENU |> "OpenLook..." POSTSCRIPT XVIEWHOME \ |> (/home0/acct/andrew/X/OpenLook/OpenLook) \ |> append runprogram |> "RESAM" END |> ... |> Then nothing happens, but if I write: |> ... |> "RESAM" MENU |> "OpenLook..." POSTSCRIPT XVIEWHOME \ |> (/bin/xview/cmdtool \ |> /home0/acct/andrew/X/OpenLook/OpenLook) \ |> append runprogram |> "RESAM" END |> ... |> The commandtool window pops up and starts my XView/OpenLook-application. |> Conclusion: I must be missing something that shell-programs like: sh and |> csh should do - what? (It's probably very simple I know!) |> |> Leif Andrew Rum ______________________________________________________________________ Patrick J. Naughton ARPA: naughton@sun.com Window Systems Group UUCP: ...!sun!naughton Sun Microsystems, Inc. AT&T: (415) 336 - 1080 From don Thu Jul 19 02:43:56 1990 Date: Thu, 19 Jul 90 02:43:56 -0400 To: NeWS-makers@brillig.umd.edu Subject: Hunh? From: hbo!bice (Brent A. Bice) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) I've got a strange question. I have a window that has a menu. One menu entry I want to have a function that will spawn a completely independent window. When the main window gets Zap'd, it should go away, but not kill the window/s that it spawned. I have a piece of code that does this, but the main window won't die until all of the other window/s that it spawned also are zapped. Howcomeforwhy? Am I missin' somethin' here? /MainDict /ThisIsIt def % Make a window with a new processgroup and a clean environment. /makewin { { % Clean up dictionary stack { currentdict /MainDict known { exit } if end } loop clear % clean up regular stack newprocessgroup framebuffer /new LiteWindow send dup /reshapefromuser exch send /map exch send } fork pop } def % Here's the main window. It has a menu entry that merely calls makewin. framebuffer /new LiteWindow send dup { /ClientMenu [ (MAKEWIN) { makewin } ] /new DefaultMenu send def } exch send dup /reshapefromuser exch send /map exch send From don Thu Jul 19 02:45:01 1990 Date: Thu, 19 Jul 90 02:45:01 -0400 To: NeWS-makers@brillig.umd.edu Subject: HELP! NeWS 1.1 Problem From: cs.utexas.edu!texbell!vector!egsner!ntpal!herrage@tut.cis.ohio-state.edu (Robert Herrage) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) I'm having a NeWS 1.1 problem that I can't seem to solve. I have two instances of the same client application running. Each has its own window. I have the windows positioned such each takes up approximately 2/3 of the screen. Instance 1 takes up the left 2/3 while Instance 2 takes up the right 2/3 and is on top of Instance 1. Each instance has several canvases on them with menus tied to them. These canvases are children of the ClientCanvas. After a while, the windows go off into limbo. They are there, but you can't do anything with them. The children canvases, however, are still active and I can access the menus. "printf" statements in my client applications show that the data to be sent back from selecting my menu items (done by printing characters via "print") across the PostScript socket is being sent. My WHILE loop calls "psio_eof" and "psio_error" but no error are ever encountered. I have "pause" state- ments everywhere just in case the NeWS Server might have been causing this because I was trying to do too much at one time. Doing a "ps -ax | grep " shows that the two applications are still running. Also, if I kill the two application instances, the limbo-ed win- dows still remain on the screen. What gives? ANY help on this would be greatly appreciated! Thanks, Robert From don Wed Jul 25 04:08:53 1990 Date: Wed, 25 Jul 90 04:08:53 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: windows in limbo From: hbo!bice (Brent A. Bice) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) >After a while, the windows go >off into limbo. They are there, but you can't do anything with them. The >children canvases, however, are still active and I can access the menus. Hmmm... Are you using the FrameInterests dictionary in the window subclass to put the interests for your menus on the child canvases in? If so, perhaps you are stepping on the Window's interests. If not, perhaps you are killing FrameEventMgr somehow?? Try putting in a "dbgbreak" call and look at the FrameEventMgr variable in your window. That's the process that handles all the events for a LiteWindow. See if it's running still. You can also look at the FrameInterests to make sure they are still intact. Do the windows go "off into limbo" after a particular sequence of events? Can you reproduce the problem consistently with the same actions on the users part??? Brent Bice Applied Computing Systems 2075 Trinity Drive Suite Lower Level Los Alamos, NM 87544 Voice:(505) 662-3309 Fax:(505) 662-3518 bice@atlantis.ees.anl.gov % I program, therefore I am. From don Wed Jul 25 04:09:05 1990 Date: Wed, 25 Jul 90 04:09:05 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: Hunh? From: mcsun!ukc!canon!laukee@uunet.uu.net (David Lau-Kee) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) bice@hbo.UUCP (Brent A. Bice) writes: ... >entry I want to have a function that will spawn a completely independent >window. When the main window gets Zap'd, it should go away, but not kill >the window/s that it spawned. I have a piece of code that does this, but >the main window won't die until all of the other window/s that it spawned >also are zapped. Howcomeforwhy? Am I missin' somethin' here? Yeah, I found this too. I never did get round to understanding what was happening, but I worked around using a separate file and runprogram (which is actually closer to the semantics I want anyway). Something like: /buttoncallback { /graphic exch send /thing exch send { (Images) { /spawnimagebrowser self send } (Book) { /spawnbook self send } (Viewer) { /spawnviewer self send } ... } case } def /spawnimagebrowser { (/usr/vpl/demo/imagebr.ps) runprogram } def ------------- David Lau-Kee Canon Research Centre Europe, 17/20 Frederick Sanger Rd, Surrey Research Park, Guildford, Surrey, GU25YD, UK. NRS: laukee@uk.co.canon, INET: laukee%canon@nsfnet-relay.ac.uk UUCP: laukee@canon.uucp, PATH: ..!mcsun!ukc!uos-ee!canon!laukee Tel: +44 (0) 483 574325 Fax: +44 (0) 483 574360 From don Wed Jul 25 04:09:24 1990 Date: Wed, 25 Jul 90 04:09:24 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: Hunh? (locked send contexts) From: booga.Eng.Sun.COM!siegel@sun.com (Josh Siegel) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) In article <1990Jul19.153846.1586@canon.co.uk> laukee@canon.co.uk (David Lau-Kee) writes: >bice@hbo.UUCP (Brent A. Bice) writes: > >... >>entry I want to have a function that will spawn a completely independent >>window. When the main window gets Zap'd, it should go away, but not kill >>the window/s that it spawned. I have a piece of code that does this, but >>the main window won't die until all of the other window/s that it spawned >>also are zapped. Howcomeforwhy? Am I missin' somethin' here? Below is the code: /MainDict /ThisIsIt def % Make a window with a new processgroup and a clean environment. /makewin { { % Clean up dictionary stack { currentdict /MainDict known { exit } if end } loop clear % clean up regular stack newprocessgroup framebuffer /new LiteWindow send dup /reshapefromuser exch send /map exch send } fork pop } def % Here's the main window. It has a menu entry that merely calls makewin. framebuffer /new LiteWindow send dup { /ClientMenu [ (MAKEWIN) { makewin } ] /new DefaultMenu send def } exch send dup /reshapefromuser exch send /map exch send Problems, A send command locks the DictStack so that you cannot "end" your way into a class dictionary. Under NeWS 2.0, this generates a dict_underflow error. Under some other versions of NeWS, I think this fails silently (I don't remember which ones). The proper solution is to replace: { currentdict /MainDict known { exit } if end } loop with clearsendcontexts and get rid of the /MainDict noise. --josh From don Tue Jul 31 14:45:47 1990 Date: Tue, 31 Jul 90 14:45:47 -0400 To: NeWS-makers@brillig.umd.edu Subject: twm and x-emacs in xnews-land From: bic@cgl.ucsf.edu (Bruce Cohen) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) I am converting from MIT X11R4 Xsun to Sun xnews (OpenWindows 2.0) as my X server. I am continuing to use MIT's twm as my window manager. I have noticed a few minor problems: 1) Window Titles do not get "Squeezed" despite the Squeeze in my .twmrc. 2) The meta keys are not recognized. I was able to fix this by adding an xmodmap (add mod1 = Meta_L Meta_R) to my .xinitrc 3) The function keys (F1-F12) do not respond to a global-set-key in GNU Emacs. e.g. (global-set-key "\e[224z" 'call-last-kbd-macro) ;; F1 (global-set-key "\e[225z" 'start-kbd-macro) ;; F2 (global-set-key "\e[226z" 'end-kbd-macro) ;; F3 These worked before. Comments, solutions will be appreciated. -Bruce Bruce Cohen | UUCP: ..ucbvax!ucsfcgl!bic Computer Graphics Lab, S-926 | INTERNET: bic@cgl.ucsf.edu University of California | BITNET: bic@ucsfcgl San Francisco, CA 94143-0446 | VOICE: (415) 476-8291 From don Tue Jul 31 14:46:28 1990 Date: Tue, 31 Jul 90 14:46:28 -0400 To: NeWS-makers@brillig.umd.edu Subject: Finding xnews version outside xnews? From: mcsun!ukc!strath-cs!turing.ac.uk!news@uunet.uu.net (Jim Rudolf) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) For configuration purposes I'm trying to find out what version of xnews a machine has from within a shell script. I tried something like the following line, but I got an error message voicing xnews's displeasure: morlich% xnews 'version =' Process: 0x1b9094 (Unnamed process) Error: unimplemented Stack: Executing: 'version' At: Reading file(?,R) Sic transit gloria PostScript Using the -init flag and/or double quotes didn't seem to help. In fact, I always get the "Sic.." line, for example: morlich% xnews '2 3 add =' 5 Sic transit gloria PostScript BTW, I'm running OpenWindows1.0.1. So my questions are: a) Why am I having trouble passing PostScript as an arg to xnews? b) Is there an alternate way to find out the version? Thanks for the help, -- Jim -- ----------------------------------------------------------------------------- Jim Rudolf The Turing Institute rudolf@turing.ac.uk From don Tue Jul 31 14:47:01 1990 Date: Tue, 31 Jul 90 14:47:01 -0400 To: NeWS-makers@brillig.umd.edu Subject: colour images From: Dave Love Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) I would like to do what buildimage and imagecanvas do, but to produce a colour image. I naively assumed that if I used buildimage with an 8-bit image I would see the 256 colours of the colormap. Instead I see >=13 levels of grey (it's difficult to distinguish the blacker ones). Presumably one could at least get colour by hacking the relevant entries in the colormap in principle, but the server tends to fall over when I poke about in that area so I'm not inclined to experiment much. Can anyone tell me the approved way to do such a thing, solutions in color being equally as acceptable as those in colour? (This is in NeWS 2.0.) -------------------------------------------------------------------- #include Snail mail: | JANET: d.love@uk.ac.dl Dr. David Love, | modern BIT/INTERNET: d.love@dl.ac.uk SERC Daresbury Laboratory, | old UUCP: ...!ukc!daresbury!d.love Warrington WA4 4AD, | alternative BITNET: d.love%dl@ukacrl UK | alternative ARPA: d.love%dl@nsfnet-relay.ac.uk 'Phone: (+44/0)925 603479, Telex: ...925 629609, FAX: ...925 603173 From don Tue Jul 31 14:47:07 1990 Date: Tue, 31 Jul 90 14:47:07 -0400 To: NeWS-makers@brillig.umd.edu Subject: Re: Finding the version of OpenWindows From: unmvax!pprg.unm.edu!siegel@ucbvax.Berkeley.EDU (Josh Siegel) Sender: NeWS-makers-request@brillig.umd.edu (Don Hopkins) Subject: Re: Finding xnews version outside xnews? Summary: no version primitive Expires: Sender: Followup-To: comp.windows.news Organization: Sun Microsystems, Mt. View, Ca. Keywords: hack, version, primitive In article <1990Jul22.135206.455@postmaster@turing.ac.uk> rudolf@morlich.turing.ac.uk (Jim Rudolf) writes: >For configuration purposes I'm trying to find out what version >of xnews a machine has from within a shell script. I tried something >like the following line, but I got an error message voicing xnews's >displeasure: > >morlich% xnews 'version =' >Process: 0x1b9094 (Unnamed process) Error: unimplemented version is defined in (NeWS/basics.ps) and is not a PostScript primitive. > >Using the -init flag and/or double quotes didn't seem to help. > >BTW, I'm running OpenWindows1.0.1. >So my questions are: > a) Why am I having trouble passing PostScript as an arg to xnews? OpenWindows 1.0.x does not take a '-init' option % xnews '2 2 add ==' OpenWindows 2.x does % xnews -init '2 2 add ==' > b) Is there an alternate way to find out the version? $OPENWINHOME/bin/xnews -help |& grep "-init" And then look at the status... :-) You also can: egrep "^/version" $OPENWINHOME/etc/NeWS/basics.ps | sed -e 's/^.*(\(.*\)).*$/\1/g' Hope this helps. > -- Jim Josh Siegel siegel@sun.com -- Josh Siegel (siegel@hc.dspo.gov) Friends don't let Friends eat Cherry Zingers