Path: utzoo!attcan!uunet!husc6!bloom-beacon!ATHENA.MIT.EDU!swick From: swick@ATHENA.MIT.EDU (Ralph R. Swick) Newsgroups: comp.windows.x Subject: Re: More Text Widget Questions Message-ID: <8812281330.AA22550@LYRE.MIT.EDU> Date: 28 Dec 88 13:30:45 GMT References: <8812222359.AA01399@thelake.cray.com> Sender: daemon@bloom-beacon.MIT.EDU Organization: DEC/MIT Project Athena Lines: 26 Date: Thu, 22 Dec 88 17:59:57 CST From: jlf@earth.cray.com (John Freeman) In all of these, I am using an AsciiDiskWidget to display a file. Question 1: I would like to select a line with the mouse, and figure out what line number that is in the file. How? Not supported by Xaw yet. The basic machinery is in place, however. XtTextGetInsertionPoint or XtGetValues on XtNinsertPosition will tell you the character position of the caret, but not the line number. Question 2: Related to number 1, given a line number in the file, how do I display that part of the file, ie. linenumber -n to linenumber +n? Again, not supported by Xaw. Character positions, yes (via XtSetValues on XtNdisplayPosition), but not line numbers. Question 3: How do I change the source file name? I want to display a different file without exiting. I don't want to change (edit) the current file, I want to display a different file. XtDiskSourceCreate followed by XtTextSetSource. The "proper" way to accomplish this (XtSetValues on XtNfile) doesn't yet work.