Documentation for the Vt Widget

Feature Notes

Written by Bruce M. Corwin

Description

This is the first publicly available distribution of the VT Motif widget. The VT widget is approximately a VT320 level emulation minus REGIS and soft character loading but having ANSI color escape sequences some VT241 color control and many unique additional features. It is a composite widget with the ability to generate child widgets that scroll and print like characters. Graphics display in the form of XBM (Motif 1.2 and greater) or XBM (Motif 2.0 and greater). These graphics can be sent to the VT widget over a normal terminal communications link (such as telnet) as well. The blinking attribute IS supported as well as the double width and double height line attributes (Unlike many other X emulators). The support for double width and double height is not as complete as it could be but should be sufficent for most applications. There is also support for dragging strings to the widget from drag and drop type widgets like lists and labels. There is full copying and pasting of text to and from the Motif clipboard. Graphics copying and pasting is not supported in this release. Finaly, there is support for a fully configurable menu system similar to the .mwmrc or .twmrc type format. This menu system can be used to launch applications on the host you are logged into.

Sadly, all these features come at a price. That price is performance. This issue is still being worked. A small sample API is provided for applications that run on the bterm application. This API accesses several of the unique capabilities such as child widget creation and control.

This distribution currently runs on both the HPUX and Linux operating systems and will probably compile to one extent or the other for other operating systems with Motif 1.2 or above including Motif 2.0. To begin run xmkmf -a on the base directory and then type make. Then if every thing compiles correctly check the bin directory for two applications that use the VT widget and some other applications meant to run on a bterm.

References

There is a set of references that describe all of the functions of the widget system. Unfortunately, this API documentation has not been written for the bterm and ftpterm applications. However, it is complete for the Vt Widget itself and the prc library and the vtclib API.

The following calls are external to the library as an API for applications. Please refer to the API documentation of the Vt Widget for further details on how to use these functions.
void XmVtUnmonitor (Widget cw);
void XmVtMonitor (Widget cw, int filedescriptor, int input_pid);
int XmVtWrite (Widget cw, char *buffer, int count);
int XmVtRead (Widget cw, char *buffer, int count);
int XmVtSend (Widget cw, char *buffer);
void XmVtFlush (Widget cw);
int XmVtScrollBarSetValue (Widget cw, int scroll_value);
void XmVtSyncSize (Widget cw, Widget vtw, int top, int bot, int lf, int rt);
void XmVtBlankWidgets (Widget wid);
void XmVtChildSetValues (Widget wid, char identity, char *res, char *val);
void XmVtLoadIcon (Widget wid, char identity, char *iname);
void XmVtLoadWidget
  (
      Widget wid,
      char identity,
      char *name,
      int wtype,
      int char_width,
      int char_height
);
void XmVtLoadHyperData (Widget wid, char identity, char *hyper_data);
void XmVtLoadButtonData (Widget wid, char identity, char *callback_data);
Boolean XmVtPaste (Widget wid);
Boolean XmVtCopy (Widget wid, Time time);
void XmVtAppendTextChild (Widget wid, char identity, char *extend);
void XmVtAppendListChild (Widget wid, char identity, char *extend);

Applications

The bterm application

The bterm application demonstrates all of the features of the Vt Widget mentioned above. This application is meant to replace a terminal emulator such as xterm. Advantages include the ability to run more VAX based VTXXX applications as well as develop and run applications using unique features of the Vt Widget. One feature that is within the bterm application but not a result of the Vt widget is the PF soft key pad screen that can be used to access PF keys even when the xmodmap would make it hard otherwise. Here is a few screen shots of the bterm application running with several of the enhanced capablities. First, here is the application running with graphics blinking characters and wide and tall characters. The green inverse line was blinking when the screen shot was taken.

Click Here for Image

Next, here is the application running using the ability to display and utilize child widgets. The application running in the window is the script mman which calls the browse application. The browse application uses the vtclib API.

Click Here for Image

The ftpterm application

Ftpterm encapsulates the ftp utility into a standard Motif application with a menu bar and a scrolled window for a transaction log and manual command entry. Please refer to the provided manual page in the man directory in this distribution for detailed information.

The vls application

The vls program demonstrates a useful feature of the Vt widget, hyperlinks. The vls program uses the ls command to format hyperlink like entries for the bterm terminal program. It generates underlined and bolded text for the names of directories. When clicked on by the mouse cursor that directory is entered and a new vls listing is made. This is an example program for the bterm program and the Vt widget. This program has been called 'creepy' by one of my co-workers. Probably because it like several other uses features in the Vt widget can be rather unusual for a terminal emulator.

The vtedit application

The vtedit application is not complete but it demonstrates how the incomplete vtclib routines might be used to build a "bterm application" that edits files. At this point in time the application just loads files into a child scrolled text widget, and exits with a cancel button press.

The browse application

The browse application is a completed application of the vtclib. It demonstrates how vtclib routines can be used to build a "bterm application" that views files. At this point in time the application loads files into a child scrolled list widget, and exits with a Done button press.