v08i032: wcl - Widget Creation Library, Part02/06

David E. Smyth david at devvax.Jpl.Nasa.Gov
Fri Jul 6 17:40:37 AEST 1990


Submitted-by: david at devvax.Jpl.Nasa.Gov (David E. Smyth)
Posting-number: Volume 8, Issue 32
Archive-name: wcl/part02

# to unbundle, "sh" this file -- DO NOT use csh
#  SHAR archive format.  Archive created Tue Jul 3 16:48:32 PDT 1990
echo x - Mri.c
sed 's/^X//' > Mri.c <<'+FUNKY+STUFF+'
X/*
X** Copyright (c) 1990 David E. Smyth
X**
X** Redistribution and use in source and binary forms are permitted
X** provided that the above copyright notice and this paragraph are
X** duplicated in all such forms and that any documentation, advertising
X** materials, and other materials related to such distribution and use
X** acknowledge that the software was developed by David E. Smyth.  The
X** name of David E. Smyth may not be used to endorse or promote products
X** derived from this software without specific prior written permission.
X** THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
X** WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
X** MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
X**
X*/
X
X/******************************************************************************
X**
X** SCCS_data: @(#)Mri.c 1.0 ( 19 June 1990 )
X**
X** Description:	This file contains main() for a Motif Resource Interpreter
X**		which allows prototype interfaces to be built from
X**		resource files.  The Widget Creation library is used.
X**
X**		Besides the Motif widgets, Mri also knows about Table
X**		widgets, simply because they are so dang useful!
X**
X** Notes:	This program uses the Xrm (X resource management) database
X**		for widget tree definition and management.  This program
X**		is dependent on the Motif widget set only because the
X**		Motif classes and constructors are registered, which
X**		causes the Motif libs to be linked in.  Someday I'll
X**		get a shared lib version of Motif and the Athena widgets,
X**		and even the OpenLook widget set, and then there will
X**		be no reason that widgets could not be mixed and matched.
X**		Doing that without shared libs makes for a HUGE executable.
X**
X******************************************************************************/
X
X/******************************************************************************
X**   Include_files.
X******************************************************************************/
X
X#include <Xm/Xm.h>
X#include <ctype.h>
X#include <WidgetCreate.h>
X
X#include <Table.h>
X
X/******************************************************************************
X**  Private Functions
X******************************************************************************/
X
Xextern void MriRegisterMotif();
X
Xstatic void RegisterTable ( app )
X    XtAppContext app;
X{
X#define RCN( name, class ) WcRegisterClassName ( app, name, class );
X#define RCP( name, class ) WcRegisterClassPtr  ( app, name, class );
X
X    /* -- register widget classes */
X    RCN( "Table",                       tableWidgetClass                );
X    RCP( "tableWidgetClass",            tableWidgetClass                );
X
X#undef  RCN
X#undef  RCP
X}
X
X/******************************************************************************
X*   MAIN function
X******************************************************************************/
X
Xmain ( argc, argv )
X    int argc;
X    char* argv[];
X{   
X    char*        appClass;
X    XtAppContext app;
X    Widget       appShell;
X
X    appClass = (char*) XtMalloc ( strlen ( argv[0] ) + 1 );
X    strcpy (appClass, argv[0]);
X    /* initialize first letter to make class, or first two if
X    ** first is already capitalized, or don't worry about it.
X    */
X    if (islower(appClass[0]))
X	appClass[0] = toupper(appClass[0]);
X    else if (islower(appClass[1]))
X        appClass[1] = toupper(appClass[1]);
X    
X    /*  -- Intialize Toolkit creating the application shell */
X    appShell = XtInitialize ( 
X	argv[0], appClass,		/* app name and class */
X	NULL, 0, 			/* description of cmd line options */
X	&argc, argv 
X    );
X    app = XtWidgetToApplicationContext(appShell);
X
X    /*  -- Register all application specific callbacks and widget classes */
X    RegisterTable ( app );
X
X    /*  -- Register all Motif classes and constructors */
X    MriRegisterMotif ( app );
X
X    /*  -- Create widget tree below toplevel shell using Xrm database */
X    WcWidgetCreation ( appShell );
X
X    /*  -- Realize the widget tree and enter the main application loop */
X    XtRealizeWidget ( appShell );
X    XtMainLoop ( );
X}
+FUNKY+STUFF+
echo '-rw-r--r--  1 david        4092 Jun 28 09:13 Mri.c    (as sent)'
chmod u=rw,g=r,o=r Mri.c
ls -l Mri.c
echo x - Mri01.HelloWorld
sed 's/^X//' > Mri01.HelloWorld <<'+FUNKY+STUFF+'
X#ifdef Xrm_COMMENT
X----------------------------------------------------------------------
X
XThis resource file represents a very basic application: a single
Xbutton which, when pressed, causes the application to exit.
X
XNote that you can use familiar constructs such as #ifdef-endif
Xpairs, and C style /* comments */.  `#' as a first character
Xalso works, because it really indicates a cpp directive, and
Xcpp quitely ignores (does not pass on) any unrecognized directives.
X
X----------------------------------------------------------------------
X#endif
X
XMri.wcChildren:		push
X
X*push.wcClass:		xmPushButtonWidgetClass
X*push.labelString:	Hello World
X*push.activateCallback:	WcExitCB(1)
+FUNKY+STUFF+
echo '-rw-r--r--  1 david         680 Jun 28 09:13 Mri01.HelloWorld    (as sent)'
chmod u=rw,g=r,o=r Mri01.HelloWorld
ls -l Mri01.HelloWorld
echo x - Mri02.GoodbyeWorld
sed 's/^X//' > Mri02.GoodbyeWorld <<'+FUNKY+STUFF+'
X#ifdef Xrm_COMMENT
X----------------------------------------------------------------------
X
XThis resource file represents a very basic application: a single button
Xwhich changes its own behavior and label.  The first time it is
Xpressed, it changes its label and its activate callback.  The second
Xtime it is pressed, it causes the application to exit.
X
XThis example uses WcSetValueCB().  The argument looks exactly like a
Xresource specification.  The WcSetValueCB() callback actually does
Xan XtSetValue to set the value in the target (named) widget.
X
XNote that if there are multiple callbacks being invoked in a callback
Xlist, as in the button's activateCallback resource below, then each
Xspecification is separated by a comma.  In the below example, the
Xspecifications are also put on separate lines (the `\' escapes the
Xnewline in resource files just like in C), with additional whitepspace
X(tabs and blanks) for stylistic reasons.
X
X----------------------------------------------------------------------
X#endif
X
XMri.wcChildren:		push
X
X*push.wcClass:		xmPushButtonWidgetClass
X*push.labelString:	Hello World
X*push.activateCallback: WcSetValueCB( *push.activateCallback: WcExitCB(1) ), \
X			WcSetValueCB( *push.labelString:      Goodbye! )
+FUNKY+STUFF+
echo '-rw-r--r--  1 david        1238 Jun 28 09:13 Mri02.GoodbyeWorld    (as sent)'
chmod u=rw,g=r,o=r Mri02.GoodbyeWorld
ls -l Mri02.GoodbyeWorld
echo x - Mri03.Pulldowns
sed 's/^X//' > Mri03.Pulldowns <<'+FUNKY+STUFF+'
X#ifdef Xrm_COMMENT
X----------------------------------------------------------------------
X
XOrdering:
X--------
X
XThe order of the lines in the resource file are completely stylistic: a
Xmatter of taste.  The ordering is lost when the resources are loaded
Xinto the Xrm database, and the Widget Creation library works only from
Xthe database, not directy from the resource files.
X
XNote that the ordering of the names within the wcChildren resources is
Xsignificant: it is the order the children will be created, from left to
Xright, depth first.  One needs to consider this in several cases:
Xpulldown menus are a good example.
X
XPulldown Menus
X--------------
X
XThe pulldowns can be created before or after their activating cascade
Xbutton: as an example, lets look at the difference between the
XmenuBar.file and menuBar.fileMenu specifications versus the
XmenuBar.help and menuBar.helpMenu specifications.  
X
XThe *menuBar.wcChildren resource specifies that the first of its
Xchildren to be created is `file' (which has no children), then
X`fileMenu' and all its children, then `helpMenu' and all its children,
Xand finally `help'.
X
X    *menuBar.wcChildren:	file, fileMenu, helpMenu, help
X
XThe `fileMenu', being created after the `file' cascade, sets the subMenuId
Xresource on the `file' cascade when it is created:
X
X    *fileMenu.wcCallback:	WcSetValueCB(*file.subMenuId: this)
X
XThe `help' cascade is created after the `helpMenu', so it can specify the
X`helpMenu' as its subMenuId directly:
X
X    *help.subMenuId:		*helpMenu
X
XNote that the pulldown menus are NOT managed when they are created. They
Xare automagically managed by the cascade buttons.  
X
XNote also that the separator types are NOT XmSHADOW_ETCHED_IN and
XXmDOUBLE_DASHED_LINE as one might guess from Motif documents, but
Xinstead one must leave the Xm off the front.  Also, the values are
Xcase insensitive.
X
XMultiple Level Cascading Menus
X------------------------------
X
XThe saveAsMenu pulldown connected to the saveAs button demonstrates 
Xthis.  See the discussion below.
X
X----------------------------------------------------------------------
X#endif
X
X#*wcTrace:		True
X
XMri.wcChildren:		menuBar
X
X*menuBar.wcConstructor:	XmCreateMenuBar
X*menuBar.wcChildren:	file, fileMenu, helpMenu, help
X
X*file.wcConstructor:	XmCreateCascadeButton
X*file.labelString:	File
X*file.mnemonic:		F
X
X*fileMenu.wcConstructor: XmCreatePulldownMenu
X*fileMenu.wcManaged:	 False
X*fileMenu.wcCallback:	 WcSetValueCB(*file.subMenuId: this)
X*fileMenu.wcChildren:    load, sep1, save, saveAsMenu, saveAs, sep2, quit
X
X*helpMenu.wcConstructor: XmCreatePulldownMenu
X*helpMenu.wcManaged:	 False
X*helpMenu.wcChildren:    mbHelp, cpHelp, daHelp, tHelp
X
X*helpMenu.mbHelp.wcConstructor:	XmCreateCascadeButton
X*helpMenu.mbHelp.labelString:	on Menu Bar
X*helpMenu.mbHelp.mnemonic:	M
X
X*helpMenu.cpHelp.wcConstructor:	XmCreateCascadeButton
X*helpMenu.cpHelp.labelString:	on Control Panel
X*helpMenu.cpHelp.mnemonic:	C
X
X*helpMenu.daHelp.wcConstructor:	XmCreateCascadeButton
X*helpMenu.daHelp.labelString:	on Drawing Area
X*helpMenu.daHelp.mnemonic:	D
X
X*helpMenu.tHelp.wcConstructor:	XmCreateCascadeButton
X*helpMenu.tHelp.labelString:	on Text Area
X*helpMenu.tHelp.mnemonic:	T
X
X*help.wcConstructor:	XmCreateCascadeButton
X*help.subMenuId:	*helpMenu
X*help.labelString:	Help
X*help.mnemonic:		H
X
X*load.wcConstructor:	XmCreateCascadeButton
X*load.labelString:	Load ...
X*load.mnemonic:		L
X
X*sep1.wcConstructor:	XmCreateSeparator
X*sep1.separatorType:	Shadow_Etched_In
X
X*save.wcConstructor:	XmCreateCascadeButton
X*save.labelString:	Save
X*save.mnemonic:		S
X
X#
X# The saveAsMenu has already been created. 
X# It is specified at the bottom of this file.
X#
X*saveAs.wcConstructor:	XmCreateCascadeButton
X*saveAs.labelString:	Save As
X*saveAs.mnemonic:	A
X*saveAs.subMenuId:	*saveAsMenu
X
X*sep2.wcConstructor:	XmCreateSeparator
X*sep2.separatorType:	DOUBLE_DASHED_LINE
X
X*quit.wcConstructor:	XmCreateCascadeButton
X*quit.labelString:	Quit
X*quit.mnemonic:		Q
X*quit.activateCallback:	WcExitCB
X
X#ifdef Xrm_COMMENT
X----------------------------------------------------------------------
X
XMore on Callback Functions
X--------------------------
X
XOne does not strictly need to specify any arguments to callbacks, nor
Xthe parenthesis.  For example:
X
X    *quit.activateCallback:     WcExitCB
X
XIn this situation, a NULL string is passed to the callback function as
Xclient data.  WcExitCB invokes exit(0) when it gets a NULL argument.
X
XIt is up to the callback to decide the appropriate action when a NULL
Xstring is received as client data.  The Wc library does guarantee that
Xthe callback will receive a NULL string (the first character is a
X'\0'), and not a null pointer (pointer == 0).
X
XMultiple Level Cascading Menus
X------------------------------
X
X----------------------------------------------------------------------
X#endif
X
X#
X# All of the nested menus in this example have two buttons:
X# Go and More to come.  Note that we must be specific about
X# which pulldown menu gets tied to each one!
X#
X
X*go.wcConstructor:	XmCreateCascadeButton
X*go.labelString:	Go
X
X*more.wcConstructor:	XmCreateCascadeButton
X*more.labelString:	More to come
X
X*saveAsMenu.wcConstructor:	XmCreatePulldownMenu
X*saveAsMenu.wcManaged:		False
X*saveAsMenu.wcChildren:		level3, go, more
X*saveAsMenu.more.subMenuId:	*level3
X
X*level3.wcConstructor:	XmCreatePulldownMenu
X*level3.wcManaged:	False
X*level3.wcChildren:	level4, go, more
X*level3.more.subMenuId:	*level4
X
X*level4.wcConstructor:	XmCreatePulldownMenu
X*level4.wcManaged:	False
X*level4.wcChildren:	level5, go, more
X*level4.more.subMenuId:	*level5
X
X*level5.wcConstructor:	XmCreatePulldownMenu
X*level5.wcManaged:	False
X*level5.wcChildren:	level6, go, more
X*level5.more.subMenuId:	*level6
X
X*level6.wcConstructor:	XmCreatePulldownMenu
X*level6.wcManaged:	False
X*level6.wcChildren:	level7, go, more
X*level6.more.subMenuId:	*level7
X
X*level7.wcConstructor:	XmCreatePulldownMenu
X*level7.wcManaged:	False
X*level7.wcChildren:	go, more
X*level7.go.labelString:		You could go on forever like this...
X*level7.more.labelString:	But please don't!
+FUNKY+STUFF+
echo '-rw-r--r--  1 david        6014 Jun 28 09:13 Mri03.Pulldowns    (as sent)'
chmod u=rw,g=r,o=r Mri03.Pulldowns
ls -l Mri03.Pulldowns
echo x - Mri04.OptMenu
sed 's/^X//' > Mri04.OptMenu <<'+FUNKY+STUFF+'
X#ifdef Xrm_COMMENT
X----------------------------------------------------------------------
X
XOption Menus are a topic which deserves special consideration, because
Xthey are abit different from what you might expect.  As the Pulldown
Xexample resource file demonstrates, one may create a cascade button
Xbefore or after the menu which is controlled by the cascade.  One might
Xreasonably assume that the same is true for option menus.
X
XUnfortunately, this is an incorrect assumption.  One MUST first create
Xthe pulldown menu which displays the available options, and THEN invoke
Xthe convenience function XmCreateOptionMenu.  This may or may not be a
Xbug, depending on your point of view.
X
XThe widget called an OptionMenu is really a row column with two managed
Xchildren: a label, and a cascade.  The significant issue is the size of
Xthe cascade: it is forced to be wide enough for the longest selection
Xon the pulldown menu.  One cannot after the fact set the subMenuId on
Xthe cascade, because the cascade does not generally size itself based
Xon the subMenu elements: cascade size themselves based on their label.
X
XOne might assume that the RowColumn created by XmCreateOptionMenu would
Xhave a special set_values() method which does the appropriate thing
Xwhen subMenuId is set, but this is clearly not the case: the
Xset_values() mentof does something, but it certainly is not
Xappropriate.  Expect a core dump if you try it.
X
XSo, if you want to use option menus, do it as shown in this example:
Xfirst create the pulldown menu using XmCreatePulldownMenu, then create
Xthe `OptionMenu' using XmCreateOptionMenu.  The order of creation is
Xdetermined by the order of the widget names in the parent's wcChildren
Xresource:
X
X    *com.wcChildren:        doMenu, undoMenu, doOption, undoOption
X
XOh: a troble shooting tip: if you use XmCreateOptionMenu and the
Xcascade button's label is `<optMenName>_cascadeBtn' then you do not
Xhave the subMenuId set properly on the option menu.  Check for spelling
Xon the resource name, on the resource value, and possibly use
X`*wcTrace: True' to make sure you give the right name for the pulldown
Xmenu.
X
XAlso, remember to make the menu's initially unmanaged by setting
XwcManaged: False on each menu.  You can't do this globally,
Xunfortunately, because there is no actual Motif widget class named
XXmPulldownMenu.  Sigh.
X
X----------------------------------------------------------------------
X#endif
X
X#*wcTrace:		True
X
XMri.wcChildren:		com
X
X*com.wcClassName: XmRowColumn
X*com.wcChildren:  quit, doMenu, undoMenu, nextMenu, doOption, undoOption, next
X
X*quit.wcClassName:		XmPushButton
X*quit.labelString:		Quit
X*quit.activateCallback:		WcExitCB
X
X*doOption.wcConstructor:	XmCreateOptionMenu
X*doOption.labelString:		Do It
X*doOption.subMenuId:		*doMenu
X
X*undoOption.wcConstructor:	XmCreateOptionMenu
X*undoOption.labelString:	Undo It
X*undoOption.subMenuId:		*undoMenu
X
X*next.wcConstructor:		XmCreateOptionMenu
X*next.subMenuId:		*nextMenu
X
X*doMenu.wcConstructor:		XmCreatePulldownMenu
X*doMenu.wcManaged:		False
X*doMenu.wcChildren:		opt1, opt2
X
X*undoMenu.wcConstructor:	XmCreatePulldownMenu
X*undoMenu.wcManaged:		False
X*undoMenu.wcChildren:		opt1, opt2, opt3
X
X*nextMenu.wcConstructor:	XmCreatePulldownMenu
X*nextMenu.wcManaged:		False
X*nextMenu.wcChildren:		opt2, opt1, opt2, opt3, opt1
X
X/*
X** Note that the specification for buttons opt1 and opt2 are actually used
X** twice each: both menus have children named opt1 and opt2, so the
X** children of both menus will have these same resources, and thus, will
X** use the following resource specifications:
X*/
X
X*opt1.wcClassName:	XmPushButton
X*opt1.labelString:	Now
X
X*opt2.wcClassName:	XmPushButton
X*opt2.labelString:	Wat's the rush!!
X
X*opt3.wcClassName:	XmPushButton
X*opt3.labelString:	My Mistake...
+FUNKY+STUFF+
echo '-rw-r--r--  1 david        3755 Jul  3 16:33 Mri04.OptMenu    (as sent)'
chmod u=rw,g=r,o=r Mri04.OptMenu
ls -l Mri04.OptMenu
echo x - Mri05.Dialogs
sed 's/^X//' > Mri05.Dialogs <<'+FUNKY+STUFF+'
X#ifdef Xrm_COMMENT
X----------------------------------------------------------------------
X
XDialogs
X-------
X
XMotif constructors often introduce extra widgets.  File Selection
XDialogs are a good example.  In this example, the `Load' and `Save As'
Xbuttons on the `fileMenu' cause File Selection Dialogs to be managed
X(popped-up).  Note the names required:
X
X    *load.activateCallback:	WcManageCB( *loadSelect.loadSelect )
X
XThis seemingly strange naming can be detected using the wcTrace
Xresource.  The XmCreateFileSelectionDialog constructor creates a dialog
Xshell named `loadSelect' and a file selection box which is also named
X`loadSelect'.  The file selection box is a child of the dialog shell.  In
Xorder to see the file selection box, it must be managed, not just the
Xdialog shell.  A common error is the following:
X
X    *load.activateCallback:	WcManageCB( *loadSelect )
X
XThis simply causes the dialog shell to pop-up, but it will be empty: its
Xchild, the file selection box, is still not managed and so will not be
Xvisible.
X
X----------------------------------------------------------------------
X#endif
X
X#*wcTrace:		True
XMri.wcChildren:		menuBar, loadSelect, saveSelect
X
X*loadSelect.wcConstructor:	XmCreateFileSelectionDialog
X*loadSelect.wcManaged:		False
X*loadSelect.wcTrace:		True
X*loadSelect.cancelCallback:	WcUnmanageCB(this)
X*loadSelect.okCallback:		WcUnmanageCB(this)
X*saveSelect.wcConstructor:	XmCreateFileSelectionDialog
X*saveSelect.wcManaged:		False
X*saveSelect.cancelCallback:	WcUnmanageCB(this)
X*saveSelect.okCallback:		WcUnmanageCB(this)
X
X*load.activateCallback:		WcManageCB( *loadSelect.loadSelect )
X*saveAs.activateCallback:	WcManageCB(*saveSelect.saveSelect)
X
X#ifdef Xrm_COMMENT
X----------------------------------------------------------------------
X
XBelow are the resources for the menuBar and all its children.
X
XPulldown Menus
X--------------
X
XThe pulldowns can be created before or after their activating cascade
Xbutton: as an example, lets look at the difference between the
XmenuBar.file & menuBar.fileMenu specification versus the menuBar.help &
XmenuBar.helpMenu specifications.  The *menuBar.wcChildren resource
Xspecifies that the first of its children to be created is file (which
Xhas no children), then fileMenu and all its children, then helpMenu and
Xall its children, and finally help.
X
X    *menuBar.wcChildren:	file, fileMenu, helpMenu, help
X
XThe fileMenu, being created after the file cascade, sets the subMenuId
Xresource on the file cascade when it is created:
X
X    *fileMenu.wcCallback:	WcSetValueCB(*file.subMenuId: this)
X
XThe help cascade is created after the helpMenu, so it can specify the
XhelpMenu as its subMenuId directly:
X
X    *help.subMenuId:		*helpMenu
X
XNote that the pulldown menus are NOT managed when they are created. They
Xare automagically managed by the cascade buttons.  
X
XNote also that the separator types are NOT XmSHADOW_ETCHED_IN and
XXmDOUBLE_DASHED_LINE as one might guess from Motif documents, but
Xinstead one must leave the Xm off the front.  Also, the values are
Xcase insensitive.
X
X----------------------------------------------------------------------
X#endif
X
X*menuBar.wcConstructor:	XmCreateMenuBar
X*menuBar.wcChildren:	file, fileMenu, helpMenu, help
X
X*file.wcConstructor:	XmCreateCascadeButton
X*file.labelString:	File
X*file.mnemonic:		F
X
X*fileMenu.wcConstructor: XmCreatePulldownMenu
X*fileMenu.wcManaged:	 False
X*fileMenu.wcCallback:	 WcSetValueCB(*file.subMenuId: this)
X*fileMenu.wcChildren:    load, sep1, save, saveAs, sep2, quit
X
X*helpMenu.wcConstructor: XmCreatePulldownMenu
X*helpMenu.wcManaged:	 False
X*helpMenu.wcChildren:    mbHelp, cpHelp, daHelp, tHelp
X
X*helpMenu.mbHelp.wcConstructor:	XmCreateCascadeButton
X*helpMenu.mbHelp.labelString:	on Menu Bar
X*helpMenu.mbHelp.mnemonic:	M
X
X*helpMenu.cpHelp.wcConstructor:	XmCreateCascadeButton
X*helpMenu.cpHelp.labelString:	on Control Panel
X*helpMenu.cpHelp.mnemonic:	C
X
X*helpMenu.daHelp.wcConstructor:	XmCreateCascadeButton
X*helpMenu.daHelp.labelString:	on Drawing Area
X*helpMenu.daHelp.mnemonic:	D
X
X*helpMenu.tHelp.wcConstructor:	XmCreateCascadeButton
X*helpMenu.tHelp.labelString:	on Text Area
X*helpMenu.tHelp.mnemonic:	T
X
X*help.wcConstructor:	XmCreateCascadeButton
X*help.subMenuId:	*helpMenu
X*help.labelString:	Help
X*help.mnemonic:		H
X
X*load.wcConstructor:	XmCreateCascadeButton
X*load.labelString:	Load ...
X*load.mnemonic:		L
X
X*sep1.wcConstructor:	XmCreateSeparator
X*sep1.separatorType:	Shadow_Etched_In
X
X*save.wcConstructor:	XmCreateCascadeButton
X*save.labelString:	Save
X*save.mnemonic:		S
X
X*saveAs.wcConstructor:	XmCreateCascadeButton
X*saveAs.labelString:	Save As ...
X*saveAs.mnemonic:	A
X
X*sep2.wcConstructor:	XmCreateSeparator
X*sep2.separatorType:	DOUBLE_DASHED_LINE
X
X*quit.wcConstructor:	XmCreateCascadeButton
X*quit.labelString:	Quit
X*quit.mnemonic:		Q
X*quit.activateCallback:	WcExitCB
+FUNKY+STUFF+
echo '-rw-r--r--  1 david        4803 Jun 28 09:13 Mri05.Dialogs    (as sent)'
chmod u=rw,g=r,o=r Mri05.Dialogs
ls -l Mri05.Dialogs
echo x - Mri06.MainWindow
sed 's/^X//' > Mri06.MainWindow <<'+FUNKY+STUFF+'
X#ifdef Xrm_COMMENT
X----------------------------------------------------------------------
X
XMain Window
X-----------
X
XMotif's MainWindow widget type supports one of the classic "looks"
Xof a window application, and of the Motif Style Guide in particular.
X
X----------------------------------------------------------------------
X#endif
X
XMri.wcChildren:		main, loadSelect, saveSelect
X
X*main.wcConstructor:	XmCreateMainWindow
X*main.wcChildren:	menuBar, commandWindow, workWindow, vscroll
X
X*menuBar.shadowThickness:	3
X*XmFrame.shadowThickness:	3
X*XmFrame.shadowType:		SHADOW_OUT
X
X#ifdef Xrm_COMMENT
X----------------------------------------------------------------------
X
XDialogs
X-------
X
XMotif constructors often introduce extra widgets.  File Selection
XDialogs are a good example.  In this example, the `Load' and `Save As'
Xbuttons on the `fileMenu' cause File Selection Dialogs to be managed
X(popped-up).  Note the names required:
X
X    *load.activateCallback:	WcManageCB( *loadSelect.loadSelect )
X
XThis seemingly strange naming can be detected using the wcTrace
Xresource.  The XmCreateFileSelectionDialog constructor creates a dialog
Xshell named `loadSelect' and a file selection box which is also named
X`loadSelect'.  The file selection box is a child of the dialog shell.
XIn order to see the file selection box, it must be managed, not just
Xthe dialog shell.  A common error is the following:
X
X    *load.activateCallback:	WcManageCB( *loadSelect )
X
XThis simply causes the dialog shell to pop-up, but it will be empty: its
Xchild, the file selection box, is still not managed and so will not be
Xvisible.
X
XMore on Callbacks
X-----------------
X
XAny callback which accepts a widget name as client data can use the Wc 
Xlibrary function WcFullNameToWidget() to convert the string into a
Xwidget id.  A special value recognized by this function is `this' 
Xwhich is converted to be the widget id of the widget causing the
Xcallback.  For example,
X
X    *saveSelect.cancelCallback:     WcUnmanageCB(this)
X
Xcauses the saveSelect dialog widget to become unmanaged, and
X
X    *loadSelect.okCallback:         WcUnmanageCB(this)
X
Xcauses the loadSelect dialog widget to become unmanaged.
X
X----------------------------------------------------------------------
X#endif
X
X*loadSelect.wcConstructor:	XmCreateFileSelectionDialog
X*loadSelect.wcManaged:		False
X*loadSelect.cancelCallback:	WcUnmanageCB(this)
X*loadSelect.okCallback:		WcUnmanageCB(this)
X*saveSelect.wcConstructor:	XmCreateFileSelectionDialog
X*saveSelect.wcManaged:		False
X*saveSelect.cancelCallback:	WcUnmanageCB(this)
X*saveSelect.okCallback:		WcUnmanageCB(this)
X
X*load.activateCallback:		WcManageCB( *loadSelect.loadSelect )
X*saveAs.activateCallback:	WcManageCB(*saveSelect.saveSelect)
X
X#ifdef Xrm_COMMENT
X----------------------------------------------------------------------
X
XBelow are the resources for the menuBar and all its children.  This
XmenuBar is a child of a Motif MainWindow, and so must register itself
Xwith the MainWindow (named *main).
X
XPulldown Menus
X--------------
X
XThe pulldowns can be created before or after their activating cascade
Xbutton: as an example, lets look at the difference between the
XmenuBar.file & menuBar.fileMenu specification versus the menuBar.help &
XmenuBar.helpMenu specifications.  The *menuBar.wcChildren resource
Xspecifies that the first of its children to be created is file (which
Xhas no children), then fileMenu and all its children, then helpMenu and
Xall its children, and finally help.
X
X    *menuBar.wcChildren:	file, fileMenu, helpMenu, help
X
XThe fileMenu, being created after the file cascade, sets the subMenuId
Xresource on the file cascade when it is created:
X
X    *fileMenu.wcCallback:	WcSetValueCB(*file.subMenuId: this)
X
XThe help cascade is created after the helpMenu, so it can specify the
XhelpMenu as its subMenuId directly:
X
X    *help.subMenuId:		*helpMenu
X
XNote that the pulldown menus are NOT managed when they are created. They
Xare automagically managed by the cascade buttons.  
X
XNote also that the separator types are NOT XmSHADOW_ETCHED_IN and
XXmDOUBLE_DASHED_LINE as one might guess from Motif documents, but
Xinstead one must leave the Xm off the front.  Also, the values are
Xcase insensitive.
X
X----------------------------------------------------------------------
X#endif
X
X*menuBar.wcConstructor:	XmCreateMenuBar
X*menuBar.wcChildren:	file, fileMenu, viewMenu, view, helpMenu, help
X*menuBar.wcCallback:	WcSetValueCB( *main.menuBar: this )
X
X*file.wcConstructor:	XmCreateCascadeButton
X*file.labelString:	File
X*file.mnemonic:		F
X
X*fileMenu.wcConstructor: XmCreatePulldownMenu
X*fileMenu.wcManaged:	 False
X*fileMenu.wcCallback:	 WcSetValueCB(*file.subMenuId: this)
X*fileMenu.wcChildren:    load, sep, save, saveAs, sep, quit
X
X*sep.wcConstructor:	XmCreateSeparator
X
X*load.wcConstructor:	XmCreateCascadeButton
X*load.labelString:	Load ...
X*load.mnemonic:		L
X
X*save.wcConstructor:	XmCreateCascadeButton
X*save.labelString:	Save
X*save.mnemonic:		S
X
X*saveAs.wcConstructor:	XmCreateCascadeButton
X*saveAs.labelString:	Save As ...
X*saveAs.mnemonic:	A
X
X*quit.wcConstructor:	XmCreateCascadeButton
X*quit.labelString:	Quit
X*quit.mnemonic:		Q
X*quit.activateCallback:	WcExitCB
X
X*viewMenu.wcConstructor: XmCreatePulldownMenu
X*viewMenu.wcManaged:	 False
X*viewMenu.wcChildren:    reset, sep, msgGone, msgRestore
X
X*viewMenu.reset.wcConstructor:		XmCreateCascadeButton
X*viewMenu.reset.labelString:		Reset All Query Parameters
X
X*viewMenu.msgGone.wcConstructor:	XmCreateCascadeButton
X*viewMenu.msgGone.labelString:		Remove Message Window
X*viewMenu.msgGone.activateCallback:	WcUnmanageCB( *main.workWindow ),\
X					WcSetSensitiveCB( *msgRestore ), \
X					WcSetInsensitiveCB ( this )
X
X*viewMenu.msgRestore.wcConstructor:	XmCreateCascadeButton
X*viewMenu.msgRestore.labelString:	Display Message Window
X*viewMenu.msgRestore.sensitive:		False
X*viewMenu.msgRestore.activateCallback:	WcManageCB( *main.workWindow ),	\
X					WcSetSensitiveCB( *msgGone ),	\
X					WcSetInsensitiveCB( this )
X
X*view.wcConstructor:	XmCreateCascadeButton
X*view.subMenuId:	*viewMenu
X*view.labelString:	View
X*view.mnemonic:		V
X
X*helpMenu.wcConstructor: XmCreatePulldownMenu
X*helpMenu.wcManaged:	 False
X*helpMenu.wcChildren:    mbHelp, cpHelp, daHelp, tHelp
X
X*helpMenu.mbHelp.wcConstructor:	XmCreateCascadeButton
X*helpMenu.mbHelp.labelString:	on Menu Bar
X*helpMenu.mbHelp.mnemonic:	M
X
X*helpMenu.cpHelp.wcConstructor:	XmCreateCascadeButton
X*helpMenu.cpHelp.labelString:	on Control Panel
X*helpMenu.cpHelp.mnemonic:	C
X
X*helpMenu.daHelp.wcConstructor:	XmCreateCascadeButton
X*helpMenu.daHelp.labelString:	on Drawing Area
X*helpMenu.daHelp.mnemonic:	D
X
X*helpMenu.tHelp.wcConstructor:	XmCreateCascadeButton
X*helpMenu.tHelp.labelString:	on Text Area
X*helpMenu.tHelp.mnemonic:	T
X
X*help.wcConstructor:	XmCreateCascadeButton
X*help.wcCallback:	WcSetValueCB(*menuBar.menuHelpWidget: this )
X*help.subMenuId:	*helpMenu
X*help.labelString:	Help
X*help.mnemonic:		H
X
X#ifdef Xrm_COMMENT
X----------------------------------------------------------------------
X
XThis section provides the resource specifications for the commandWindow
Xchild of the main window.  The command window provides a
Xdirect-manipulation interface to Tot, the TDS_Output_Tool.
X
XThe commandWindow is a row column widget with stacked children.  The
Xtop child contains a description of the query to be performed.  The
Xsecond child contains the submit controls, including a radio box and
X`submit' and `stop' buttons.  The third child contains the time
Xranges.  The fourth child is used to actually specify the data types,
Xdata transformations, and the data sinks using a graphic representing
Xthe flow of data.
X
X----------------------------------------------------------------------
X#endif
X
X#commandWindow*wcTrace:		True
X
X*commandWindow.wcConstructor:	XmCreateRowColumn
X*commandWindow.wcCallback:	WcSetValueCB( *main.commandWindow: this )
X*commandWindow.wcChildren:	descr, submitCtrl, timeRange, panel
X*commandWindow.spacing:		10
X*commandWindow.marginWidth:	10
X*commandWindow.marginHeight:	10
X
X#
X# Description
X#
X# Note that descr.text must be created AFTER the descr.label for two
X# reasons: XmForm is braindamaged when handling children which are not
X# created in a left-to-right, top-to-bottom manner, AND because the
X# descr.text widget refers to the descr.label widget as its attachment,
X# and the descr.label widget must exist when the following line is
X# converted from String to Widget during descr.text creation:
X#
X#   *descr.text.topWidget:          *descr.label
X#
X
X*descr.wcConstructor:		XmCreateForm
X*descr.wcChildren:		label, text
X
X*descr.label.wcConstructor:	XmCreateLabel
X*descr.label.labelString:	Query Description
X*descr.label.leftAttachment:	ATTACH_FORM
X*descr.label.topAttachment:	ATTACH_FORM
X
X*descr.text.wcConstructor:	XmCreateText
X*descr.text.topWidget:		*descr.label
X*descr.text.topAttachment:	ATTACH_WIDGET
X*descr.text.leftAttachment:	ATTACH_FORM
X*descr.text.rightAttachment:	ATTACH_FORM
X
X#
X# Submit Control Frame
X#
X
X#submitCtrl*wcTrace:		True
X
X*submitCtrl.wcConstructor:	XmCreateFrame
X*submitCtrl.wcChildren:		scRC
X
X*scRC.wcConstructor:		XmCreateRowColumn
X*scRC.orientation:		HORIZONTAL
X*scRC.wcChildren:		startStop, rtRange
X
X*startStop.wcConstructor:	XmCreateRowColumn
X*startStop.wcChildren:		start, stop
X
X*startStop.start.wcConstructor:	XmCreatePushButton
X*startStop.start.labelString:	Submit Query
X*startStop.start.activateCallback:	WcSetInsensitiveCB( this ), \
X					WcSetSensitiveCB  ( *startStop.stop )
X
X*startStop.stop.wcConstructor:	XmCreatePushButton
X*startStop.stop.labelString:	Stop Query
X*startStop.stop.sensitive:	False
X*startStop.stop.activateCallback:	WcSetInsensitiveCB( this ), \
X                                        WcSetSensitiveCB  ( *startStop.start )
X
X*rtRange.wcConstructor:		XmCreateRadioBox
X*rtRange.wcChildren:		rtToggle, trToggle
X
X#
X# NOTE: The timeRC widget must exist before the WcSetInsensitiveCB
X# is invoked, but this will clearly be the case: the timeRC widget
X# is not deferred, and so will be created before any of these widgets
X# get realized, and the user can't very well press a toggle button
X# which is not yet mapped to the screen!
X#
X*rtToggle.wcConstructor:	XmCreateToggleButtonGadget
X*rtToggle.labelString:		Real Time Stream
X*rtToggle.set:			True
X*rtToggle.armCallback:		WcSetInsensitiveCB ( *timeRC )
X
X*trToggle.wcConstructor:	XmCreateToggleButtonGadget
X*trToggle.labelString:		Query Time Range
X*trToggle.armCallback:		WcSetSensitiveCB   ( *timeRC )
X
X#
X# Time Range Frame
X#
X
X#timeRange*wcTrace:		True
X
X*timeRange.wcConstructor:	XmCreateFrame
X*timeRange.wcChildren:		timeRC
X
X*timeRC.wcConstructor:		XmCreateRowColumn
X*timeRC.wcChildren:		fromRC, toRC
X*timeRC.sensitive:		False
X
X*timeRC.fromRC.wcConstructor:	XmCreateRowColumn
X*timeRC.fromRC.wcChildren:	label, time, type
X*timeRC.toRC.wcConstructor:	XmCreateRowColumn
X*timeRC.toRC.wcChildren:	label, time, type
X
X#timeRC.XmRowColumn.wcChildren:	label, time, type
X*timeRC.XmRowColumn.orientation: HORIZONTAL
X
X*timeRC.XmRowColumn.label.wcConstructor:	XmCreateLabel
X*timeRC.fromRC.label.labelString:		Begin Time:
X*timeRC.toRC.label.labelString:			End Time  :
X
X*timeRC.XmRowColumn.time.wcConstructor:	XmCreateText
X
X*timeRC.XmRowColumn.type.wcConstructor:	XmCreateRadioBox
X*timeRC.XmRowColumn.type.wcChildren:	sclk, scet, ert, mst, rct
X*timeRC.XmRowColumn.type.orientation:	HORIZONTAL
X
X#
X# Radio Boxes complain if the children are not XmToggleButtonGadgets
X#
X*timeRC*type.sclk.set:			True
X*timeRC*type.sclk.wcConstructor:	XmCreateToggleButtonGadget
X*timeRC*type.scet.wcConstructor:	XmCreateToggleButtonGadget
X*timeRC*type.ert.wcConstructor:		XmCreateToggleButtonGadget
X*timeRC*type.mst.wcConstructor:		XmCreateToggleButtonGadget
X*timeRC*type.rct.wcConstructor:		XmCreateToggleButtonGadget
X
X#ifdef Xrm_COMMENT
X----------------------------------------------------------------------
X
XThis section provides the resource specifications for the direct
Xmanipulation panel which allows a user to specify a set of data
Xtypes, data transforms, and data sinks, along with the data flows
Xwhich connect each of the foregoing.
X
XAlong the left side are three row columns, left to right.  The leftmost
Xrow column contains buttons representing the different data types which
Xcan be queried.  This will certainly change per mission, and probably
Xper user.  
X
XThe second row column contains buttons representing the different
Xtransformations which may be applied to the data.  Several are basically
Xmission independent, such as WSE filtering and DMD.  Others may be
Xadded on a per mission basis, and some details may be frequently
Xspecified on a per user basis.
X
XThe third row column contains buttons representing the different
Xdata sinks which are available.  These are probably never changed.
X
X----------------------------------------------------------------------
X#endif
X
X*panel.wcConstructor:		XmCreateForm
X*panel.wcChildren:		controlFrame, displaySW
X
X*controlFrame.wcConstructor:	XmCreateFrame
X*controlFrame.wcChildren:	controlRC
X*controlFrame.topAttachment:	ATTACH_FORM
X*controlFrame.leftAttachment:	ATTACH_FORM
X#controlFrame.bottomAttachment:	ATTACH_FORM
X
X*controlRC.wcConstructor:	XmCreateRowColumn
X*controlRC.orientation:		HORIZONTAL
X#controlRC.packing:		PACK_COLUMN
X*controlRC.wcChildren:		dataRC, transRC, sinkRC
X
X#
X# Data Instantiation Buttons
X#
X
X*dataRC.wcConstructor:		XmCreateRowColumn
X*dataRC.wcChildren:		d1,d2,d3,d4,d5,d6,d7,
X
X*dataRC.d1.wcConstructor:	XmCreatePushButtonGadget
X*dataRC.d2.wcConstructor:	XmCreatePushButtonGadget
X*dataRC.d3.wcConstructor:	XmCreatePushButtonGadget
X*dataRC.d4.wcConstructor:	XmCreatePushButtonGadget
X*dataRC.d5.wcConstructor:	XmCreatePushButtonGadget
X*dataRC.d6.wcConstructor:	XmCreatePushButtonGadget
X*dataRC.d7.wcConstructor:	XmCreatePushButtonGadget
X
X*dataRC.d1.labelString:		CR5A
X*dataRC.d2.labelString:		CR7A
X*dataRC.d3.labelString:		GS4B
X*dataRC.d4.labelString:		GS08
X*dataRC.d5.labelString:		GS10
X*dataRC.d6.labelString:		GS10A
X*dataRC.d7.labelString:		UV5A
X
X#
X# Trans Instantiation Buttons
X#
X
X*transRC.wcConstructor:		XmCreateRowColumn
X*transRC.wcChildren:		t1,t2,t3,t4,t5,t6, t7
X
X*transRC.t1.wcConstructor:	XmCreatePushButtonGadget
X*transRC.t2.wcConstructor:	XmCreatePushButtonGadget
X*transRC.t3.wcConstructor:	XmCreatePushButtonGadget
X*transRC.t4.wcConstructor:	XmCreatePushButtonGadget
X*transRC.t5.wcConstructor:	XmCreatePushButtonGadget
X*transRC.t6.wcConstructor:	XmCreatePushButtonGadget
X*transRC.t7.wcConstructor:	XmCreatePushButtonGadget
X
X*transRC.t1.labelString:	Channelize
X*transRC.t2.labelString:	Generate ECDRs
X*transRC.t3.labelString:	Filter SFDUs
X*transRC.t4.labelString:	Generate IDFs
X*transRC.t5.labelString:	Display on DMD
X*transRC.t6.labelString:	Template
X*transRC.t7.labelString:	SFDU Browser
X
X#
X# Sink Instantiation Buttons
X#
X
X*sinkRC.wcConstructor:		XmCreateRowColumn
X*sinkRC.wcChildren:		s1,s2,s3,s4,s5,s6,s7
X
X*sinkRC.s1.wcConstructor:	XmCreatePushButtonGadget
X*sinkRC.s2.wcConstructor:	XmCreatePushButtonGadget
X*sinkRC.s3.wcConstructor:	XmCreatePushButtonGadget
X*sinkRC.s4.wcConstructor:	XmCreatePushButtonGadget
X*sinkRC.s5.wcConstructor:	XmCreatePushButtonGadget
X*sinkRC.s6.wcConstructor:	XmCreatePushButtonGadget
X*sinkRC.s7.wcConstructor:	XmCreatePushButtonGadget
X
X*sinkRC.s1.labelString:		UNIX stdout
X*sinkRC.s2.labelString:		UNIX file
X*sinkRC.s3.labelString:		UNIX pipe
X*sinkRC.s4.labelString:		CDA spooler
X*sinkRC.s5.labelString:		DTS virtual circuit
X*sinkRC.s6.labelString:		DTS Broadcast
X*sinkRC.s7.labelString:		TCP/IP socket
X
X#
X# Scrolled Data Flow `Drawing' Area
X#
X
X*displaySW.wcConstructor:		XmCreateScrolledWindow
X*displaySW.scrollingPolicy:		AUTOMATIC
X*displaySW.scrollBarDisplayPolicy:	AS_NEEDED
X*displaySW.wcChildren:			drawing
X*displaySW.topAttachment:		ATTACH_FORM
X*displaySW.leftAttachment:		ATTACH_WIDGET
X*displaySW.leftWidget:			*controlFrame
X*displaySW.leftOffset:			10
X*displaySW.bottomAttachment:		ATTACH_FORM
X*displaySW.rightAttachment:		ATTACH_FORM
X
X*drawing.wcConstructor:		XmCreateDrawingArea
X*drawing.width:			200
X*drawing.height:		700
X*drawing.wcCallback:		WcSetValueCB(*displaySW.workWindow: this )
X
X#ifdef Xrm_COMMENT
X----------------------------------------------------------------------
X
XThis section provides the resource specifications for the workWindow
Xand vertical scrollbar children of the main window.
X
X----------------------------------------------------------------------
X#endif
X
X*main.workWindow.wcConstructor:	XmCreateText
X*main.workWindow.wcCallback:	WcSetValueCB( *main.workWindow: this )
X
X*main.vscroll.wcConstructor:	XmCreateScrollBar
X*main.vscroll.wcCallback:	WcSetValueCB( *main.verticalScrollBar: this )
+FUNKY+STUFF+
echo '-rw-r--r--  1 david       16505 Jun 28 09:13 Mri06.MainWindow    (as sent)'
chmod u=rw,g=r,o=r Mri06.MainWindow
ls -l Mri06.MainWindow
echo x - Mri07.PDWidgets
sed 's/^X//' > Mri07.PDWidgets <<'+FUNKY+STUFF+'
X#ifdef Xrm_COMMENT
X----------------------------------------------------------------------
X
XThis resource file explores the use of public domain widgets mixed
Xin with Motif widgets.  Specifically, a Table widget is used in
Xplace of a XmRowColumn.  The announcement for the Table widget:
X
XTable - Geometry Management Widget for the X Toolkit
X
XTable is a composite widget designed to manage the size and location
Xof its children.  The widget uses an array model to simplify the
Xarrangement of child widgets.  Widgets are placed at row and column
Xlocations in a variable sized array.  Widgets may span more than one
Xrow or column.  The array automatically expands or contracts as
Xneeded.  There are options to control justification and place size
Xrestrictions on rows or columns in the array.  The widget is directly
Xderived from the core and composite widgets provided by the X Toolkit
Xand can be used with any widget set.  It has been tested using the
XAthena widget set.
X
XSource for the Table widget is available through anonymous ftp to
Xshambhala.Berkeley.EDU (128.32.132.54).  Instructions are given below:
X
X        % ftp shambhala.Berkeley.EDU
X        Name: anonymous
X        Password: <anything non-null>
X        ftp> cd pub
X        ftp> binary
X        ftp> get Table.tar.Z
X        ftp> quit
X        % uncompress Table.tar.Z
X        % tar xf Table.tar
X
XThose without ftp access can obtain the source for the Table widget
Xusing a mail archive system I have installed on dent.Berkeley.EDU
X(courtesy of Brian Reid at Digital).  An example is given below:
X
X        To: ucbvax!dent!archive-server
X        Subject: send programs Table.shar.01 Table.shar.02
X
XThe archive server will send you these files as time and load
Xpermits.  They are standard shell archives that can be unpacked
Xby running them through /bin/sh (in order).  If you would like
Xto know more about the mail server, send a message with a subject
Xof "help".
X
XAfter unpacking the files, you will find a README file in the directory
Xthat contains installation instructions.
X
X                        David Harrison
X                        UC Berkeley Electronics Research Lab
X                        (davidh at ic.Berkeley.EDU, ...!ucbvax!ucbcad!davidh)
X
XThe Table widget has proven to be so useful, it is included in the
XWc distribution and is registered by the WcRegisterMotif() function.
XVery minor edits were required to make Table compatible with Motif.
X
XAppearance Defaults
X-------------------
X
XBelow are application wide defaults vor various widgets.
X
XN.B.:  If you change the colors from B&W, you should change the
XborderColor of the Table widget.  Someday, I will probably hack
Xthe Table widget to have Margin resources like XmRowColumn and
Xthen it won't be necessary
X
X----------------------------------------------------------------------
X#endif
X
X*menuBar.shadowThickness:       3
X*XmFrame.shadowThickness:       3
X*XmText.shadowThickness:        3
X*XmDrawingArea.shadowThickness: 3
X*XmScrollBar.shadowThickness:   3
X*XmFrame.shadowType:            SHADOW_OUT
X*Table.borderWidth:             0
X
X*Table.borderColor:		XtDefaultBackground
X
X#ifdef Xrm_COMMENT
X----------------------------------------------------------------------
X
XMain Window
X-----------
X
XMotif's MainWindow widget type supports one of the classic "looks"
Xof a window application, and of the Motif Style Guide in particular.
X
X----------------------------------------------------------------------
X#endif
X
XMri.wcChildren:		main, loadSelect, saveSelect
X
X*main.wcConstructor:	XmCreateMainWindow
X*main.wcChildren:	menuBar, commandWindow, msgWindow, vscroll
X
X#ifdef Xrm_COMMENT
X----------------------------------------------------------------------
X
XDialogs
X-------
X
XMotif constructors often introduce extra widgets.  File Selection Dialogs
Xare a good example.  In this example, the Load and Save As buttons on the
XFile menu cause File Selection Dialogs to be managed (popped-up).  Note
Xthe names required:
X
X    *load.activateCallback:	WcManageCB( *loadSelect.loadSelect )
X
XThis seemingly strange naming can be detected using the wcTrace resource.  The
XXmCreateFileSelectionDialog constructor creates a dialog shell named
XloadSelect and a file selection box which is also named loadSelect.  The
Xfile selection box is a child of the dialog shell.  In order to see the
Xfile selection box, it must be managed, not just the dialog shell.
XA common error is the following:
X
X    *load.activateCallback:	WcManageCB( *loadSelect )
X
XThis simply causes the dialog shell to pop-up, but it will be empty: its
Xchild, the file selection box, is still not managed and so will not be
Xvisible.
X
X----------------------------------------------------------------------
X#endif
X
X*loadSelect.wcConstructor:	XmCreateFileSelectionDialog
X*loadSelect.wcManaged:		False
X*loadSelect.cancelCallback:	WcUnmanageCB(this)
X*loadSelect.okCallback:		WcUnmanageCB(this)
X*saveSelect.wcConstructor:	XmCreateFileSelectionDialog
X*saveSelect.wcManaged:		False
X*saveSelect.cancelCallback:	WcUnmanageCB(this)
X*saveSelect.okCallback:		WcUnmanageCB(this)
X
X*load.activateCallback:		WcManageCB( *loadSelect.loadSelect )
X*saveAs.activateCallback:	WcManageCB(*saveSelect.saveSelect)
X
X#ifdef Xrm_COMMENT
X----------------------------------------------------------------------
X
XBelow are the resources for the menuBar and all its children.  This
XmenuBar is a child of a Motif MainWindow, and so must register itself
Xwith the MainWindow (named *main).
X
XPulldown Menus
X--------------
X
XThe pulldowns can be created before or after their activating cascade
Xbutton: as an example, lets look at the difference between the
XmenuBar.file & menuBar.fileMenu specification versus the menuBar.help &
XmenuBar.helpMenu specifications.  The *menuBar.wcChildren resource
Xspecifies that the first of its children to be created is file (which
Xhas no children), then fileMenu and all its children, then helpMenu and
Xall its children, and finally help.
X
X    *menuBar.wcChildren:	file, fileMenu, helpMenu, help
X
XThe fileMenu, being created after the file cascade, sets the subMenuId
Xresource on the file cascade when it is created:
X
X    *fileMenu.wcCallback:	WcSetValueCB(*file.subMenuId: this)
X
XThe help cascade is created after the helpMenu, so it can specify the
XhelpMenu as its subMenuId directly:
X
X    *help.subMenuId:		*helpMenu
X
XNote that the pulldown menus are NOT managed when they are created. They
Xare automagically managed by the cascade buttons.  
X
XNote also that the separator types are NOT XmSHADOW_ETCHED_IN and
XXmDOUBLE_DASHED_LINE as one might guess from Motif documents, but
Xinstead one must leave the Xm off the front.  Also, the values are
Xcase insensitive.
X
X----------------------------------------------------------------------
X#endif
X
X#menuBar*wcTrace:	True
X
X*menuBar.wcConstructor:	XmCreateMenuBar
X*menuBar.wcChildren:	file, fileMenu, viewMenu, view, helpMenu, help
X*menuBar.wcCallback:	WcSetValueCB( *main.menuBar: this )
X
X*file.wcConstructor:	XmCreateCascadeButton
X*file.labelString:	File
X*file.mnemonic:		F
X
X*fileMenu.wcConstructor: XmCreatePulldownMenu
X*fileMenu.wcManaged:	 False
X*fileMenu.wcCallback:	 WcSetValueCB(*file.subMenuId: this)
X*fileMenu.wcChildren:    load, sep, save, saveAs, sep, quit
X
X*sep.wcConstructor:	XmCreateSeparator
X
X*load.wcConstructor:	XmCreateCascadeButton
X*load.labelString:	Load ...
X*load.mnemonic:		L
X
X*save.wcConstructor:	XmCreateCascadeButton
X*save.labelString:	Save
X*save.mnemonic:		S
X
X*saveAs.wcConstructor:	XmCreateCascadeButton
X*saveAs.labelString:	Save As ...
X*saveAs.mnemonic:	A
X
X*quit.wcConstructor:	XmCreateCascadeButton
X*quit.labelString:	Quit
X*quit.mnemonic:		Q
X*quit.activateCallback:	WcExitCB
X
X*viewMenu.wcConstructor: XmCreatePulldownMenu
X*viewMenu.wcManaged:	 False
X*viewMenu.wcChildren:    reset, sep, msgGone, msgRestore
X
X*viewMenu.reset.wcConstructor:		XmCreateCascadeButton
X*viewMenu.reset.labelString:		Reset All Query Parameters
X
X*viewMenu.msgGone.wcConstructor:	XmCreateCascadeButton
X*viewMenu.msgGone.labelString:		Remove Message Window
X*viewMenu.msgGone.activateCallback:	WcUnmanageCB( *main.msgWindow ),\
X					WcSetSensitiveCB( *msgRestore ), \
X					WcSetInsensitiveCB ( this )
X
X*viewMenu.msgRestore.wcConstructor:	XmCreateCascadeButton
X*viewMenu.msgRestore.labelString:	Display Message Window
X*viewMenu.msgRestore.sensitive:		False
X*viewMenu.msgRestore.activateCallback:	WcManageCB( *main.msgWindow ),	\
X					WcSetSensitiveCB( *msgGone ),	\
X					WcSetInsensitiveCB( this )
X
X*view.wcConstructor:	XmCreateCascadeButton
X*view.subMenuId:	*viewMenu
X*view.labelString:	View
X*view.mnemonic:		V
X
X*helpMenu.wcConstructor: XmCreatePulldownMenu
X*helpMenu.wcManaged:	 False
X*helpMenu.wcChildren:    mbHelp, cpHelp, daHelp, tHelp
X
X*helpMenu.mbHelp.wcConstructor:	XmCreateCascadeButton
X*helpMenu.mbHelp.labelString:	on Menu Bar
X*helpMenu.mbHelp.mnemonic:	M
X
X*helpMenu.cpHelp.wcConstructor:	XmCreateCascadeButton
X*helpMenu.cpHelp.labelString:	on Control Panel
X*helpMenu.cpHelp.mnemonic:	C
X
X*helpMenu.daHelp.wcConstructor:	XmCreateCascadeButton
X*helpMenu.daHelp.labelString:	on Drawing Area
X*helpMenu.daHelp.mnemonic:	D
X
X*helpMenu.tHelp.wcConstructor:	XmCreateCascadeButton
X*helpMenu.tHelp.labelString:	on Text Area
X*helpMenu.tHelp.mnemonic:	T
X
X*help.wcConstructor:	XmCreateCascadeButton
X*help.wcCallback:	WcSetValueCB(*menuBar.menuHelpWidget: this )
X*help.subMenuId:	*helpMenu
X*help.labelString:	Help
X*help.mnemonic:		H
X
X#ifdef Xrm_COMMENT
X----------------------------------------------------------------------
X
XThis section provides the resource specifications for the commandWindow
Xchild of the main window.  The command window provides a
Xdirect-manipulation interface to Tot, the TDS_Output_Tool.
X
XThe commandWindow is a Table widget with three stacked children.  The
Xtop child contains a description of the query to be performed.  The
Xsecond child contains the submit controls including the time range to
Xbe queried.  The third child is used to actually specify the data
Xtypes, data transformations, and the data sinks using a graphic
Xrepresenting the flow of data.
X
X----------------------------------------------------------------------
X#endif
X
X#commandWindow*wcTrace:		True
X
X*commandWindow.wcClass:		tableWidgetClass
X*commandWindow.wcCallback:	WcSetValueCB( *main.commandWindow: this )
X*commandWindow.wcChildren:	descr, submitCtrl, panel
X#                                   c r cs rs opts
X*commandWindow.layout:	descr	    0 0  1  1   hH ;\
X			submitCtrl  0 1  1  1   hH ;\
X			panel       0 2  1  1 
X
X*commandWindow.columnSpacing:	10
X*commandWindow.rowSpacing:	10
X*commandWindow.borderWidth:	10
X
X#
X# Description
X#
X
X*descr.wcConstructor:		XmCreateForm
X*descr.wcChildren:		label, text
X
X*descr.label.wcConstructor:	XmCreateLabel
X*descr.label.labelString:	Query Description
X*descr.label.leftAttachment:	ATTACH_FORM
X*descr.label.topAttachment:	ATTACH_FORM
X
X*descr.text.wcConstructor:	XmCreateText
X*descr.text.topWidget:		*descr.label
X*descr.text.topAttachment:	ATTACH_WIDGET
X*descr.text.leftAttachment:	ATTACH_FORM
X*descr.text.rightAttachment:	ATTACH_FORM
X
X#ifdef Xrm_COMMENT
X----------------------------------------------------------------------
X
XThis section provides the resource specifications for the Submit
XControl portion of the commandWindow.  A Table widget is used as the
Xmanager widget because Row Column just can't do the job here, where we
Xmix types of widgets with differing heights in a row, AND types of
Xwidgets with differing widths in a column.  XmRowColumn gets fascist in
Xsuch situations, and makes every cell the same width and height.  We
Xdon't want that (wastes ALOT of real estate in this case).  So, we'll
Xtry the Table Widget.
X
X----------------------------------------------------------------------
X#endif
X
X#submitCtrl*wcTrace:		True
X
X*submitCtrl.wcConstructor:	XmCreateFrame
X*submitCtrl.wcChildren:		table
X*submitCtrl.marginWidth:	6
X*submitCtrl.marginHeight:	6
X
X*table.wcClassName:		Table
X*table.borderWidth:	0
X*table.wcChildren:	start, rtRadio, fromLabel, fromTime, fromType,   \
X			stop,           toLabel,   toTime,   toType
X#				  c r cs rs opts
X*table.layout:		start     0 0  1  1 wWhH ;\
X			stop      0 1  1  1   hH ;\
X			rtRadio   1 0  1  2 wW   ;\
X			fromLabel 2 0  1  1 wW   ;\
X			toLabel   2 1  1  1      ;\
X			fromTime  3 0  1  1      ;\
X			toTime    3 1  1  1      ;\
X			fromType  4 0  1  1 wW   ;\
X			toType    4 1  1  1
X
X*table.start.wcConstructor:	XmCreatePushButton
X*table.start.labelString:	Submit Query
X*table.start.activateCallback:	WcSetInsensitiveCB( this ), \
X				WcSetSensitiveCB  ( *table.stop )
X
X*table.stop.wcConstructor:	XmCreatePushButton
X*table.stop.labelString:	Stop Query
X*table.stop.sensitive:		False
X*table.stop.activateCallback:	WcSetInsensitiveCB( this ), \
X                                WcSetSensitiveCB  ( *table.start )
X
X*rtRadio.wcConstructor:		XmCreateRadioBox
X*rtRadio.wcChildren:		trToggle, rtToggle
X
X*trToggle.wcConstructor:	XmCreateToggleButtonGadget
X*trToggle.labelString:		Query Time Range
X*trToggle.set:			True
X*trToggle.armCallback:		WcSetSensitiveCB   ( *fromLabel, *fromTime, \
X					*fromType, *toLabel, *toTime, *toType)
X
X*rtToggle.wcConstructor:	XmCreateToggleButtonGadget
X*rtToggle.labelString:		Real Time Stream
X*rtToggle.armCallback:		WcSetInsensitiveCB ( *fromLabel, *fromTime, \
X					*fromType, *toLabel, *toTime, *toType)
X
X*fromLabel.wcConstructor:	XmCreateLabel
X*fromLabel.labelString:		Begin Time:
X*fromLabel.alignment:		ALIGNMENT_END
X
X*toLabel.wcConstructor:		XmCreateLabel
X*toLabel.labelString:		End Time:
X*toLabel.alignment:		ALIGNMENT_END
X
X*fromTime.wcConstructor:	XmCreateText
X*toTime.wcConstructor:		XmCreateText
X
X*fromType.wcConstructor:	XmCreateRadioBox
X*fromType.orientation:		HORIZONTAL
X*fromType.wcChildren:		sclk, scet, ert, mst, rct
X
X*toType.wcConstructor:		XmCreateRadioBox
X*toType.orientation:		HORIZONTAL
X*toType.wcChildren:		sclk, scet, ert, mst, rct
X
X*table*sclk.set:		True
X*table*sclk.wcConstructor:	XmCreateToggleButtonGadget
X*table*scet.wcConstructor:	XmCreateToggleButtonGadget
X*table*ert.wcConstructor:	XmCreateToggleButtonGadget
X*table*mst.wcConstructor:	XmCreateToggleButtonGadget
X*table*rct.wcConstructor:	XmCreateToggleButtonGadget
X
X#ifdef Xrm_COMMENT
X----------------------------------------------------------------------
X
XThis section provides the resource specifications for the direct
Xmanipulation panel which allows a user to specify a set of data
Xtypes, data transforms, and data sinks, along with the data flows
Xwhich connect each of the foregoing.
X
XAlong the left side are three row columns, left to right.  The leftmost
Xrow column contains buttons representing the different data types which
Xcan be queried.  This will certainly change per mission, and probably
Xper user.  
X
XThe second row column contains buttons representing the different
Xtransformations which may be applied to the data.  Several are basically
Xmission independent, such as WSE filtering and DMD.  Others may be
Xadded on a per mission basis, and some details may be frequently
Xspecified on a per user basis.
X
XThe third row column contains buttons representing the different
Xdata sinks which are available.  These are probably never changed.
X
X----------------------------------------------------------------------
X#endif
X
X*panel.wcConstructor:		XmCreateForm
X*panel.wcChildren:		controlFrame, displaySW
X
X*controlFrame.wcConstructor:	XmCreateFrame
X*controlFrame.wcChildren:	controlRC
X*controlFrame.topAttachment:	ATTACH_FORM
X*controlFrame.leftAttachment:	ATTACH_FORM
X#controlFrame.bottomAttachment:	ATTACH_FORM
X
X*controlRC.wcConstructor:	XmCreateRowColumn
X*controlRC.orientation:		HORIZONTAL
X#controlRC.packing:		PACK_COLUMN
X*controlRC.wcChildren:		dataRC, transRC, sinkRC
X
X#
X# Data Instantiation Buttons
X#
X
X*dataRC.wcConstructor:		XmCreateRowColumn
X*dataRC.wcChildren:		d1,d2,d3,d4,d5,d6,d7
X
X*dataRC.d1.wcConstructor:	XmCreatePushButtonGadget
X*dataRC.d2.wcConstructor:	XmCreatePushButtonGadget
X*dataRC.d3.wcConstructor:	XmCreatePushButtonGadget
X*dataRC.d4.wcConstructor:	XmCreatePushButtonGadget
X*dataRC.d5.wcConstructor:	XmCreatePushButtonGadget
X*dataRC.d6.wcConstructor:	XmCreatePushButtonGadget
X*dataRC.d7.wcConstructor:	XmCreatePushButtonGadget
X
X*dataRC.d1.labelString:		CR5A
X*dataRC.d2.labelString:		CR7A
X*dataRC.d3.labelString:		GS4B
X*dataRC.d4.labelString:		GS08
X*dataRC.d5.labelString:		GS10
X*dataRC.d6.labelString:		GS10A
X*dataRC.d7.labelString:		UV5A
X
X#
X# Trans Instantiation Buttons
X#
X
X*transRC.wcConstructor:		XmCreateRowColumn
X*transRC.wcChildren:		t1,t2,t3,t4,t5,t6, t7
X
X*transRC.t1.wcConstructor:	XmCreatePushButtonGadget
X*transRC.t2.wcConstructor:	XmCreatePushButtonGadget
X*transRC.t3.wcConstructor:	XmCreatePushButtonGadget
X*transRC.t4.wcConstructor:	XmCreatePushButtonGadget
X*transRC.t5.wcConstructor:	XmCreatePushButtonGadget
X*transRC.t6.wcConstructor:	XmCreatePushButtonGadget
X*transRC.t7.wcConstructor:	XmCreatePushButtonGadget
X
X*transRC.t1.labelString:	Channelize
X*transRC.t2.labelString:	Generate ECDRs
X*transRC.t3.labelString:	Filter SFDUs
X*transRC.t4.labelString:	Generate IDFs
X*transRC.t5.labelString:	Display on DMD
X*transRC.t6.labelString:	Template
X*transRC.t7.labelString:	SFDU Browser
X
X#
X# Sink Instantiation Buttons
X#
X
X*sinkRC.wcConstructor:		XmCreateRowColumn
X*sinkRC.wcChildren:		s1,s2,s3,s4,s5,s6,s7
X
X*sinkRC.s1.wcConstructor:	XmCreatePushButtonGadget
X*sinkRC.s2.wcConstructor:	XmCreatePushButtonGadget
X*sinkRC.s3.wcConstructor:	XmCreatePushButtonGadget
X*sinkRC.s4.wcConstructor:	XmCreatePushButtonGadget
X*sinkRC.s5.wcConstructor:	XmCreatePushButtonGadget
X*sinkRC.s6.wcConstructor:	XmCreatePushButtonGadget
X*sinkRC.s7.wcConstructor:	XmCreatePushButtonGadget
X
X*sinkRC.s1.labelString:		UNIX stdout
X*sinkRC.s2.labelString:		UNIX file
X*sinkRC.s3.labelString:		UNIX pipe
X*sinkRC.s4.labelString:		CDA spooler
X*sinkRC.s5.labelString:		DTS virtual circuit
X*sinkRC.s6.labelString:		DTS Broadcast
X*sinkRC.s7.labelString:		TCP/IP socket
X
X#
X# Scrolled Data Flow `Drawing' Area
X#
X
X*displaySW.wcConstructor:		XmCreateScrolledWindow
X*displaySW.scrollingPolicy:		AUTOMATIC
X*displaySW.scrollBarDisplayPolicy:	AS_NEEDED
X*displaySW.wcChildren:			drawing
X*displaySW.topAttachment:		ATTACH_FORM
X*displaySW.leftAttachment:		ATTACH_WIDGET
X*displaySW.leftWidget:			*controlFrame
X*displaySW.leftOffset:			10
X*displaySW.bottomAttachment:		ATTACH_FORM
X*displaySW.rightAttachment:		ATTACH_FORM
X
X*drawing.wcConstructor:		XmCreateDrawingArea
X*drawing.width:			700
X*drawing.height:		700
X*drawing.wcCallback:		WcSetValueCB(*displaySW.workWindow: this )
X
X#ifdef Xrm_COMMENT
X----------------------------------------------------------------------
X
XThis section provides the resource specifications for the msgWindow, a
Xscrolled text window for trace, heartbeat, warning, and error messages.
X
X----------------------------------------------------------------------
X#endif
X
X*main.msgWindow.wcConstructor:	XmCreateText
X*main.msgWindow.wcCallback:	WcSetValueCB(*main.workWindow: this)
X
X*main.vscroll.wcConstructor:    XmCreateScrollBar
X*main.vscroll.wcCallback:       WcSetValueCB( *main.verticalScrollBar: this )
+FUNKY+STUFF+
echo '-rw-r--r--  1 david       18920 Jun 28 09:13 Mri07.PDWidgets    (as sent)'
chmod u=rw,g=r,o=r Mri07.PDWidgets
ls -l Mri07.PDWidgets
echo x - MriRegMotif.c
sed 's/^X//' > MriRegMotif.c <<'+FUNKY+STUFF+'
X/*
X** Copyright (c) 1990 David E. Smyth
X**
X** This file was derived from work performed by Martin Brunecky at
X** Auto-trol Technology Corporation, Denver, Colorado, under the
X** following copyright:
X**
X*******************************************************************************
X* Copyright 1990 by Auto-trol Technology Corporation, Denver, Colorado.
X*
X*                        All Rights Reserved
X*
X* Permission to use, copy, modify, and distribute this software and its
X* documentation for any purpose and without fee is hereby granted, provided
X* that the above copyright notice appears on all copies and that both the
X* copyright and this permission notice appear in supporting documentation
X* and that the name of Auto-trol not be used in advertising or publicity
X* pertaining to distribution of the software without specific, prior written
X* permission.
X*
X* Auto-trol disclaims all warranties with regard to this software, including
X* all implied warranties of merchantability and fitness, in no event shall
X* Auto-trol be liable for any special, indirect or consequential damages or
X* any damages whatsoever resulting from loss of use, data or profits, whether
X* in an action of contract, negligence or other tortious action, arising out
X* of or in connection with the use or performance of this software.
X*******************************************************************************
X**
X** Redistribution and use in source and binary forms are permitted
X** provided that the above copyright notice and this paragraph are
X** duplicated in all such forms and that any documentation, advertising
X** materials, and other materials related to such distribution and use
X** acknowledge that the software was developed by David E. Smyth.  The
X** name of David E. Smyth may not be used to endorse or promote products
X** derived from this software without specific prior written permission.
X** THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
X** WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
X** MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
X**
X*/
X
X/*
X* SCCS_data: @(#)MriRegisterMotif.c 1.0 ( 19 June 1990 )
X*
X* Subsystem_group:
X*
X*     Widget Creation Library - Motif Resource Interpreter
X*
X* Module_description:
X*
X*     This module contains registration routine for all Motif
X*     widget/gadget constructors and classes.
X*
X* Module_interface_summary: 
X*
X*     void MriRegisterMotif ( XtAppContext app )
X*
X* Module_history:
X*                                                  
X*   mm/dd/yy  initials  function  action
X*   --------  --------  --------  ---------------------------------------------
X*   04/03/90  MarBru    Create..
X*
X* Design_notes:
X*
X*******************************************************************************
X*/
X/*
X*******************************************************************************
X* Include_files.
X*******************************************************************************
X*/
X
X#ifdef MOTIF
X
X#include <Xm/Xm.h>
X
X#include <Xm/ArrowB.h>
X#include <Xm/ArrowBG.h>
X#include <Xm/BulletinB.h>
X#include <Xm/CascadeB.h>
X#include <Xm/CascadeBG.h>
X#include <Xm/Command.h>
X#include <Xm/DialogS.h>
X#include <Xm/DrawingA.h>
X#include <Xm/DrawnB.h>
X#include <Xm/FileSB.h>
X#include <Xm/Form.h>
X#include <Xm/Frame.h>
X#include <Xm/Label.h>
X#include <Xm/LabelG.h>
X#include <Xm/List.h>
X#include <Xm/MainW.h>
X#include <Xm/MenuShell.h>
X#include <Xm/MessageB.h>
X#include <Xm/PanedW.h>
X#include <Xm/PushB.h>
X#include <Xm/PushBG.h>
X#include <Xm/RowColumn.h>
X#include <Xm/Scale.h>
X#include <Xm/ScrollBar.h>
X#include <Xm/ScrolledW.h>
X#include <Xm/SelectioB.h>
X#include <Xm/SeparatoG.h>
X#include <Xm/Separator.h>
X#include <Xm/Text.h>
X#include <Xm/ToggleB.h>
X#include <Xm/ToggleBG.h>
X
Xvoid MriRegisterMotif ( app )
X    XtAppContext app;
X{
X#define RCONST( name, func ) WcRegisterConstructor ( app, name, func )
X#define RCN( name, class )   WcRegisterClassName ( app, name, class )
X#define RCP( name, class )   WcRegisterClassPtr  ( app, name, class )
X
X/* -- register all Motif constructors */
X RCONST( "XmCreateArrowButton",		XmCreateArrowButton		);
X RCONST( "XmCreateArrowButtonGadget",	XmCreateArrowButtonGadget	);
X RCONST( "XmCreateBulletinBoard",	XmCreateBulletinBoard		);
X RCONST( "XmCreateBulletinBoardDialog",	XmCreateBulletinBoardDialog	);
X RCONST( "XmCreateCascadeButton",	XmCreateCascadeButton		);
X RCONST( "XmCreateCascadeButtonGadget",	XmCreateCascadeButtonGadget	);
X RCONST( "XmCreateCommand",		XmCreateCommand			);
X RCONST( "XmCreateDialogShell",		XmCreateDialogShell		);
X RCONST( "XmCreateDrawingArea",		XmCreateDrawingArea		);
X RCONST( "XmCreateDrawnButton",		XmCreateDrawnButton		);
X RCONST( "XmCreateErrorDialog",		XmCreateErrorDialog		);
X RCONST( "XmCreateFileSelectionBox",	XmCreateFileSelectionBox	);
X RCONST( "XmCreateFileSelectionDialog",	XmCreateFileSelectionDialog	);
X RCONST( "XmCreateForm",		XmCreateForm			);
X RCONST( "XmCreateFormDialog",		XmCreateFormDialog		);
X RCONST( "XmCreateFrame",		XmCreateFrame			);
X RCONST( "XmCreateInformationDialog",	XmCreateInformationDialog	);
X RCONST( "XmCreateLabel",		XmCreateLabel			);
X RCONST( "XmCreateLabelGadget",		XmCreateLabelGadget		);
X RCONST( "XmCreateList",		XmCreateList			);
X RCONST( "XmCreateMainWindow",		XmCreateMainWindow		);
X RCONST( "XmCreateMenuBar",		XmCreateMenuBar			);
X RCONST( "XmCreateMenuShell",		XmCreateMenuShell		);
X RCONST( "XmCreateMessageBox",		XmCreateMessageBox		);
X RCONST( "XmCreateMessageDialog",	XmCreateMessageDialog		);
X RCONST( "XmCreateOptionMenu",		XmCreateOptionMenu		);
X RCONST( "XmCreatePanedWindow",		XmCreatePanedWindow		);
X RCONST( "XmCreatePopupMenu",		XmCreatePopupMenu		);
X RCONST( "XmCreatePromptDialog",	XmCreatePromptDialog		);
X RCONST( "XmCreatePulldownMenu",	XmCreatePulldownMenu		);
X RCONST( "XmCreatePushButton",		XmCreatePushButton		);
X RCONST( "XmCreatePushButtonGadget",	XmCreatePushButtonGadget	);
X RCONST( "XmCreateQuestionDialog",	XmCreateQuestionDialog		);
X RCONST( "XmCreateRadioBox",		XmCreateRadioBox		);
X RCONST( "XmCreateRowColumn",		XmCreateRowColumn		);
X RCONST( "XmCreateScale",		XmCreateScale			);
X RCONST( "XmCreateScrollBar",		XmCreateScrollBar		);
X RCONST( "XmCreateScrolledList",	XmCreateScrolledList		);
X RCONST( "XmCreateScrolledText",	XmCreateScrolledText		);
X RCONST( "XmCreateScrolledWindow",	XmCreateScrolledWindow		);
X RCONST( "XmCreateSelectionBox",	XmCreateSelectionBox		);
X RCONST( "XmCreateSelectionDialog",	XmCreateSelectionDialog		);
X RCONST( "XmCreateSeparator",		XmCreateSeparator		);
X RCONST( "XmCreateSeparatorGadget",	XmCreateSeparatorGadget		);
X RCONST( "XmCreateText",		XmCreateText			);
X RCONST( "XmCreateToggleButton",	XmCreateToggleButton		);
X RCONST( "XmCreateToggleButtonGadget",	XmCreateToggleButtonGadget	);
X RCONST( "XmCreateWarningDialog",	XmCreateWarningDialog		);
X RCONST( "XmCreateWorkingDialog",	XmCreateWorkingDialog		);
X
X/* -- register Motif widget classes */
X   RCP("xmArrowButtonWidgetClass",	xmArrowButtonWidgetClass	);
X   RCN("XmArrowButton",			xmArrowButtonWidgetClass	);
X   RCP("xmArrowButtonGadgetClass",	xmArrowButtonGadgetClass	);
X   RCN("XmArrowButtonGadget",		xmArrowButtonGadgetClass	);
X   RCP("xmBulletinBoardWidgetClass",	xmBulletinBoardWidgetClass	);
X   RCN("XmBulletinBoard",		xmBulletinBoardWidgetClass	);
X   RCP("xmCascadeButtonWidgetClass",	xmCascadeButtonWidgetClass	);
X   RCN("XmCascadeButton",		xmCascadeButtonWidgetClass	);
X   RCP("xmCascadeButtonGadgetClass",	xmCascadeButtonGadgetClass	);
X   RCN("XmCascadeButtonGadget",		xmCascadeButtonGadgetClass	);
X   RCP("xmCommandWidgetClass",		xmCommandWidgetClass		);
X   RCN("XmCommand",			xmCommandWidgetClass		);
X   RCP("xmDialogShellWidgetClass",	xmDialogShellWidgetClass	);
X   RCN("XmDialogShell",			xmDialogShellWidgetClass	);
X   RCP("xmDrawingAreaWidgetClass",	xmDrawingAreaWidgetClass	);
X   RCN("XmDrawingArea",			xmDrawingAreaWidgetClass	);
X   RCP("xmDrawnButtonWidgetClass",	xmDrawnButtonWidgetClass	);
X   RCN("XmDrawnButton",			xmDrawnButtonWidgetClass	);
X   RCP("xmFileSelectionBoxWidgetClass",	xmFileSelectionBoxWidgetClass	);
X   RCN("XmFileSelectionBox",		xmFileSelectionBoxWidgetClass	);
X   RCP("xmFormWidgetClass",		xmFormWidgetClass		);
X   RCN("XmForm",			xmFormWidgetClass		);
X   RCP("xmFrameWidgetClass",		xmFrameWidgetClass		);
X   RCN("XmFrame",			xmFrameWidgetClass		);
X   RCP("xmGadgetClass",			xmGadgetClass			);
X   RCN("XmGadget",			xmGadgetClass			);
X   RCP("xmLabelWidgetClass",		xmLabelWidgetClass		);
X   RCN("XmLabel",			xmLabelWidgetClass		);
X   RCP("xmLabelGadgetClass",		xmLabelGadgetClass		);
X   RCN("XmLabelGadget",			xmLabelGadgetClass		);
X   RCP("xmListWidgetClass",		xmListWidgetClass		);
X   RCN("XmList",			xmListWidgetClass		);
X   RCP("xmMainWindowWidgetClass",	xmMainWindowWidgetClass		);
X   RCN("XmMainWindow",			xmMainWindowWidgetClass		);
X   RCP("xmManagerWidgetClass",		xmManagerWidgetClass		);
X   RCN("XmManager",			xmManagerWidgetClass		);
X   RCP("xmMenuShellWidgetClass",	xmMenuShellWidgetClass		);
X   RCN("XmMenuShell",			xmMenuShellWidgetClass		);
X   RCP("xmMessageBoxWidgetClass",	xmMessageBoxWidgetClass		);
X   RCN("XmMessageBox",			xmMessageBoxWidgetClass		);
X   RCP("xmPanedWindowWidgetClass",	xmPanedWindowWidgetClass	);
X   RCN("XmPanedWindow",			xmPanedWindowWidgetClass	);
X   RCP("xmPrimitiveWidgetClass",	xmPrimitiveWidgetClass		);
X   RCN("XmPrimitive",			xmPrimitiveWidgetClass		);
X   RCP("xmPushButtonWidgetClass",	xmPushButtonWidgetClass		);
X   RCN("XmPushButton",			xmPushButtonWidgetClass		);
X   RCP("xmPushButtonGadgetClass",	xmPushButtonGadgetClass		);
X   RCN("XmPushButtonGadget",		xmPushButtonGadgetClass		);
X   RCP("xmRowColumnWidgetClass",	xmRowColumnWidgetClass		);
X   RCN("XmRowColumn",			xmRowColumnWidgetClass		);
X/* RCP("xmSashWidgetClass",		xmSashWidgetClass		);  */
X/* RCN("XmSash",			xmSashWidgetClass		);  */
X   RCP("xmScaleWidgetClass",		xmScaleWidgetClass		);
X   RCN("XmScale",			xmScaleWidgetClass		);
X   RCP("xmScrollBarWidgetClass",	xmScrollBarWidgetClass		);
X   RCN("XmScrollBar",			xmScrollBarWidgetClass		);
X   RCP("xmScrolledWindowWidgetClass",	xmScrolledWindowWidgetClass	);
X   RCN("XmScrolledWindow",		xmScrolledWindowWidgetClass	);
X   RCP("xmSelectionBoxWidgetClass",	xmSelectionBoxWidgetClass	);
X   RCN("XmSelectionBox",		xmSelectionBoxWidgetClass	);
X   RCP("xmSeparatorWidgetClass",	xmSeparatorWidgetClass		);
X   RCN("XmSeparator",			xmSeparatorWidgetClass		);
X   RCP("xmSeparatorGadgetClass",	xmSeparatorGadgetClass		);
X   RCN("XmSeparatorGadget",		xmSeparatorGadgetClass		);
X   RCP("xmTextWidgetClass",		xmTextWidgetClass		);
X   RCN("XmText",			xmTextWidgetClass		);
X   RCP("xmToggleButtonWidgetClass",	xmToggleButtonWidgetClass	);
X   RCN("XmToggleButton",		xmToggleButtonWidgetClass	);
X   RCP("xmToggleButtonGadgetClass",	xmToggleButtonGadgetClass	);
X   RCN("XmToggleButtonGadget",		xmToggleButtonGadgetClass	);
X
X#undef  RCONST
X#undef  RCN
X#undef  RCP
X}
X#endif MOTIF
+FUNKY+STUFF+
echo '-rw-r--r--  1 david       10868 Jun 28 09:13 MriRegMotif.c    (as sent)'
chmod u=rw,g=r,o=r MriRegMotif.c
ls -l MriRegMotif.c
exit 0

dan
----------------------------------------------------
O'Reilly && Associates   argv at sun.com / argv at ora.com
Opinions expressed reflect those of the author only.



More information about the Comp.sources.x mailing list