paul@vixie.UUCP (Paul Vixie Esq) (02/18/88)
A client wants to use a paned Xtk window wherein one of the panes has a TTY- like feel to it. This means that the application should be able to write a prompt (with fprintf() if possible), and that when the focus is in that pane, the cursor will sit at the end of the last line; characters typed will be added to the end of the line; normal ^H/DEL/^W processing should be performed; when RETURN is pressed, an event or callback is made and the application can get at the whole line at once. If a full-blown text widget window is used (a la XMH), it seems impossible to get the callback when Return is pressed, and there is nothing to stop the user from deleting the prompt or moving all over the window if they want to. (Note that scrolling backward is desirable, and even modifying previous lines and "re-sending" them is okay, since the application can filter out the prompt when it gets a line back.) I can see several ways to do this -- but none of them are easy or clean. I'm thinking that many Xtk applications that have been ported from a line-input- oriented paradigm could use something like this. Imaging an Xtk version of DBX or GDB, for example. Therefore I am thinking that someone else may have run into and solved this problem already, or that there is a solution using the existing X widgetry that I just don't know about. I'm not wizard enough to write an Xtk widget that uses PTY's and subprocesses to make glass-TTY things elegant and simple, but I know that some of you guys sure are. Has anyone solved this yet, or does anyone want to take it on? -- Paul A Vixie Esq paul%vixie@uunet.uu.net {uunet,ptsfa,hoptoad}!vixie!paul San Francisco, (415) 647-7023
swick@ATHENA.MIT.EDU (Ralph R. Swick) (02/18/88)
a TypescriptWidget is on our TODO list. Anyone who wants to help write it is invited to let me know.