[comp.windows.x] Motif tty widget?

scott@conan.UUCP (Scott Weitzenkamp) (06/15/91)

  I am grappling with trying to add a Motif (1.1.2) interface to a
command-driven program which is kinda like a shell (such as /bin/csh
or /bin/sh).  For various reasons, I am trying to implement this as
two processes: a Motif process and the normal shell process (sorta
like Saber C's X interface, only with Motif).  Another good example of
this is xterm, which communicates with the shell process via a pty.

  I am having problems finding a Motif widget to use for this.  I
looked at XmCommand, but it seems pretty primitive compared to xterm.
I am not saying that I have to use pty's, but I would like my
interface to look like I am running my shell process "in a window".  I
do not want to be typing in one widget, and have the output appear in
another widget (which is what XmCommand gives you).

  What I really want is something like the TTY subwindow that SunView
and XView offer (does Open Look's OLIT have a TTY widget?).  Does OSF
have any plans to keep adding new widgets like this, or is Motif's
widget set pretty much set in stone?

  At this point, I see three options: 1) subclass an existing Motif
widget, 2) make a new widget based on the code from the XView TTY
window, or 3) make a new widget based on the code from xterm.  

  It seems that the Motif XmText widget could possibly be subclassed
into what I want.  Any new keyboard input could be appended at the
bottom.  Has anyone done this?

  Not having looked at the XView TTY code, I don't know how hard it
would be to make a widget out of it.  My one concern with the XView
TTY is that I need this code to be portable to SunOS, Ultrix, HP-UX,
IRIS, SCO Unix, AIX, etc., and *VMS* (gag).

  I know that xterm has been ported to VMS, so this seems like a good
place to start.  Having looked a little at the xterm source, I see
that it has an "xterm" widget that just looks like it could be made
generic (any chance of this appearing in R5?).  The comment at the
beginning of xterm/main.c about "there be serious and nasty dragons
here" is a little daunting, though.

  I apoligize that this message is so lengthy, but I'm getting frustrated.
Thanks in advance for any tips/ideas/advice you can offer.

-- 
Thanks in advance...
Scott Weitzenkamp, Talarian Corporation, Mountain View, CA
uunet!talarian!scott             (415) 965-8050
"Welcome to the late show, starring NULL and void" -- Men At Work