! SCCS_data: @(#) Periodic 1.2 93/02/04 08:09:10
!
! This example is taken from the periodic demo which came with Motif 1.0
! and was developed by Michael K. Yee at OSF.  To quote the original
! README:
! 
! 	Periodic is a demo of the displayable widgets in 
!	Motif.  Periodic presents many Motif widgets for 
!	your visual and sensual enjoyment.
!

Mri.wcChildren:		main
Mri.wcCallback:		WcSetValue(this.title: Periodic)

*background:		Turquoise
*fontList:		-adobe-helvetica-medium-r-normal--10-*

*main.wcCreate:		XmCreateMainWindow
*main.wcChildren:	menuBar, table
*main.wcAfterChildren:	WcSetValue( this.menuBar:	this.menuBar ) \
			WcSetValue( this.workWindow:	this.table )

! If you want scrollbars, uncomment this line
!*main.scrollingPolicy:	AUTOMATIC

!#################################################################
! Minimal menu bar
!#################################################################

*menuBar.wcCreate:		XmCreateMenuBar
*menuBar.wcPopups:		fileMenu
*menuBar.wcChildren:		File, Edit, Help
*menuBar.wcAfterChildren:	WcSetValue( this.menuHelpWidget: this.Help )
*menuBar*WcCreate:		XmCascadeButton

*menuBar*fontList:		-*-helvetica-medium-o-normal-*-12-120-*

! Note we must make path longer than `*menuBar*WcCreate:' so this
! resource spec is used instead of that one above.
*menuBar*fileMenu.wcCreate:	XmCreatePulldownMenu
*fileMenu.wcChildren:		PrintTree Quit

*PrintTree.activateCallback:	WcPrintTree(/)
*Quit.activateCallback:		WcExit

*File.subMenuId:		^*fileMenu

!#################################################################
! XmpTable Widget for Periodic Table
!#################################################################

*table.wcCreate:	XmpTable
*table.marginWidth:	20
*table.marginHeight:	0
*table.Spacing:		0
*table.wcChildren:	title, \
			It, 1, 2, 3, 4, 5, \
			IIt, 6, 7, 8, 9, \
			IIIt, 10, \
			IVt, 11, 12, 16, \
			Vt, 13, 14, 15, \
			dialogs
!				name	c r cs rs opt	
*table.layout:			title	1 0  4  1	;\
	It 0 0;	\
	1  0 1;	IIt 1 1;				Vt 4 1;\
	2  0 2;	6   1 2; IIIt 2 2;	IVt 3 2;	13 4 2;\
	3  0 3;	7   1 3; 10   2 3 1 3;	11  3 3;	14 4 3;\
	4  0 4;	8   1 4;		12  3 4;	15 4 4;\
	5  0 5;	9   1 5;		16  3 5 2 1;\
			dialogs 0 6 5 1;

*title.wcCreate:	XmCreateLabel
*title.labelString:	The Periodic Table Of Motif Widgets
*title.fontList:	-*-helvetica-bold-o-normal--24-240-*

! Labels above the columns.  We need to do this so the labels are
! right at the bottom of their XmpTable cell, immediately above the
! `Periodic Table' entries below them.

*filler.wcCreate:	XmLabel
*filler.labelString:

*It.wcCreate:		XmpTable
*It.wcChildren:		filler Ia
*It.layout:		filler 0 0 ; Ia 0 1 hH
*It.borderWidth:	0
*It.Ia.wcCreate:	XmLabel

*IIt.wcCreate:		XmpTable
*IIt.wcChildren:	filler IIa
*IIt.layout:		filler 0 0 ; IIa 0 1 hH
*IIt.borderWidth:	0
*IIt.IIa.wcCreate:	XmLabel

*IIIt.wcCreate:		XmpTable
*IIIt.wcChildren:	filler IIIb
*IIIt.layout:		filler 0 0 ; IIIb 0 1 hH
*IIIt.borderWidth:	0
*IIIt.IIIb.wcCreate:	XmLabel

*IVt.wcCreate:		XmpTable
*IVt.wcChildren:	filler IVa
*IVt.layout:		filler 0 0 ; IVa 0 1 hH
*IVt.borderWidth:	0
*IVt.IVa.wcCreate:	XmLabel

*Vt.wcCreate:		XmpTable
*Vt.wcChildren:		filler Va
*Vt.layout:		filler 0 0 ; Va 0 1 hH
*Vt.borderWidth:	0
*Vt.Va.wcCreate:	XmLabel

! These are the widget display boxes:

*XmpTable.WcChildren:	an, w, n
*XmpTable.Layout:	an 1 0 1 1 hH; w 0 1 2 1 ; n 0 2 2 1 hH;
*XmpTable.rowSpacing:	10
*XmpTable.borderWidth:	1
*XmpTable.MarginWidth:	0
*XmpTable.MarginHeight:	0

*XmpTable.an.wcCreate:		XmLabel
*XmpTable.an.alignment:		ALIGNMENT_END

*XmpTable.n.wcCreate:		XmPushButton
*XmpTable.n.activateCallback:	WcPrintTree(^)

*1.wcCreate:		XmpTable
*1.Spacing:		20
*1.an.labelString:	1
*1.w.wcCreate:		XmSeparator
*1.n.labelString:	XmSeparator

*2.wcCreate:		XmpTable
*2.an.labelString:	2
*2.w.wcCreate:		XmpTable
*2.w.borderWidth:	0
*2.w.marginWidth:	5
*2.w.columnSpacing:	5
*2.w.wcChildren:	up,dn,lt,rt
*2.w.layout:		up 0 0;	dn 1 0; lt 2 0; rt 3 0
*2.w.up.wcCreate:	XmArrowButton
*2.w.dn.wcCreate:	XmArrowButton
*2.w.lt.wcCreate:	XmArrowButton
*2.w.rt.wcCreate:	XmArrowButton
*2.w.se.wcCreate:	XmArrowButton
*2.w.up.arrowDirection:	ARROW_UP
*2.w.dn.arrowDirection:	ARROW_DOWN
*2.w.lt.arrowDirection:	ARROW_LEFT
*2.w.rt.arrowDirection:	ARROW_RIGHT
*2.n.labelString:	XmArrowButton

*3.wcCreate:		XmpTable
*3.an.labelString:	3
*3.w.wcCreate:		XmPushButton
*3.w.labelString:	Format Disk
*3.w.wcPopups:		DiskSelBox, TrashDialog
*3.w.activateCallback:	WcManage( .*DiskSelBox )
*3.n.labelString:	XmPushButton

*3.w.DiskSelBox.wcCreate:		XmCreateSelectionDialog
*3.w*DiskSelBox*listItems:		/, /swap, /usr, /u
*3.w*DiskSelBox*listItemCount:		4
*3.w*DiskSelBox*itemLabelString:	File System
*3.w*DiskSelBox*okLabelString:		Format
*3.w*DiskSelBox*applyLabelString:	Un-format
*3.w*DiskSelBox*cancelLabelString:	Erase
*3.w*DiskSelBox*helpLabelString:	Crash Heads
! for old Motif 1.0
!*3.w*DiskSelBox*okCallback:		WcManage( ~^TrashDialog.TrashDialog )
!*3.w*DiskSelBox*applyCallback:		WcManage( ~^TrashDialog.TrashDialog )
!*3.w*DiskSelBox*cancelCallback:  	WcManage( ~^TrashDialog.TrashDialog )
!*3.w*DiskSelBox*helpCallback:		WcManage( ~^TrashDialog.TrashDialog )

*3.w*DiskSelBox*okCallback:		WcManage( ~^*TrashDialog )
*3.w*DiskSelBox*applyCallback:		WcManage( ~^*TrashDialog )
*3.w*DiskSelBox*cancelCallback:		WcManage( ~^*TrashDialog )
*3.w*DiskSelBox*helpCallback:		WcManage( ~^*TrashDialog )

*3.w.TrashDialog.wcCreate:		XmCreateWorkingDialog
*3.w.TrashDialog.title:			Trashing...
*3.w*TrashDialog*messageString:		Trashing Disk\nMay take awhile...
*3.w*TrashDialog*cancelLabelString:	Hurry
*3.w*TrashDialog*helpLabelString:	Faster!

*4.wcCreate:		XmpTable
*4.an.labelString:	4
*4.w.wcCreate:		XmToggleButton
*4.w.labelString:	Lights
*4.n.labelString:	XmToggleButton

*5.wcCreate:		XmpTable
*5.an.labelString:	5
*5.w.wcCreate:		XmLabel
*5.w.fontList:		-*-helvetica-bold-o-normal--18-*
*5.w.labelString:	Don't Panic
*5.n.labelString:	XmLabel

*6.wcCreate:		XmpTable
*6.wcPopups:		colorOptions
*6.wcChildren:		an, w, n
*6.an.labelString:	6
*6.colorOptions.wcCreate:	XmCreatePulldownMenu
*6*colorOptions.wcChildren:	red, orange, yellow, green, blue, purple
*6*colorOptions.red.wcCreate:		XmPushButton
*6*colorOptions.orange.wcCreate:	XmPushButton
*6*colorOptions.yellow.wcCreate:	XmPushButton
*6*colorOptions.green.wcCreate:		XmPushButton
*6*colorOptions.blue.wcCreate:		XmPushButton
*6*colorOptions.purple.wcCreate:	XmPushButton
! ^	Note the asterisk needed here!!  colorOptions is actually
!	a child of a menu shell created by XmCreatePulldownMenu.
*6.w.wcCreate:		XmCreateOptionMenu
*6.w.labelString:	color
*6.w.subMenuId:		*6*colorOptions
*6.n.labelString:	XmOptionMenu

*7.wcCreate:		XmpTable
*7.Spacing:		0                                                      
*7.an.labelString:	7
*7.w.wcCreate:		XmScale
*7.w.wcChildren:		min, |, max
*7.w.XmLabel.fontList:		-*-helvetica-medium-r-normal--8-*
*7.w.decimalPoints:		1
*7.w.maximum:			50
*7.w.orientation:		HORIZONTAL
*7.w.processingDirection:	MAX_ON_RIGHT
*7.w.showValue:			True
*7.w.titleString:		Warp Factor
*7.w.min.wcCreate:		XmLabel
*7.w.min.labelString:		0
*7.w.|.wcCreate:		XmLabel
*7.w.max.wcCreate:		XmLabel
*7.w.max.labelString:		5
*7.n.labelString:	XmScale

*8.wcCreate:		XmpTable
*8.an.labelString:	8
*8.w.wcCreate:		XmCreateRadioBox
*8.w.wcChildren:	KWST, WCRP, WHKY, KUMU
*8.w.numColumns:	2
*8.w.packing:		PACK_COLUMN
*8.w.KWST.wcCreate:	XmToggleButtonGadget
*8.w.WCRP.wcCreate:	XmToggleButtonGadget
*8.w.WHKY.wcCreate:	XmToggleButtonGadget
*8.w.KUMU.wcCreate:	XmToggleButtonGadget
*8.n.labelString:	XmRadioBox

*9.wcCreate:		XmpTable
*9.an.labelString:	9
*9.w.wcCreate:		XmText
*9.w.wcPopups:		fonts
*9.w.value:		Try pressing the\nmenu button on\nthe mouse...
*9.w.translations:	#augment \n <Btn3Down>: XmpPopup( this*fonts )
*9.w.fonts.wcCreate:	XmCreatePopupMenu
*9.w*fonts.wcChildren:	1,2,3
*9.w*fonts*wcCreate:	XmCreatePushButton
*9.w*fonts.1.labelString:	courier bold oblique 10
*9.w*fonts.1.fontList:		*courier-bold-o-*--10-*
*9.w*fonts.1.activateCallback:	WcSetValue( ~^fontList(FontList): \
						*courier-bold-o-*--10-* )
*9.w*fonts.2.labelString:	helvetica bold oblique 18
*9.w*fonts.2.fontList:		*helvetica-bold-o-*--18-*
*9.w*fonts.2.activateCallback:	WcSetValue( ~^fontList(FontList): \
						*helvetica-bold-o-*--18-* )
*9.w*fonts.3.labelString:	times bold italic 24
*9.w*fonts.3.fontList:		*times-bold-i-*--24-*
*9.w*fonts.3.activateCallback:	WcSetValue( ~^fontList(FontList): \
						*times-bold-i-*--24-* )
*9.n.labelString:	XmText

*10.wcCreate:		XmpTable
*10.Spacing:		0
*10.an.labelString:	10
*10.w.wcCreate:		XmFileSelectionBox
*10.w.dirMask:		*.c
*10.w.sb_listSW.height:	10
*10.n.labelString:	XmFileSelectionBox

*11.wcCreate:		XmpTable
*11.Spacing:		20
*11.an.labelString:	11
*11.w.wcCreate:		XmScrollBar
*11.w.orientation:	HORIZONTAL
*11.w.height:		20
*11.n.labelString:	XmScrollBar

! Remember that XmCreateScrolledList creates an intermediate
! parent named wSW, and that is the widget the table lays out.
!
*12.wcCreate:		XmpTable
*12.layout:		an 1 0 1 1 hH; wSW 0 1 2 1 ; n 0 2 2 1 hH;
*12.an.labelString:	12
*12.w.wcCreate:		XmCreateScrolledList
*12*w.items:		Foobar, Mumble, Glorp, Reggae, Rock, and, Roll Forever!
*12*w.itemCount:	7
*12*w.visibleItemCount:	3
*12*w.listMarginWidth:	3
*12.n.labelString:	XmScrolledList

! Note that the XmCascadeButton which pops-up the demoMenu
! MUST be a child of an XmRowColumn.  I used XmCreateMenuBar
! to create the row column, because that it usually what
! you will use when you've got pull-down menus.  If the
! cascade button is not a child of an XmRowColumn, you
! will get a core dump in Motif.  Sorry, I can't fix that here.
!
*13.wcCreate:		XmpTable
*13.an.labelString:	13
*13.n.labelString:	XmPulldownMenu
*13.w.wcCreate:		XmCreateMenuBar
*13.w.wcPopups:		demoMenu
*13.w.wcChildren:	menuButton
*13.w.menuButton.wcCreate:	XmCascadeButton
*13.w.menuButton.labelString:	Press For Menu
*13.w.menuButton.subMenuId:	*13.w*demoMenu
*13.w.demoMenu.wcCreate:	XmCreatePulldownMenu
*13.w*demoMenu.wcChildren:	title, Black, Blue, Coral, LimeGreen, \
				Cyan, Goldenrod, Magenta, Pink
*13.w*demoMenu.title.wcCreate:	XmCreateLabel
*13.w*demoMenu.title.labelString:	Choose Color of XmDrawingArea:
*13.w*demoMenu.title.fontList:	-*-times-bold-i-normal-*-12-*
*13.w*demoMenu*FontList:	-*-times-medium-i-normal-*-12-*
!    ^	Note the asterisk needed here!!  demoMenu is actually
!	a child of a menu shell created by XmCreatePulldownMenu.


*13*Black.wcCreate:		XmCascadeButton
*13*Blue.wcCreate:		XmCascadeButton
*13*Coral.wcCreate:		XmCascadeButton
*13*LimeGreen.wcCreate:		XmCascadeButton
*13*Cyan.wcCreate:		XmCascadeButton
*13*Goldenrod.wcCreate:		XmCascadeButton
*13*Magenta.wcCreate:		XmCascadeButton
*13*Pink.wcCreate:		XmCascadeButton

*13*Black.activateCallback:	WcSetValue(*14.w.background: Black)
*13*Blue.activateCallback:	WcSetValue(*14.w.background: Blue)
*13*Coral.activateCallback:	WcSetValue(*14.w.background: Coral)
*13*LimeGreen.activateCallback:	WcSetValue(*14.w.background: LimeGreen)
*13*Cyan.activateCallback:	WcSetValue(*14.w.background: Cyan)
*13*Goldenrod.activateCallback:	WcSetValue(*14.w.background: Goldenrod)
*13*Magenta.activateCallback:	WcSetValue(*14.w.background: Magenta)
*13*Pink.activateCallback:	WcSetValue(*14.w.background: Pink)

*14.wcCreate:		XmpTable
*14.an.labelString:	14
*14.w.wcCreate:		XmDrawingArea
*14.w.background:	Magenta
*14.n.labelString:	XmDrawingArea

*15.wcCreate:		XmpTable
*15.an.labelString:	15
*15.w.wcCreate:		XmDrawnButton
*15.n.labelString:	XmDrawnButton

*16.wcCreate:		XmpTable
*16.Spacing:		0
*16.an.labelString:	16
*16.w.wcCreate:		XmPanedWindow
*16.w.wcChildren:	text1, text2
*16.w*fontList:		*-times-bold-i-normal--10-*
*16.w.text1.wcCreate:	XmText
*16.w.text1.value:	Motif Resource Interpreter
*16.w.text2.wcCreate:	XmText
*16.w.text2.value:	Version 2.7
*16.n.labelString:	XmPanedWindow

*dialogs.wcCreate:	XmpTable
*dialogs.wcChildren:	error, info, question, warn, work
*dialogs.borderWidth:	0
*dialogs.layout:	error 0 0; info 1 0; question 2 0; warn 3 0; work 4 0;
*dialogs.columnSpacing:	10
*dialogs.marginHeight:	20

*dialogs.XmMessageBox.borderWidth: 	1
*dialogs.XmMessageBox.marginHeight:	1
*dialogs.XmMessageBox.marginWidth:	1
*dialogs.XmMessageBox*buttonFontList:	-*-helvetica-medium-r-normal--8-*

*error.wcCreate:		XmMessageBox
*error.dialogType:		DIALOG_ERROR
*error.messageString:		Error Dialog

*info.wcCreate:			XmMessageBox
*info.dialogType:		DIALOG_INFORMATION
*info.messageString:		Information Dialog

*message.wcCreate:		XmMessageBox
*message.dialogType:		DIALOG_MESSAGE
*message.messageString:		Message Dialog

*question.wcCreate:		XmMessageBox
*question.dialogType:		DIALOG_QUESTION
*question.messageString:	Question Dialog

*warn.wcCreate:			XmMessageBox
*warn.dialogType:		DIALOG_WARNING
*warn.messageString:		Warning Dialog

*work.wcCreate:			XmMessageBox
*work.dialogType:		DIALOG_WORKING
*work.messageString:		Working Dialog
