home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 October
/
usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso
/
x
/
volume10
/
wcl
/
part05
< prev
next >
Wrap
Internet Message Format
|
1990-12-17
|
57KB
Path: uunet!bellcore!rutgers!sun-barr!newstop!exodus!jpl-devvax.jpl.nasa.gov
From: david@jpl-devvax.jpl.nasa.gov (David E. Smyth)
Newsgroups: comp.sources.x
Subject: v10i053: wcl -- Widget Creation Library, Part05/11
Message-ID: <4682@exodus.Eng.Sun.COM>
Date: 18 Dec 90 02:03:26 GMT
References: <csx-10i049:wcl@uunet.UU.NET>
Sender: news@exodus.Eng.Sun.COM
Lines: 1561
Approved: argv@sun.com
Submitted-by: david@jpl-devvax.jpl.nasa.gov (David E. Smyth)
Posting-number: Volume 10, Issue 53
Archive-name: wcl/part05
# to unbundle, "sh" this file -- DO NOT use csh
# SHAR archive format. Archive created Fri Oct 19 09:32:30 PDT 1990
echo x - M5.Dialogs
sed 's/^X//' > M5.Dialogs <<'+FUNKY+STUFF+'
X Dialogs
X -------
X
X This example allows instances of each type of Motif dialog to be
X selected from a pulldown menu. Both statically created and dynamically
X created dialogs are demonstrated.
X
X Funny Names Due To Motif Constructors
X -------------------------------------
X
X Motif constructors often introduce extra widgets. In this example, the
X buttons on the menus cause various types of dialog boxes to be managed
X (popped-up). Note the names required:
X
X *pd.activateCallback: WcManageCB( *PromptDialog.PromptDialog )
X
X This seemingly strange naming can be detected using the wcTrace
X resource. The XmCreatePromptDialog constructor creates a dialog shell
X named `PromptDialog' and a SelectionBox child which is also named
X `PromptDialog'. In order to see the SelectionBox, it must be managed,
X not just the dialog shell. A common error is the following:
X
X *pd.activateCallback: WcManageCB( *PromptDialog )
X
X This simply causes the dialog shell to pop-up, but it will be empty:
X its child, the SelectionBox, is still not managed and so will not be
X visible.
X
X Note also that not all dialog constructors create pop-up shells
X using the same naming conventions in Motif 1.0.
X
X*************************************************************************
X** NOTE! Motif 1.1 will use a common and different naming convention: **
X** shells built be XmCreate*Dialog will be named <name>_popup !!!!!!!! **
X*************************************************************************
X
X
X Widgets Statically Created By XmCreate*Dialog Should Be Unmanaged
X -----------------------------------------------------------------
X
X Otherwise, they will appear at widget creation time in the upper
X left location of the screen (at least when using mwm). Probably
X not what you had in mind.
X
X
X Dynamically Created Widgets
X ---------------------------
X
X Most of the dialogs in this example are dynamically created.
X When they are created, the WcCreateChildrenCB() specifies
X the parentage of the dynamically created widget. The dynamcially
X created children are NOT listed in any wcChildren resource.
X
X o The heirarchy of statically (initially) created
X widgets is specified by wcChildren resources.
X
X o The parentage of dynamically created widgets
X is specified by the first argument to the
X WcCreateChildrenCB() callback function.
X
X Multiple Identical Widgets
X --------------------------
X
X This example allows multiple identical copies of the dynamically
X created dialog boxes. The buttons on such dynamic dialos
X invoke WcDestroyCB, which is effectively XtDestroy().
X
X Dynamically Created Once Only
X -----------------------------
X
X The WorkingDialog presents an example of a common use of dynamically
X created widgets. The WorkingDialog is dynamically created the first
X time it is asked for, and from then on it is simply unmanaged and
X re-managed.
X
X ----------------------------------------------------------------------
X
X# The dialogs listed as children of Mri are the statically created dialogs:
X#
XMri.wcChildren: menuBar, BulletinBoardDialog, ErrorDialog
XMri.title: Mri using M5.Dialogs
X
X# Only the first two dialogs are statically created, with exactly
X# one instance existing throughout the life of the process.
X#
X# The button's callback unmanages the BulletinBoardDialog
X# child of the shell.
X#
X*BulletinBoardDialog.wcConstructor: XmCreateBulletinBoardDialog
X*BulletinBoardDialog.wcManaged: False
X*BulletinBoardDialog.wcTrace: True
X*BulletinBoardDialog.wcChildren: bbButton
X*bbButton.wcConstructor: XmCreatePushButton
X*bbButton.labelString: Button on a BulletinBoardDialog
X*bbButton.activateCallback: WcUnmanageCB( ~BulletinBoardDialog )
X
X# Statically created, so buttons just unmanage:
X#
X*ErrorDialog.wcConstructor: XmCreateErrorDialog
X*ErrorDialog.wcTrace: True
X*ErrorDialog.wcManaged: False
X*ErrorDialog.cancelCallback: WcUnmanageCB(this)
X*ErrorDialog.helpCallback: WcUnmanageCB(this)
X*ErrorDialog.okCallback: WcUnmanageCB(this)
X
X# All the other dialogs are dynamically created, so they start out
X# managed, and the std buttons destroy the pop-up (parent) shell:
X
X*cancelCallback: WcDestroyCB( ~ )
X*helpCallback: WcDestroyCB( ~ )
X*okCallback: WcDestroyCB( ~ )
X
X*FileSelectionDialog.wcConstructor: XmCreateFileSelectionDialog
X*FileSelectionDialog.wcTrace: True
X
X#
X# The button's callback destroys the parent of the parent of the button
X# which is the dialog shell.
X#
X*FormDialog.wcConstructor: XmCreateFormDialog
X*FormDialog.wcTrace: True
X*FormDialog.wcChildren: fdButton
X*fdButton.wcConstructor: XmCreatePushButton
X*fdButton.labelString: Button on a FormDialog
X*fdButton.activateCallback: WcDestroyCB( ^^ )
X
X*InformationDialog.wcConstructor: XmCreateInformationDialog
X*InformationDialog.wcTrace: True
X
X*MessageDialog.wcConstructor: XmCreateMessageDialog
X*MessageDialog.wcTrace: True
X
X*PromptDialog.wcConstructor: XmCreatePromptDialog
X*PromptDialog.wcTrace: True
X
X*QuestionDialog.wcConstructor: XmCreateQuestionDialog
X*QuestionDialog.wcTrace: True
X
X*SelectionDialog.wcConstructor: XmCreateSelectionDialog
X*SelectionDialog.wcTrace: True
X
X*WarningDialog.wcConstructor: XmCreateWarningDialog
X*WarningDialog.wcTrace: True
X
X! Note: this dialog is dynamically created, and then
X! simply unmanaged and remanaged.
X!
X*WorkingDialog.wcConstructor: XmCreateWorkingDialog
X*WorkingDialog.wcTrace: True
X*WorkingDialog.cancelCallback: WcUnmanageCB( this )
X*WorkingDialog.helpCallback: WcUnmanageCB( this )
X*WorkingDialog.okCallback: WcUnmanageCB( this )
X
X ----------------------------------------------------------------------
X
X Below are the resources for the menuBar and all its children.
X
X ----------------------------------------------------------------------
X
X*menuBar.wcConstructor: XmCreateMenuBar
X*menuBar.wcChildren: fileMenu, file, \
X staticDialogMenu, staticDialogs, \
X dynamicDialogMenu, dynamicDialogs
X
X! fileMenu contains only a quit button
X
X*fileMenu.wcConstructor: XmCreatePulldownMenu
X*fileMenu.wcManaged: False
X*fileMenu.wcChildren: quit
X
X*quit.wcConstructor: XmCreateCascadeButton
X*quit.labelString: Quit
X*quit.activateCallback: WcExitCB
X
X*file.wcConstructor: XmCreateCascadeButton
X*file.labelString: File
X*file.subMenuId: *fileMenu
X
X! staticDialogMenu contains one button for each dialog
X! which is statically (initially) created. These dialogs
X! are managed (popped-up) when the cascade button is activated.
X
X*staticDialogs.wcConstructor: XmCreateCascadeButton
X*staticDialogs.labelString: Manage Existing Dialogs
X*staticDialogs.subMenuId: *staticDialogMenu
X
X*staticDialogMenu.wcConstructor: XmCreatePulldownMenu
X*staticDialogMenu.wcManaged: False
X*staticDialogMenu.wcChildren: bb, ed
X
X! The BulletinBoardDialog was statically created, so we just need to
X! manage it.
X! Note unexpected wierdness of name:
X
X*bb.wcConstructor: XmCreateCascadeButton
X*bb.labelString: Manage BulletinBoardDialog
X*bb.activateCallback: WcManageCB( \
X *BulletinBoardDialog_popup.BulletinBoardDialog)
X
X! Statically created, just manage the ErrorDialog to make it pop-up.
X! Note that only one ErrorDialog widget exists, so once it is managed
X! subsequent menu button selection have no apparent effect.
X
X*ed.wcConstructor: XmCreateCascadeButton
X*ed.labelString: Manage ErrorDialog
X*ed.activateCallback: WcManageCB(*ErrorDialog.ErrorDialog)
X
X! dynamicDialogMenu contains one button for each dialog
X! which can be dynamically created. These dialogs are
X! created when the appropriate cascade button is activated.
X
X*dynamicDialogs.wcConstructor: XmCreateCascadeButton
X*dynamicDialogs.labelString: Create New Dialogs
X*dynamicDialogs.subMenuId: *dynamicDialogMenu
X
X*dynamicDialogMenu.wcConstructor: XmCreatePulldownMenu
X*dynamicDialogMenu.wcManaged: False
X*dynamicDialogMenu.wcChildren: fsd, fd, id, md, pd, \
X qd, sd, warn, sep, work
X
X*sep.wcConstructor: XmCreateSeparatorGadget
X
X! For all the rest of the dialogs, they are created, not just managed.
X!
X! This causes a new FileSelectionDialog to be created as a child of
X! the application shell.
X
X*fsd.wcConstructor: XmCreateCascadeButton
X*fsd.labelString: Create FileSelectionDialog
X*fsd.activateCallback: WcCreateChildrenCB( Mri, FileSelectionDialog )
X
X! The form dialog will be the child of the parent of the menu shell
X! which is the ancestor of the `fd' cascade button.
X!
X*fd.wcConstructor: XmCreateCascadeButton
X*fd.labelString: Create FormDialog
X*fd.activateCallback: WcCreateChildrenCB( ~^, FormDialog)
X
X*id.wcConstructor: XmCreateCascadeButton
X*id.labelString: Create InformationDialog
X*id.activateCallback: WcCreateChildrenCB( Mri, InformationDialog)
X
X*md.wcConstructor: XmCreateCascadeButton
X*md.labelString: Create MessageDialog
X*md.activateCallback: WcCreateChildrenCB( Mri, MessageDialog)
X
X*pd.wcConstructor: XmCreateCascadeButton
X*pd.labelString: Create PromptDialog
X*pd.activateCallback: WcCreateChildrenCB( Mri, PromptDialog)
X
X*qd.wcConstructor: XmCreateCascadeButton
X*qd.labelString: Create QuestionDialog
X*qd.activateCallback: WcCreateChildrenCB( Mri, QuestionDialog)
X
X*sd.wcConstructor: XmCreateCascadeButton
X*sd.labelString: Create SelectionDialog
X*sd.activateCallback: WcCreateChildrenCB( Mri, SelectionDialog)
X
X*warn.wcConstructor: XmCreateCascadeButton
X*warn.labelString: Create WarningDialog
X*warn.activateCallback: WcCreateChildrenCB( Mri, WarningDialog)
X
X! Here is something different: On the first push, the working dialog
X! is created. On subsequent pushes, it is just managed.
X!
X*work.wcConstructor: XmCreateCascadeButton
X*work.labelString: Create WorkingDialog
X*work.activateCallback: WcCreateChildrenCB( Mri, WorkingDialog), \
X WcSetValueCB( *work.labelString: Manage WorkingDialog), \
X WcSetValueCB( *work.activateCallback: \
X WcManageCB( *WorkingDialog.WorkingDialog) )
X
X*dialogs.wcConstructor: XmCreateCascadeButton
X*dialogs.subMenuId: *dialogMenu
X*dialogs.labelString: Dialogs
+FUNKY+STUFF+
echo '-rw-r--r-- 1 david 9874 Aug 6 09:36 M5.Dialogs (as sent)'
chmod u=rw,g=r,o=r M5.Dialogs
ls -l M5.Dialogs
echo x - M6.ListRowCol
sed 's/^X//' > M6.ListRowCol <<'+FUNKY+STUFF+'
X Scrolled Lists
X --------------
X
X This resource file presents the way one must deal with scrolled lists
X inside of XmRowColumn widgets. Its actually pretty easy now.
X
X Note, however that XmRowColumn does not do such a good job of
X resizing the scrolled window widget.
X
X ----------------------------------------------------------------------
X
X#*wcTrace: True
X
XMri.wcChildren: rc
XMri.title: M6.ListRowCol
X
X*rc.wcConstructor: XmCreateRowColumn
X*rc.wcChildren: quit, slist
X*rc.entryAlignment: ALIGNMENT_CENTER
X
X*quit.wcConstructor: XmCreatePushButton
X*quit.activateCallback: WcExitCB
X*quit.labelString: Push To Exit
X
X*slist.wcConstructor: XmCreateScrolledList
X*slist.items: This demo uses the XmRowColumn,\
X widget. Try resizing the window.,\
X You will see the list gets wider\\,,\
X but not longer.,\
X foo,bar, baz is a nice item,\
X zorp,the,quick,brown,fox,\
X jumped,over,the, lazy, dog, and, blew,\
X the, candle, out. This\\, and that, and,\
X more,to,come. That's all.
X*slist.itemCount: 26
X*slist.visibleItemCount: 11
X*slist.selectionPolicy: EXTENDED_SELECT
+FUNKY+STUFF+
echo '-rw-r--r-- 1 david 1097 Aug 6 09:36 M6.ListRowCol (as sent)'
chmod u=rw,g=r,o=r M6.ListRowCol
ls -l M6.ListRowCol
echo x - M6.ListTable
sed 's/^X//' > M6.ListTable <<'+FUNKY+STUFF+'
X Scrolled Lists in Tables
X ------------------------
X
X This resource file presents the way one must deal with scrolled lists
X which are managed by Table widgets. In the layout resource for the
X Table widget, we must name the scrolled window, NOT the list:
X
X *table.layout: quit 0 0 1 1 hH ;\
X slistSW 0 1 1 1
X
X If we simply said "slist" instead of "slistSW" then nothing
X appears, because slist is not one of the children of table.
X Rather, slistSW is the child of table, and slist is the
X child of slistSW.
X
X As an aside, the layout options hH on the quit button allow
X resizing to work nicely. Compare the behavior of the Table
X with the resize behavior of XmRowColumn. I think you will
X prefer Table over XmRowColumn.
X
X ----------------------------------------------------------------------
X
X#*wcTrace: True
X
XMri.wcChildren: table
XMri.title: M6.ListTable
X
X*table.wcClassName: Table
X*table.wcChildren: quit, slist
X*table.layout: quit 0 0 1 1 hH ;\
X slistSW 0 1 1 1
X
X*quit.wcConstructor: XmCreatePushButton
X*quit.activateCallback: WcExitCB
X*quit.labelString: Push To Exit
X
X*slist.wcConstructor: XmCreateScrolledList
X*slist.items: This demo uses the Table widget.,\
X Try resizing the window.,\
X You will see the list gets wider\\,,\
X AND longer - unlike with XmRowColumn.,\
X foo,bar, baz is a nice item,\
X zorp,the,quick,brown,fox,\
X jumped,over,the, lazy, dog, and, blew,\
X the, candle, out. This\\, and that, and,\
X more,to,come. That's all.
X*slist.itemCount: 26
X*slist.visibleItemCount: 11
X*slist.selectionPolicy: EXTENDED_SELECT
+FUNKY+STUFF+
echo '-rw-r--r-- 1 david 1636 Aug 6 09:36 M6.ListTable (as sent)'
chmod u=rw,g=r,o=r M6.ListTable
ls -l M6.ListTable
echo x - M7.Periodic
sed 's/^X//' > M7.Periodic <<'+FUNKY+STUFF+'
X! This example is taken from the periodic demo which came with Motif 1.0
X! and was developed by Michael K. Yee at OSF. To quote the original
X! README:
X!
X! Periodic is a demo of the displayable widgets in
X! Motif. Periodic presents many Motif widgets for
X! your visual and sensual enjoyment.
X!
X
XMri.wcChildren: main
XMri.title: Mri using M7.Periodic
X
X*background: Turquoise
X*fontList: -adobe-new century schoolbook-medium-r-normal--10-*
X
X*main.wcConstructor: XmCreateMainWindow
X*main.wcChildren: menuBar, table
X
X# If you want scrollbars, uncomment this line
X#*main.scrollingPolicy: AUTOMATIC
X
X##################################################################
X# Minimal menu bar
X##################################################################
X
X*menuBar.wcConstructor: XmCreateMenuBar
X*menuBar.wcCallback: WcSetValueCB(*main.menuBar: this)
X*menuBar.wcChildren: fileMenu, File, Edit, Help
X*menuBar*fontList: -b&h-lucida-medium-i-normal-sans-12-120-*
X
X*fileMenu.wcConstructor: XmCreatePulldownMenu
X*fileMenu.wcChildren: Quit
X*fileMenu.wcManaged: false
X
X*Quit.wcConstructor: XmCreateCascadeButton
X*Quit.activateCallback: WcExitCB
X
X*File.wcConstructor: XmCreateCascadeButton
X*File.subMenuId: *fileMenu
X
X*Edit.wcConstructor: XmCreateCascadeButton
X
X*Help.wcConstructor: XmCreateCascadeButton
X*Help.wcCallback: WcSetValueCB( ^.menuHelpWidget: this )
X
X##################################################################
X# Table Widget for Periodic Table
X##################################################################
X
X*table.wcClassName: Table
X*table.wcCallback: WcSetValueCB(*main.workWindow: this)
X*table.wcChildren: title, \
X 02, 03, 04, 05, 06, 62, \
X 17, 27, 47, 57, \
X Ia, 1, 2, 3, 4, 5, \
X IIa, 6, 7, 8, 9, \
X IIIb, 10, \
X IVa, 11, 12, 16, \
X Va, 13, 14, 15, dialogs, 19
X# name c r cs rs opt
X*table.layout: title 2 1 4 1 ;\
X Ia 1 1;\
X02 0 2; 1 1 2; IIa 2 2; Va 5 2; 62 6 2;\
X03 0 3; 2 1 3; 6 2 3; IIIb 3 3; IVa 4 3; 13 5 3;\
X04 0 4; 3 1 4; 7 2 4; 10 3 4 1 3; 11 4 4; 14 5 4;\
X05 0 5; 4 1 5; 8 2 5; 12 4 5; 15 5 5;\
X06 0 6; 5 1 6; 9 2 6; 16 4 6 2 1;\
X 17 1 7; 27 2 7; 47 4 7; 57 5 7;\
X dialogs 1 8 5 1;\
X 19 1 9;
X
X*title.wcConstructor: XmCreateLabel
X*title.labelString: The Periodic Table Of Motif Widgets
X*title.fontList: -b&h-lucida-bold-i-normal-sans-34-240-*
X
X# The following are simply for spacing. Composite is
X# perhaps the simplest Motif widget which can be created.
X*table.Composite.Width: 120
X*table.Composite.Height: 120
X*table.Composite.borderWidth: 0
X*table.02.wcClassName: Composite
X*table.02.width: 20
X*table.03.wcClassName: Composite
X*table.03.width: 20
X*table.04.wcClassName: Composite
X*table.04.width: 20
X*table.05.wcClassName: Composite
X*table.05.width: 20
X*table.06.wcClassName: Composite
X*table.06.width: 20
X*table.62.wcClassName: Composite
X*table.62.width: 20
X*table.17.wcClassName: Composite
X*table.17.height: 20
X*table.27.wcClassName: Composite
X*table.27.height: 20
X*table.47.wcClassName: Composite
X*table.47.height: 20
X*table.57.wcClassName: Composite
X*table.57.height: 20
X*table.19.wcClassName: Composite
X*table.19.height: 20
X
X# Labels above the columns: I use the same "display box"
X# as for widget types, but I just null out the label strings
X# and change the type fo the bottom widget to label.
X
X*filler.wcClassName: XmLabel
X*filler.labelString:
X
X*table.Ia.wcClassName: Table
X*table.Ia.wcChildren: filler, Ia
X*table.Ia.layout: filler 0 0; Ia 0 1 hH;
X*table.Ia.borderWidth: 0
X*table.Ia.Ia.wcClassName: XmLabel
X
X*table.IIa.wcClassName: Table
X*table.IIa.wcChildren: filler, IIa
X*table.IIa.layout: filler 0 0; IIa 0 1 hH;
X*table.IIa.borderWidth: 0
X*table.IIa.IIa.wcClassName: XmLabel
X
X*table.IIIb.wcClassName: Table
X*table.IIIb.wcChildren: filler, IIIb
X*table.IIIb.layout: filler 0 0; IIIb 0 1 hH;
X*table.IIIb.borderWidth: 0
X*table.IIIb.IIIb.wcClassName: XmLabel
X
X*table.IVa.wcClassName: Table
X*table.IVa.wcChildren: filler, IVa
X*table.IVa.layout: filler 0 0; IVa 0 1 hH;
X*table.IVa.borderWidth: 0
X*table.IVa.IVa.wcClassName: XmLabel
X
X*table.Va.wcClassName: Table
X*table.Va.wcChildren: filler, Va
X*table.Va.layout: filler 0 0; Va 0 1 hH;
X*table.Va.borderWidth: 0
X*table.Va.Va.wcClassName: XmLabel
X
X# These are the widget display boxes:
X
X*table*Table.wcChildren: an, w, n
X*table*Table.Layout: an 1 0 1 1 hH; w 0 1 2 1 ; n 0 2 2 1 hH;
X*table*Table.rowSpacing: 10
X*table*Table.borderWidth: 1
X*table.Table.an.wcClassName: XmLabel
X*table.Table.an.alignment: ALIGNMENT_END
X*table*Table.n.wcClassName: XmPushButton
X
X*1.wcClassName: Table
X*1.wcChildren: an, w, n
X*1.an.labelString: 1
X*1.w.wcClassName: XmSeparator
X*1.n.labelString: XmSeparator
X
X*2.wcClassName: Table
X*2.wcChildren: an, w, n
X*2.an.labelString: 2
X*2.w.wcClassName: XmArrowButton
X*2.n.labelString: XmArrowButton
X
X*3.wcClassName: Table
X*3.wcChildren: an, w, n
X*3.an.labelString: 3
X*3.w.wcClassName: XmPushButton
X*3.w.labelString: Format Disk
X*3.n.labelString: XmPushButton
X
X*4.wcClassName: Table
X*4.wcChildren: an, w, n
X*4.an.labelString: 4
X*4.w.wcClassName: XmToggleButton
X*4.w.labelString: Lights
X*4.n.labelString: XmToggleButton
X
X*5.wcClassName: Table
X*5.wcChildren: an, w, n
X*5.an.labelString: 5
X*5.w.wcClassName: XmLabel
X*5.w.labelString: Don't Panic
X*5.n.labelString: XmLabel
X
X*6.wcClassName: Table
X*6.wcChildren: an, colorOptions, w, n
X*6.an.labelString: 6
X*6.colorOptions.wcConstructor: XmCreatePulldownMenu
X*6.colorOptions.wcManaged: False
X*6.colorOptions.wcChildren: red, orange, yellow, green, blue, purple
X*6*colorOptions.red.wcClassName: XmPushButton
X*6*colorOptions.orange.wcClassName: XmPushButton
X*6*colorOptions.yellow.wcClassName: XmPushButton
X*6*colorOptions.green.wcClassName: XmPushButton
X*6*colorOptions.blue.wcClassName: XmPushButton
X*6*colorOptions.purple.wcClassName: XmPushButton
X# ^ Note the asterisk needed here!! colorOptions is actually
X# a child of a menu shell created by XmCreatePulldownMenu.
X*6.w.wcConstructor: XmCreateOptionMenu
X*6.w.labelString: color
X*6.w.subMenuId: *6*colorOptions
X*6.n.labelString: XmOptionMenu
X
X*7.wcClassName: Table
X*7.wcChildren: an, w, n
X*7.an.labelString: 7
X*7.w.wcClassName: XmScale
X*7.w.wcChildren: min, |, max
X*7.w.decimalPoints: 1
X*7.w.maximum: 50
X*7.w.orientation: HORIZONTAL
X*7.w.processingDirection: MAX_ON_RIGHT
X*7.w.showValue: True
X*7.w.titleString: Warp Factor
X*7.w.min.wcClassName: XmLabel
X*7.w.min.labelString: 0
X*7.w.|.wcClassName: XmLabel
X*7.w.max.wcClassName: XmLabel
X*7.w.max.labelString: 5
X*7.n.labelString: XmScale
X
X*8.wcClassName: Table
X*8.wcChildren: an, w, n
X*8.an.labelString: 8
X*8.w.wcConstructor: XmCreateRadioBox
X*8.w.wcChildren: WFNX, WCRB, WHKY
X*8.w.WFNX.wcClassName: XmToggleButtonGadget
X*8.w.WCRB.wcClassName: XmToggleButtonGadget
X*8.w.WHKY.wcClassName: XmToggleButtonGadget
X*8.n.labelString: XmRadioBox
X
X*9.wcClassName: Table
X*9.wcChildren: an, w, n
X*9.an.labelString: 9
X*9.w.wcClassName: XmText
X*9.w.value: Hello World
X*9.n.labelString: XmText
X
X*10.wcClassName: Table
X*10.wcChildren: an, w, n
X*10.an.labelString: 10
X*10.w.wcClassName: XmFileSelectionBox
X*10.w.dirMask: *.c
X*10.n.labelString: XmFileSelectionBox
X
X*11.wcClassName: Table
X*11.wcChildren: an, w, n
X*table.11.rowSpacing: 30
X*11.an.labelString: 11
X*11.w.wcClassName: XmScrollBar
X*11.w.orientation: HORIZONTAL
X*11.w.height: 20
X*11.n.labelString: XmScrollBar
X
X# Remember that XmCreateScrolledList creates an intermediate
X# parent named wSW, and that is the widget the table lays out.
X#
X*12.wcClassName: Table
X*12.wcChildren: an, w, n
X*table.12.layout: an 1 0 1 1 hH; wSW 0 1 2 1 ; n 0 2 2 1 hH;
X*12.an.labelString: 12
X*12.w.wcConstructor: XmCreateScrolledList
X*12*w.items: Foobar, Mumble, Glorp, Reggae, Rock, and, Roll
X*12*w.itemCount: 7
X*12*w.visibleItemCount: 3
X*12*w.listMarginWidth: 3
X*12.n.labelString: XmScrolledList
X
X# Note that the XmCascadeButton which pops-up the demoMenu
X# MUST be a child of an XmRowColumn. I used XmCreateMenuBar
X# to create the row column, because that it usually what
X# you will use when you've got pull-down menus. If the
X# cascade button is not a child of an XmRowColumn, you
X# will get a core dump in Motif. Sorry, I can't fix that here.
X#
X*13.wcClassName: Table
X*13.wcChildren: an, w, n
X*13.an.labelString: 13
X*13.n.labelString: XmPulldownMenu
X*13.w.wcConstructor: XmCreateMenuBar
X*13.w.wcChildren: demoMenu, menuButton
X*13.w.menuButton.wcClassName: XmCascadeButton
X*13.w.menuButton.labelString: Press For Menu
X*13.w.menuButton.subMenuId: *13.w*demoMenu
X*13.w.demoMenu.wcConstructor: XmCreatePulldownMenu
X*13.w.demoMenu.wcManaged: False
X*13.w.demoMenu.wcChildren: title, Black, Blue, Coral, LimeGreen, \
X Cyan, Goldenrod, Magenta, Pink
X*13.w*demoMenu.title.wcConstructor: XmCreateLabel
X*13.w*demoMenu.title.labelString: Choose Color of XmDrawingArea:
X*13.w*demoMenu.title.fontList: -b&h-lucida-bold-i-normal-sans-12-120-*
X*13.w*demoMenu*FontList: -b&h-lucida-medium-r-normal-sans-12-120-*
X# ^ Note the asterisk needed here!! demoMenu is actually
X# a child of a menu shell created by XmCreatePulldownMenu.
X
X
X*13*Black.wcClassName: XmCascadeButton
X*13*Blue.wcClassName: XmCascadeButton
X*13*Coral.wcClassName: XmCascadeButton
X*13*LimeGreen.wcClassName: XmCascadeButton
X*13*Cyan.wcClassName: XmCascadeButton
X*13*Goldenrod.wcClassName: XmCascadeButton
X*13*Magenta.wcClassName: XmCascadeButton
X*13*Pink.wcClassName: XmCascadeButton
X
X*13*Black.activateCallback: WcSetValueCB(*14.w.background: Black)
X*13*Blue.activateCallback: WcSetValueCB(*14.w.background: Blue)
X*13*Coral.activateCallback: WcSetValueCB(*14.w.background: Coral)
X*13*LimeGreen.activateCallback: WcSetValueCB(*14.w.background: LimeGreen)
X*13*Cyan.activateCallback: WcSetValueCB(*14.w.background: Cyan)
X*13*Goldenrod.activateCallback: WcSetValueCB(*14.w.background: Goldenrod)
X*13*Magenta.activateCallback: WcSetValueCB(*14.w.background: Magenta)
X*13*Pink.activateCallback: WcSetValueCB(*14.w.background: Pink)
X
X*14.wcClassName: Table
X*14.wcChildren: an, w, n
X*14.an.labelString: 14
X*14.w.wcClassName: XmDrawingArea
X*14.w.background: RoyalBlue
X*14.n.labelString: XmDrawingArea
X
X*15.wcClassName: Table
X*15.wcChildren: an, w, n
X*15.an.labelString: 15
X*15.w.wcClassName: XmDrawnButton
X*15.n.labelString: XmDrawnButton
X
X*16.wcClassName: Table
X*16.wcChildren: an, w, n
X*16.an.labelString: 16
X*16.w.wcClassName: XmPanedWindow
X*16.w.wcChildren: text1, text2
X*16.w.text1.wcClassName: XmText
X*16.w.text1.value: Motif Resource Interpreter
X*16.w.text2.wcClassName: XmText
X*16.w.text2.value: Version 1.04
X*16.n.labelString: XmPanedWindow
X
X*dialogs.wcClassName: Table
X*dialogs.wcChildren: error, info, question, warn, work
X*table.dialogs.borderWidth: 0
X*table.dialogs.layout: error 0 0; info 1 0; question 2 0; warn 3 0; work 4 0;
X*table.dialogs.columnSpacing: 10
X
X*dialogs.XmMessageBox.borderWidth: 1
X
X*error.wcClassName: XmMessageBox
X*error.dialogType: DIALOG_ERROR
X*error.messageString: Error Dialog
X
X*info.wcClassName: XmMessageBox
X*info.dialogType: DIALOG_INFORMATION
X*info.messageString: Information Dialog
X
X*message.wcClassName: XmMessageBox
X*message.dialogType: DIALOG_MESSAGE
X*message.messageString: Message Dialog
X
X*question.wcClassName: XmMessageBox
X*question.dialogType: DIALOG_QUESTION
X*question.messageString: Question Dialog
X
X*warn.wcClassName: XmMessageBox
X*warn.dialogType: DIALOG_WARNING
X*warn.messageString: Warning Dialog
X
X*work.wcClassName: XmMessageBox
X*work.dialogType: DIALOG_WORKING
X*work.messageString: Working Dialog
+FUNKY+STUFF+
echo '-rw-rw-r-- 1 david 11427 Oct 12 16:49 M7.Periodic (as sent)'
chmod u=rw,g=rw,o=r M7.Periodic
ls -l M7.Periodic
echo x - M8.Multi
sed 's/^X//' > M8.Multi <<'+FUNKY+STUFF+'
X Multiple Resource Files
X -----------------------
X
X This resource file explores the use multiple resource files which
X describe a single user interface.
X
X Appearance Defaults
X -------------------
X
X Below are application wide defaults for various widgets. Note that
X we can set resource values for things which are not themselves described
X in this resource file.
X
X N.B.: If you change the colors from B&W, you should change the
X borderColor of the Table widget. Someday, I will probably hack
X the Table widget to have Margin resources like XmRowColumn and
X then it won't be necessary
X
X ----------------------------------------------------------------------
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*background: Wheat
X*Table.borderColor: Wheat
X
X ----------------------------------------------------------------------
X
X Main Window
X -----------
X
X Motif's MainWindow widget type supports one of the classic "looks"
X of a window application, and of the Motif Style Guide in particular.
X
X ----------------------------------------------------------------------
X
XMri.wcChildren: main, loadSelect, saveSelect
XMri.title: Mri using M8.Multi
X
X*main.wcConstructor: XmCreateMainWindow
X*main.wcChildren: menuBar, commandWindow, msgWindow, vscroll
X
X ----------------------------------------------------------------------
X
X It is probably good practice to put all the resource file
X specifications in the top level (initial) resource file. This makes it
X easier to find which resource files are used, and makes it easier to
X change them when required. For example, I've got an application which
X requires adaptation for different spacecraft missions. Some of the
X interface components stay the same, some change. I can re-write the
X top level resource file, and just name different sub-resource files.
X None of the sub-resource files need to be changed.
X
X ----------------------------------------------------------------------
X
XMri.loadSelect.wcResFile: M8_Dialogs
XMri.saveSelect.wcResFile: M8_Dialogs
X
X*main.menuBar.wcResFile: M8_MenuBar
X*main.commandWindow.wcResFile: M8_Comm
X*main.msgWindow.wcResFile: M8_Text
X*main.vscroll.wcResFile: M8_Text
+FUNKY+STUFF+
echo '-rw-r--r-- 1 david 2378 Aug 6 09:36 M8.Multi (as sent)'
chmod u=rw,g=r,o=r M8.Multi
ls -l M8.Multi
echo x - M8_Comm
sed 's/^X//' > M8_Comm <<'+FUNKY+STUFF+'
X ----------------------------------------------------------------------
X
X The commandWindow is a Table widget with three stacked children. The
X top child contains a description of the query to be performed. The
X second child contains the submit controls including the time range to
X be queried. The third child is used to actually specify the data
X types, data transformations, and the data sinks using a graphic
X representing the flow of data.
X
X ----------------------------------------------------------------------
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 ----------------------------------------------------------------------
X
X We describe the Submit Control and panel portions of the commandWindow
X in separate files.
X
X ----------------------------------------------------------------------
X
X*submitCtrl.wcResFile: M8_Submit
X*panel.wcResFile: M8_Direct
+FUNKY+STUFF+
echo '-rw-r--r-- 1 david 1742 Aug 6 09:36 M8_Comm (as sent)'
chmod u=rw,g=r,o=r M8_Comm
ls -l M8_Comm
echo x - M8_Dialogs
sed 's/^X//' > M8_Dialogs <<'+FUNKY+STUFF+'
X ----------------------------------------------------------------------
X
X Note that this file describes two separate widgets. The loading
X function of Wc is smart enough to know that the file gets loaded
X exactly once.
X
X ----------------------------------------------------------------------
X
X*loadSelect.wcTrace: True
X*saveSelect.wcTrace: True
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)
+FUNKY+STUFF+
echo '-rw-r--r-- 1 david 707 Aug 6 09:36 M8_Dialogs (as sent)'
chmod u=rw,g=r,o=r M8_Dialogs
ls -l M8_Dialogs
echo x - M8_Direct
sed 's/^X//' > M8_Direct <<'+FUNKY+STUFF+'
X ----------------------------------------------------------------------
X
X This section provides the resource specifications for the direct
X manipulation panel which allows a user to specify a set of data
X types, data transforms, and data sinks, along with the data flows
X which connect each of the foregoing.
X
X Along the left side are three row columns, left to right. The leftmost
X row column contains buttons representing the different data types which
X can be queried. This will certainly change per mission, and probably
X per user.
X
X The second row column contains buttons representing the different
X transformations which may be applied to the data. Several are basically
X mission independent, such as WSE filtering and DMD. Others may be
X added on a per mission basis, and some details may be frequently
X specified on a per user basis.
X
X The third row column contains buttons representing the different
X data sinks which are available. These are probably never changed.
X
X ----------------------------------------------------------------------
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 )
+FUNKY+STUFF+
echo '-rw-r--r-- 1 david 4306 Aug 6 09:36 M8_Direct (as sent)'
chmod u=rw,g=r,o=r M8_Direct
ls -l M8_Direct
echo x - M8_MenuBar
sed 's/^X//' > M8_MenuBar <<'+FUNKY+STUFF+'
X Menu Bar
X --------
X
X Below are the resources for the menuBar and all its children. This
X menuBar is a child of a Motif MainWindow, and so must register itself
X with the MainWindow (named *main).
X
X Referencing Widgets In Other Files
X ----------------------------------
X
X The buttons *load and *saveAs cause dialog widgets to be managed.
X These dialog widgets are defined in a separate file. Since the
X callbacks will not be invoked until all the widgets are created,
X including the dialog widgets, the widgets will exist then, even if they
X are not yet created when the buttons are created.
X
X ----------------------------------------------------------------------
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*load.activateCallback: WcManageCB( *loadSelect.loadSelect )
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*saveAs.activateCallback: WcManageCB(*saveSelect.saveSelect)
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
+FUNKY+STUFF+
echo '-rw-r--r-- 1 david 3438 Aug 6 09:36 M8_MenuBar (as sent)'
chmod u=rw,g=r,o=r M8_MenuBar
ls -l M8_MenuBar
echo x - M8_Submit
sed 's/^X//' > M8_Submit <<'+FUNKY+STUFF+'
X
X This section provides the resource specifications for the Submit
X Control portion of the commandWindow. A Table widget is used as the
X manager widget because Row Column just can't do the job here, where we
X mix types of widgets with differing heights in a row, AND types of
X widgets with differing widths in a column. XmRowColumn gets fascist in
X such situations, and makes every cell the same width and height. We
X don't want that (wastes ALOT of real estate in this case). So, we'll
X try the Table Widget.
X
X ----------------------------------------------------------------------
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
+FUNKY+STUFF+
echo '-rw-r--r-- 1 david 3012 Aug 6 09:36 M8_Submit (as sent)'
chmod u=rw,g=r,o=r M8_Submit
ls -l M8_Submit
echo x - M8_Text
sed 's/^X//' > M8_Text <<'+FUNKY+STUFF+'
X This section provides the resource specifications for the msgWindow, a
X scrolled text window for trace, heartbeat, warning, and error messages.
X
X ----------------------------------------------------------------------
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 460 Aug 6 09:36 M8_Text (as sent)'
chmod u=rw,g=r,o=r M8_Text
ls -l M8_Text
echo x - M9.Colors
sed 's/^X//' > M9.Colors <<'+FUNKY+STUFF+'
X
X#*wcTrace: True
X
XMri.wcChildren: main
XMri.title: Mri using M9.Colors
X
X*background: Turquoise
X*fontList: -adobe-new century schoolbook-medium-r-normal--10-100-*
X
X*main.wcConstructor: XmCreateMainWindow
X*main.wcChildren: menuBar, wa
X
X##################################################################
X# Minimal menu bar
X##################################################################
X
X*menuBar.wcConstructor: XmCreateMenuBar
X*menuBar.wcChildren: fileMenu, File, Edit, Help
X*menuBar*fontList: -b&h-lucida-medium-i-normal-sans-12-120-*
X
X*fileMenu.wcConstructor: XmCreatePulldownMenu
X*fileMenu.wcChildren: Quit
X*fileMenu.wcManaged: false
X
X*Quit.wcConstructor: XmCreateCascadeButton
X*Quit.activateCallback: WcExitCB
X
X*File.wcConstructor: XmCreateCascadeButton
X*File.subMenuId: *fileMenu
X
X*Edit.wcConstructor: XmCreateCascadeButton
X
X*Help.wcConstructor: XmCreateCascadeButton
X*Help.wcCallback: WcSetValueCB( ^.menuHelpWidget: this )
X
X##################################################################
X# Work area consists of a table widget managing three identical
X# table widget children, layout left to right.
X##################################################################
X*wa.wcClassName: Table
X*wa.wcCallback: WcSetValueCB(*main.workWindow: this)
X*wa.wcChildren: left, middle, right
X*wa.layout: left 0 0 ; middle 1 0 ; right 2 0
X
X##################################################################
X# Table Widget : Three identical ones, which contain color buttons
X# and a drawing area.
X##################################################################
X
X*left.wcClassName: Table
X*left.wcChildren: RC, drawing
X*middle.wcClassName: Table
X*middle.wcChildren: RC, drawing
X*right.wcClassName: Table
X*right.wcChildren: RC, drawing
X*wa.Table.layout: RC 0 0 1 1 hH; drawing 0 1
X
X*drawing.wcClassName: XmDrawingArea
X*drawing.background: RoyalBlue
X
X*RC.wcConstructor: XmCreateRadioBox
X*RC.wcChildren: Aquamarine, Black, Blue, BlueViolet, \
X Brown, CadetBlue, Coral, CornflowerBlue, Cyan, DarkGreen, \
X DarkOliveGreen, DarkOrchid, DarkSlateBlue, DarkSlateGray, \
X DarkTurquoise, DimGray, Firebrick, ForestGreen, Gold, Goldenrod, \
X Gray, Green, GreenYellow, IndianRed, Khaki, LightBlue, LightGray, \
X LightSteelBlue, LimeGreen, Magenta, Maroon, MediumAquamarine, \
X MediumBlue, MediumForestGreen, MediumGoldenrod, MediumOrchid, \
X MediumSeaGreen, MediumSlateBlue, MediumTurquoise, MediumVioletRed, \
X MidnightBlue, NavyBlue, Orange, OrangeRed, Orchid, PaleGreen, \
X Pink, Plum, Red, Salmon, SeaGreen, Sienna, SkyBlue, SlateBlue, \
X SpringGreen, SteelBlue, Tan, Thistle, Transparent, Turquoise, Violet, \
X VioletRed, Wheat, White, Yellow, YellowGreen
X*RC.numColumns: 3
X*RC.packing: PACK_COLUMN
X
X*Aquamarine.wcClassName: XmToggleButtonGadget
X*Black.wcClassName: XmToggleButtonGadget
X*Blue.wcClassName: XmToggleButtonGadget
X*BlueViolet.wcClassName: XmToggleButtonGadget
X*Brown.wcClassName: XmToggleButtonGadget
X*CadetBlue.wcClassName: XmToggleButtonGadget
X*Coral.wcClassName: XmToggleButtonGadget
X*CornflowerBlue.wcClassName: XmToggleButtonGadget
X*Cyan.wcClassName: XmToggleButtonGadget
X*DarkGreen.wcClassName: XmToggleButtonGadget
X*DarkOliveGreen.wcClassName: XmToggleButtonGadget
X*DarkOrchid.wcClassName: XmToggleButtonGadget
X*DarkSlateBlue.wcClassName: XmToggleButtonGadget
X*DarkSlateGray.wcClassName: XmToggleButtonGadget
X*DarkTurquoise.wcClassName: XmToggleButtonGadget
X*DimGray.wcClassName: XmToggleButtonGadget
X*Firebrick.wcClassName: XmToggleButtonGadget
X*ForestGreen.wcClassName: XmToggleButtonGadget
X*Gold.wcClassName: XmToggleButtonGadget
X*Goldenrod.wcClassName: XmToggleButtonGadget
X*Gray.wcClassName: XmToggleButtonGadget
X*Green.wcClassName: XmToggleButtonGadget
X*GreenYellow.wcClassName: XmToggleButtonGadget
X*IndianRed.wcClassName: XmToggleButtonGadget
X*Khaki.wcClassName: XmToggleButtonGadget
X*LightBlue.wcClassName: XmToggleButtonGadget
X*LightGray.wcClassName: XmToggleButtonGadget
X*LightSteelBlue.wcClassName: XmToggleButtonGadget
X*LimeGreen.wcClassName: XmToggleButtonGadget
X*Magenta.wcClassName: XmToggleButtonGadget
X*Maroon.wcClassName: XmToggleButtonGadget
X*MediumAquamarine.wcClassName: XmToggleButtonGadget
X*MediumBlue.wcClassName: XmToggleButtonGadget
X*MediumForestGreen.wcClassName: XmToggleButtonGadget
X*MediumGoldenrod.wcClassName: XmToggleButtonGadget
X*MediumOrchid.wcClassName: XmToggleButtonGadget
X*MediumSeaGreen.wcClassName: XmToggleButtonGadget
X*MediumSlateBlue.wcClassName: XmToggleButtonGadget
X*MediumTurquoise.wcClassName: XmToggleButtonGadget
X*MediumVioletRed.wcClassName: XmToggleButtonGadget
X*MidnightBlue.wcClassName: XmToggleButtonGadget
X*NavyBlue.wcClassName: XmToggleButtonGadget
X*Orange.wcClassName: XmToggleButtonGadget
X*OrangeRed.wcClassName: XmToggleButtonGadget
X*Orchid.wcClassName: XmToggleButtonGadget
X*PaleGreen.wcClassName: XmToggleButtonGadget
X*Pink.wcClassName: XmToggleButtonGadget
X*Plum.wcClassName: XmToggleButtonGadget
X*Red.wcClassName: XmToggleButtonGadget
X*Salmon.wcClassName: XmToggleButtonGadget
X*SeaGreen.wcClassName: XmToggleButtonGadget
X*Sienna.wcClassName: XmToggleButtonGadget
X*SkyBlue.wcClassName: XmToggleButtonGadget
X*SlateBlue.wcClassName: XmToggleButtonGadget
X*SpringGreen.wcClassName: XmToggleButtonGadget
X*SteelBlue.wcClassName: XmToggleButtonGadget
X*Tan.wcClassName: XmToggleButtonGadget
X*Thistle.wcClassName: XmToggleButtonGadget
X*Transparent.wcClassName: XmToggleButtonGadget
X*Turquoise.wcClassName: XmToggleButtonGadget
X*Violet.wcClassName: XmToggleButtonGadget
X*VioletRed.wcClassName: XmToggleButtonGadget
X*Wheat.wcClassName: XmToggleButtonGadget
X*White.wcClassName: XmToggleButtonGadget
X*Yellow.wcClassName: XmToggleButtonGadget
X*YellowGreen.wcClassName: XmToggleButtonGadget
X
X*Aquamarine.armCallback: WcSetValueCB( ^^drawing.background: Aquamarine )
X*Black.armCallback: WcSetValueCB( ^^drawing.background: Black )
X*Blue.armCallback: WcSetValueCB( ^^drawing.background: Blue )
X*BlueViolet.armCallback: WcSetValueCB( ^^drawing.background: BlueViolet )
X*Brown.armCallback: WcSetValueCB( ^^drawing.background: Brown )
X*CadetBlue.armCallback: WcSetValueCB( ^^drawing.background: CadetBlue )
X*Coral.armCallback: WcSetValueCB( ^^drawing.background: Coral )
X*CornflowerBlue.armCallback: WcSetValueCB( ^^drawing.background: CornflowerBlue )
X*Cyan.armCallback: WcSetValueCB( ^^drawing.background: Cyan )
X*DarkGreen.armCallback: WcSetValueCB( ^^drawing.background: DarkGreen )
X*DarkOliveGreen.armCallback: WcSetValueCB( ^^drawing.background: DarkOliveGreen )
X*DarkOrchid.armCallback: WcSetValueCB( ^^drawing.background: DarkOrchid )
X*DarkSlateBlue.armCallback: WcSetValueCB( ^^drawing.background: DarkSlateBlue )
X*DarkSlateGray.armCallback: WcSetValueCB( ^^drawing.background: DarkSlateGray )
X*DarkTurquoise.armCallback: WcSetValueCB( ^^drawing.background: DarkTurquoise )
X*DimGray.armCallback: WcSetValueCB( ^^drawing.background: DimGray )
X*Firebrick.armCallback: WcSetValueCB( ^^drawing.background: Firebrick )
X*ForestGreen.armCallback: WcSetValueCB( ^^drawing.background: ForestGreen )
X*Gold.armCallback: WcSetValueCB( ^^drawing.background: Gold )
X*Goldenrod.armCallback: WcSetValueCB( ^^drawing.background: Goldenrod )
X*Gray.armCallback: WcSetValueCB( ^^drawing.background: Gray )
X*Green.armCallback: WcSetValueCB( ^^drawing.background: Green )
X*GreenYellow.armCallback: WcSetValueCB( ^^drawing.background: GreenYellow )
X*IndianRed.armCallback: WcSetValueCB( ^^drawing.background: IndianRed )
X*Khaki.armCallback: WcSetValueCB( ^^drawing.background: Khaki )
X*LightBlue.armCallback: WcSetValueCB( ^^drawing.background: LightBlue )
X*LightGray.armCallback: WcSetValueCB( ^^drawing.background: LightGray )
X*LightSteelBlue.armCallback: WcSetValueCB( ^^drawing.background: LightSteelBlue )
X*LimeGreen.armCallback: WcSetValueCB( ^^drawing.background: LimeGreen )
X*Magenta.armCallback: WcSetValueCB( ^^drawing.background: Magenta )
X*Maroon.armCallback: WcSetValueCB( ^^drawing.background: Maroon )
X*MediumAquamarine.armCallback: WcSetValueCB( ^^drawing.background: MediumAquamarine )
X*MediumBlue.armCallback: WcSetValueCB( ^^drawing.background: MediumBlue )
X*MediumForestGreen.armCallback: WcSetValueCB( ^^drawing.background: MediumForestGreen )
X*MediumGoldenrod.armCallback: WcSetValueCB( ^^drawing.background: MediumGoldenrod )
X*MediumOrchid.armCallback: WcSetValueCB( ^^drawing.background: MediumOrchid )
X*MediumSeaGreen.armCallback: WcSetValueCB( ^^drawing.background: MediumSeaGreen )
X*MediumSlateBlue.armCallback: WcSetValueCB( ^^drawing.background: MediumSlateBlue )
X*MediumTurquoise.armCallback: WcSetValueCB( ^^drawing.background: MediumTurquoise )
X*MediumVioletRed.armCallback: WcSetValueCB( ^^drawing.background: MediumVioletRed )
X*MidnightBlue.armCallback: WcSetValueCB( ^^drawing.background: MidnightBlue )
X*NavyBlue.armCallback: WcSetValueCB( ^^drawing.background: NavyBlue )
X*Orange.armCallback: WcSetValueCB( ^^drawing.background: Orange )
X*OrangeRed.armCallback: WcSetValueCB( ^^drawing.background: OrangeRed )
X*Orchid.armCallback: WcSetValueCB( ^^drawing.background: Orchid )
X*PaleGreen.armCallback: WcSetValueCB( ^^drawing.background: PaleGreen )
X*Pink.armCallback: WcSetValueCB( ^^drawing.background: Pink )
X*Plum.armCallback: WcSetValueCB( ^^drawing.background: Plum )
X*Red.armCallback: WcSetValueCB( ^^drawing.background: Red )
X*Salmon.armCallback: WcSetValueCB( ^^drawing.background: Salmon )
X*SeaGreen.armCallback: WcSetValueCB( ^^drawing.background: SeaGreen )
X*Sienna.armCallback: WcSetValueCB( ^^drawing.background: Sienna )
X*SkyBlue.armCallback: WcSetValueCB( ^^drawing.background: SkyBlue )
X*SlateBlue.armCallback: WcSetValueCB( ^^drawing.background: SlateBlue )
X*SpringGreen.armCallback: WcSetValueCB( ^^drawing.background: SpringGreen )
X*SteelBlue.armCallback: WcSetValueCB( ^^drawing.background: SteelBlue )
X*Tan.armCallback: WcSetValueCB( ^^drawing.background: Tan )
X*Thistle.armCallback: WcSetValueCB( ^^drawing.background: Thistle )
X*Transparent.armCallback: WcSetValueCB( ^^drawing.background: Transparent )
X*Turquoise.armCallback: WcSetValueCB( ^^drawing.background: Turquoise )
X*Violet.armCallback: WcSetValueCB( ^^drawing.background: Violet )
X*VioletRed.armCallback: WcSetValueCB( ^^drawing.background: VioletRed )
X*Wheat.armCallback: WcSetValueCB( ^^drawing.background: Wheat)
X*White.armCallback: WcSetValueCB( ^^drawing.background: White)
X*Yellow.armCallback: WcSetValueCB( ^^drawing.background: Yellow)
X*YellowGreen.armCallback: WcSetValueCB( ^^drawing.background: YellowGreen)
+FUNKY+STUFF+
echo '-rw-rw-r-- 1 david 10524 Aug 6 09:36 M9.Colors (as sent)'
chmod u=rw,g=rw,o=r M9.Colors
ls -l M9.Colors
echo x - MD
sed 's/^X//' > MD <<'+FUNKY+STUFF+'
X#
X# Motif Widgets for Multi-Display Demo
X#
X
XMDmotif.wcChildren: rc
X
X*rc.wcClassName: XmRowColumn
X*rc.wcChildren: exit, close, bugs, snap, crackle, pop
X
X*exit.wcConstructor: XmCreatePushButton
X*exit.activateCallback: WcExitCB
X
X*close.wcConstructor: XmCreatePushButton
X*close.activateCallback: KillWidgetTreeOnDisplay
X
X*bugs.wcConstructor: XmCreatePushButton
X*bugs.activateCallback: NewWidgetTreeOnDisplay( bugs:0.0 )
X
X*snap.wcConstructor: XmCreatePushButton
X*snap.activateCallback: NewWidgetTreeOnDisplay( snap:0.0 )
X
X*crackle.wcConstructor: XmCreatePushButton
X*crackle.activateCallback: NewWidgetTreeOnDisplay( crackle:0.0 )
X
X*pop.wcConstructor: XmCreatePushButton
X*pop.activateCallback: NewWidgetTreeOnDisplay( pop:0.0 )
X
X#
X# Athena Widgets for Multi-Display Demo
X#
X
XMDathena.wcChildren: table
X
X*table.wcClassName: Table
X*table.wcChildren: aexit, aclose, abugs, asnap, acrackle, apop
X# child c r cs rs opts
X*table.layout: aexit 0 0 1 1 ;\
X aclose 0 1 1 1 ;\
X abugs 0 2 1 1 ;\
X asnap 0 3 1 1 ;\
X acrackle 0 4 1 1 ;\
X apop 0 5 1 1
X
X*aexit.wcClass: commandWidgetClass
X*aexit.label: exit
X*aexit.callback: WcExitCB
X
X*aclose.wcClass: commandWidgetClass
X*aclose.label: close
X*aclose.callback: KillWidgetTreeOnDisplay
X
X*abugs.wcClass: commandWidgetClass
X*abugs.label: bugs
X*abugs.callback: NewWidgetTreeOnDisplay( bugs:0.0 )
X
X*asnap.wcClass: commandWidgetClass
X*asnap.label: snap
X*asnap.callback: NewWidgetTreeOnDisplay( snap:0.0 )
X
X*acrackle.wcClass: commandWidgetClass
X*acrackle.label: crackle
X*acrackle.callback: NewWidgetTreeOnDisplay( crackle:0.0 )
X
X*apop.wcClass: commandWidgetClass
X*apop.label: pop
X*apop.callback: NewWidgetTreeOnDisplay( pop:0.0 )
X
+FUNKY+STUFF+
echo '-rw-rw-r-- 1 david 1703 Aug 6 09:36 MD (as sent)'
chmod u=rw,g=rw,o=r MD
ls -l MD
exit 0
dan
----------------------------------------------------
O'Reilly && Associates argv@sun.com / argv@ora.com
Opinions expressed reflect those of the author only.
--
dan
----------------------------------------------------
O'Reilly && Associates argv@sun.com / argv@ora.com
Opinions expressed reflect those of the author only.