	About Xuif of IRIS


0.0 General

	Of course, the XUIF of IRIS is written in Motif. There were some X and
Xt calls, but they are part of using Motif. No attempt of using X or Xt in
building UIF directly.

	The UIL approach was tried and rejected after a month or two. 
It belongs to the catagory of so called universal compiler's complier.  It is
too high level and it does not give all necessary facilities and controls. 
For instance you can not write a loop to create an array of pushbuttons.
So an user of UIL is forced to also use Xm calls directly. The mixture of
UIL, Xm, Xt, and X calls with their constants and resources data bases is too
much for a programmer to concentrate on the programming itself.

	The basic elements of Motif programming are Widgets and their callback
funtions.  The widget set is reasonally large. But they all are designed for
general purpose. And they do cover the needs of most UIF.  For situations
a customize widget is most appropriate, a temporary customzed Widget is used.
The name convention for these temporary wdiget is Xs.  Why temporary? A
customary widget is very time-consuming to write and test fully. We did not
have the time to do that. So instead, we group several standard Motif widgets
to form a customized widget. In the future when we have the time to explore
the art of writing custome widget, then all these widgets should be converted.

	In the long run, writing customerized widgets is inevitable.  Most
comercial softwares use some customized widgets on their UIF.  There simply
isn't any way you can hone Motif into giving you the visual antenna pedal 
control.

	
1.0 Naming Convention for Widgets

	A "C" name is needed for every widget. And a corresponding ASCII name
is also required for Rources Data Base.  These two names are assocated at the 
creation time of a widget.  The number of widgets is large to create a useful
UIF. The following naming convention makes, hopefully, the code and the 
Resource Data Base more readable.

	A widget name starts with the three-character abbreviation of the menu
which the widget resides in and it ends with a three character suffix indicationg the type of the widget.  The length between the prefix and suffix varies
according the complexity of the hirachy. 

	For the prefix, the possible menus are:

	top
	rst
	net
        tcf
	tsc
	ism
	pcf
	psc
	pom
	psm
	tap

	
	For the suffix, the possible widgets type are:

	lab	XmLabel        Widget
	btn	XmPushButton   Widget
	tgl     XmToggleButton Widget
	txt	XmText or XmTextField Widget
	opt     XmOption       Widget
	lst	XmList         Widget
	scl     XmScale	       Widget
	frm     XmForm         Widget
	shl     XmShell        Widget

	pop     Xm
	ebt     XmPushButton   Widget ( used as exit button in popups )
	
	
	The "C" name and the "RDB" name are the same except there is a dash
after the prefix in "C" name. The dash also help the clarity of the name.


2.0 A few words about widgets

	There are many different widgets and there are many ways to look at
them. In most IRIS applications, we take a simple approach. We use two
types of widget. One is the manager widget who manage other's including 
each other. The other is the labor widget who manage itself and being
manged by a manager widget.

	The X is very hyrachical. A labor widget must be contained and
managed by a manager widget. And there is a master manager for every
X program. Of course all these master manager widget is in turn controlled
bt the Motif window manager.

	In Motif widget set there are many manager widgets. In IRIS we choose
the XmForm Widget as the backbone for most the menus.  All the labels, text, 
buttons ...etc are contained and managed by the XmForm widget. The XmForm
widget actully is not the easiest manager widget. A programmer is required
to specify the geometric relationship among the labor widgets explicitly. 
But it does provide the automatical resize managemant. Most IRIS menu require
that feature.

	Use more manager types may produce a leaner code, but it may need more
progrmming time. Also switching manager widget can be difficult somtimes.
	


