Path: utzoo!attcan!uunet!lll-winken!ames!mailrus!husc6!rice!sun-spots-request From: jao@megatest.uucp (John Oswalt) Newsgroups: comp.sys.sun Subject: Sunview question Message-ID: <1213@clint.megatest.UUCP> Date: 25 Jan 89 07:13:19 GMT Sender: usenet@rice.edu Organization: Megatest Corporation, San Jose, Ca Lines: 26 Approved: Sun-Spots@rice.edu Original-Date: 18 Jan 89 21:28:37 GMT X-Sun-Spots-Digest: Volume 7, Issue 119, message 11 of 13 I have a subwindow in which I display text output from a program, and in which I echo characters typed by the user. I do various cooking on these characters before sending them to the program. I would like this subwindow to be a TEXTSW, but apparently I cannot recieve ascii events from a TEXTSW, so I have made it a CANVAS. I can get events from the canvas, cook the characters in an internal buffer, and use pw_char to display the text in the canvas. The problem with this is that I have had to write a hell of a lot of code to insert characters, maintain a cursor, move it around, grow the pixwin as the text in it grows, etc. All stuff that TEXTSWs do for free. I would like to support full selection service stuff in this subwindow, but this is very hard, because while I can get the pixels for any location in the canvas, I don't know what characters they represent. I only know the characters which are in the current line (my cooking buffer). It has also proved difficult to handle long lines of entered text, because wrapping lines causes headaches. I am now to the point where I an willing to re-write a lot of code in order to make this subwindow a TEXTSW like it really should be, but getting events is still critical. Is there a way to overlay a TEXTSW with a CANVAS so sunview will handle the character display in the TEXTSW, but I can still get events from the canvas? Or, is there a way to get events from TEXTSWs? Is this a sun bug? John Oswalt (..!sun!megatest!jao)