! SCCS_data:    %Z% %M% %I% %E% %U%
!
! Test for WcActCB.c
! A row-col has buttons for each callback/action, which brings up a dialog.
! A dialog provides control over testing each callback/action.

*allowShellResize:	True

Mri.wclDynamicLibs:	../Stuff/libStuff.so.2.7

Mri.wcPopups:	WcMan WcCr WcSen WcPop WcMp WcInAc WcSys WcDbg WcLb WcCBM WcDyn
Mri.wcChildren:	rc

*rc.wcCreate:		XmRowColumn
*rc.wcChildren:		WcManage WcCreate WcSetSen WcPopup WcMap WcAccel \
			WcSystem WcLoad WcDebug \
			WcLateBind WcMethods WcDynamicLibs \
			WcSetValue Exit

! Everything is a push button unless otherwise specified.
*WcCreate:		XmPushButton

*Exit.activateCallback:	WcExit

! Shared by all XmpTables:
*XmpTable.Spacing:	5

!Shared by all dialogs:
*Label.wcCreate:		XmPushButton
*Label.activateCallback:	WcUnmanage(^)
*Sep.wcCreate:			XmSeparator
*Sep2.wcCreate:			XmSeparator
*autoUnmanage:			False
*okCallback:			WcUnmanage(this)
*OK.activateCallback:		WcUnmanage(^)

! ===========================================================================
! Test of Manage and Unmanage Callbacks and Actions:
! WcManageCB, WcManageACT,
! WcUnmanageCB, WcUnmanageACT,
! WcManageChildrenCB, WcManageChildrenACT,
! WcUnmanageChildrenCB, WcUnmanageChildrenACT
! =========================================================================== 
!
*WcManage.activateCallback:	WcManage(*WcMan)

*WcMan.wcCreate:	XmpCreateTableDialog
*WcMan.wcPopups:	indi indi2
*WcMan.wcChildren:	Label Sep \
			MaC1,MaC2,MaA1,MaA2,\
			UmC1,UmC2,UmA1,UmA2 \
			Sep2 UmCC UmCA MaCC MaCA
!			nm	c r cs rs opt
*WcMan.layout:		Label	0 0  2  1 ;	\
			Sep	0 1  2  1 H;	\
			MaC1	0 2;		UmC1	1 2;	\
			MaC2	0 3;		UmC2	1 3;	\
			MaA1	0 4;		UmA1	1 4;	\
			MaA2	0 5;		UmA2	1 5;	\
			Sep2	0 6  2  1 H;	\
			UmCC	0 7;		MaCC	1 7;	\
			UmCA	0 8;		MaCA	1 8;
*WcMan.Label.labelString: \
WcManage & WcUnmanage \n\
WcManageChildren & WcUnmanageChildren

*WcMan.indi.wcCreate:		XmCreateInformationDialog
*WcMan*indi.messageString:	WcManage \n worked!
*WcMan.indi2.wcCreate:		XmCreateInformationDialog
*WcMan*indi2.messageString:	WcManage \n worked\n with 2 widgets!

*WcMan.MaC1.labelString:	WcManageCB 1 Arg
*WcMan.MaC2.labelString:	WcManageCB 2 Args
*WcMan.MaA1.labelString:	WcManageACT 1 Arg
*WcMan.MaA2.labelString:	WcManageACT 2 Args
*WcMan.MaCC.labelString:	WcManageChildrenCB
*WcMan.MaCA.labelString:	WcManageChildrenACT
*WcMan.UmC1.labelString:	WcUnmanageCB 1 Arg
*WcMan.UmC2.labelString:	WcUnmanageCB 2 Args
*WcMan.UmA1.labelString:	WcUnmanageACT 1 Arg
*WcMan.UmA2.labelString:	WcUnmanageACT 2 Args
*WcMan.UmCC.labelString:	WcUnmanageChildrenCB
*WcMan.UmCA.labelString:	WcUnmanageChildrenACT
! for old Motif 1.0
!*WcMan.MaC1.activateCallback:	WcManage(^indi.indi)
!*WcMan.MaC2.activateCallback:	WcManage(^indi.indi ^indi2.indi2)
!*WcMan.MaCC.activateCallback:	WcManageChildren(^,MaC1 , MaC2 )
!*WcMan.UmC1.activateCallback:	WcUnmanage(^indi.indi)
!*WcMan.UmC2.activateCallback:	WcUnmanage(^indi.indi , ^indi2.indi2)
!*WcMan.UmCC.activateCallback:	WcUnmanageChildren(^,MaC1 , MaC2 )
!*WcMan.MaA1.translations:	<Btn1Up>:WcManage(^indi.indi)
!*WcMan.MaA2.translations:	<Btn1Up>:WcManage(^indi.indi,^indi2.indi2)
!*WcMan.MaCA.translations:	<Btn1Up>: WcManageChildren(^ UmC1 UmC2)
!*WcMan.UmA1.translations:	<Btn1Up>: WcUnmanage(^indi.indi)
!*WcMan.UmA2.translations:	<Btn1Up>: WcUnmanage(^indi.indi , ^indi2.indi2)
!*WcMan.UmCA.translations:	<Btn1Up>: WcUnmanageChildren(^ UmC1 UmC2)

*WcMan.MaC1.activateCallback:	WcManage(^*indi)
*WcMan.MaC2.activateCallback:	WcManage(^*indi ^*indi2)
*WcMan.MaCC.activateCallback:	WcManageChildren(^,MaC1 , MaC2 )
*WcMan.UmC1.activateCallback:	WcUnmanage(^*indi)
*WcMan.UmC2.activateCallback:	WcUnmanage(^*indi , ^*indi2)
*WcMan.UmCC.activateCallback:	WcUnmanageChildren(^,MaC1 , MaC2 )
*WcMan.MaA1.translations:	<Btn1Up>:WcManage(^*indi)
*WcMan.MaA2.translations:	<Btn1Up>:WcManage(^*indi ^*indi2)
*WcMan.MaCA.translations:	<Btn1Up>: WcManageChildren(^ UmC1 UmC2)
*WcMan.UmA1.translations:	<Btn1Up>: WcUnmanage(^*indi)
*WcMan.UmA2.translations:	<Btn1Up>: WcUnmanage(^*indi , ^*indi2)
*WcMan.UmCA.translations:	<Btn1Up>: WcUnmanageChildren(^ UmC1 UmC2)

! ===========================================================================
! Test of Widget Creation Callbacks and Actions:
! WcCreateChildrenCB, WcCreateChildrenACT,
! WcCreatePopupsCB, WcCreatePopupsACT,
! WcCreateRootCB, WcCreateRootACT (both local and remote roots)
! ===========================================================================
!
*WcCreate.activateCallback:	WcManage(*WcCr)

*WcCr.wcCreate:		XmpCreateTableDialog
*WcCr.wcChildren:	Label Sep \
			CrChC1 CrChC2 CrPoC1 CrPoC2 CrRoC1 CrRoC2 \
			CrChA1 CrChA2 CrPoA1 CrPoA2 CrRoA1 CrRoA2
!			nm	c r cs rs opt
*WcCr.layout:		Label	0 0  4  1 ;	\
			Sep	0 1  4  1 H;	\
			CrChC1 0 2 H; DeChC1 1 2 ; CrChA1 2 2 ; DeChA1 3 2 ; \
			CrChC2 0 3 H; DeChC2 1 3 ; CrChA2 2 3 ; DeChA2 3 3 ; \
			CrPoC1 0 4 H; DePoC1 1 4 ; CrPoA1 2 4 ; DePoA1 3 4 ; \
			CrPoC2 0 5 H; DePoC2 1 5 ; CrPoA2 2 5 ; DePoA2 3 5 ; \
			CrRoC1 0 6 H; DeRoC1 1 6 ; CrRoA1 2 6 ; DeRoA1 3 6 ; \
			CrRoC2 0 7 H; DeRoC2 1 7 ; CrRoA2 2 7 ; DeRoA2 3 7 ; 

*WcCr.Label.labelString: \
WcCreateChildren & WcCreatePopups\n\
WcCreateRootCB & WcDestroy


*CrChC1.labelString:		WcCreateChildrenCB(^ DeChC1 )
*CrChC1.activateCallback:	WcCreateChildren  (^ DeChC1 )
*CrChC2.labelString:		WcCreateChildrenCB(^ 2nd Col )
*CrChC2.activateCallback:	WcCreateChildren  (^ DeChC2 DePoC1 DePoC2 DeRoC1 DeRoC2 )
*CrPoC1.labelString:		WcCreatePopupsCB(^ pop1 )
*CrPoC1.activateCallback:	WcCreatePopups(^ pop1 ) WcManage( ^*pop1 )
*CrPoC2.labelString:		WcCreatePopupsCB(^ pop1,pop2)
*CrPoC2.activateCallback:	WcCreatePopups(^ pop1,pop2) WcManage(^*pop1 ^*pop2)
*CrRoC1.labelString:		WcCreateRootCB(NewRoot)
*CrRoC1.activateCallback:	WcCreateRoot(NewRoot)
*CrRoC2.labelString:		WcCreateRootCB(NewRoot NewRoot2)
*CrRoC2.activateCallback:	WcCreateRoot(NewRoot NewRoot2)

*DeChC1.labelString:		WcDestroyCB( this )
*DeChC1.activateCallback:	WcDestroy(this)
*DeChC2.labelString:		WcDestroyCB(^ This Col )
*DeChC2.activateCallback:	WcDestroy(this ^DePoC1 ^DePoC2 ^DeRoC1 ^DeRoC2)
*DePoC1.labelString:		WcDestroyCB( ^pop1 )
*DePoC1.activateCallback:	WcDestroy(^pop1_popup )
*DePoC2.labelString:		WcDestroyCB(^pop1,^pop2)
*DePoC2.activateCallback:	WcDestroy(^pop1_popup,^pop2_popup)
*DeRoC1.labelString:		WcDestroyCB(NewRoot)
*DeRoC1.activateCallback:	WcDestroy(NewRoot)
*DeRoC2.labelString:		WcDestroy(NewRoot NewRoot2)
*DeRoC2.activateCallback:	WcDestroy(NewRoot NewRoot2)

*CrChA1.labelString:	WcCreateChildrenACT(^ DeChA1 )
*CrChA1.translations:	<Btn1Up>:WcCreateChildren(^ DeChA1 )
*CrChA2.labelString:	WcCreateChildrenACT(^ Next Col )
*CrChA2.translations:	<Btn1Up>:WcCreateChildren(^ DeChA2 DePoA1 DePoA2 DeRoA1 DeRoA2 )
*CrPoA1.labelString:	WcCreatePopupsACT(^ pop1 )
*CrPoA1.translations:	<Btn1Up>:WcCreatePopups(^ pop1 ) WcManage(^*pop1)
*CrPoA2.labelString:	WcCreatePopupsACT(^ pop1,pop2)
*CrPoA2.translations:	<Btn1Up>:WcCreatePopups(^ pop1,pop2) WcManage(^*pop1 ^*pop2)
*CrRoA1.labelString:	WcCreateRootACT(NewRoot)
*CrRoA1.translations:	<Btn1Up>:WcCreateRoot(NewRoot)
*CrRoA2.labelString:	WcCreateRootACT(NewRoot NewRoot2)
*CrRoA2.translations:	<Btn1Up>:WcCreateRoot(NewRoot NewRoot2)

*DeChA1.labelString:	WcDestroyACT( this )
*DeChA1.translations:	<Btn1Up>: WcDestroy(this)
*DeChA2.labelString:	WcDestroyACT(^ This Col )
*DeChA2.translations:	<Btn1Up>:WcDestroy(this ^DePoA1 ^DePoA2 ^DeRoA1 ^DeRoA2)
*DePoA1.labelString:	WcDestroyACT( ^pop1 )
*DePoA1.translations:	<Btn1Up>: WcDestroy(^pop1_popup )
*DePoA2.labelString:	WcDestroyACT(^pop1,^pop2)
*DePoA2.translations:	<Btn1Up>: WcDestroy(^pop1_popup,^pop2_popup)
*DeRoA1.labelString:	WcDestroyACT(NewRoot)
*DeRoA1.translations:	<Btn1Up>: WcDestroy(NewRoot)
*DeRoA2.labelString:	WcDestroyACT(NewRoot NewRoot2)
*DeRoA2.translations:	<Btn1Up>: WcDestroy(NewRoot NewRoot2)

*pop1.wcCreate:			XmpCreateTableDialog
*pop1.wcChildren:		btn
*pop1.btn.labelString:		Dynamically\nCreated\nPopup
*pop1.btn.activateCallback:	WcDestroy(~)

*pop2.wcCreate:			XmpCreateTableDialog
*pop2.wcChildren:		btn
*pop2.btn.labelString:		Another\nDynamically\nCreated\nPopup
*pop2.btn.activateCallback:	WcDestroy(~)

NewRoot.wcChildren:			bye
NewRoot.bye.activateCallback:		WcDestroy(~)

NewRoot2.wcPopups:			remWarn
NewRoot2.wcChildren:			rc
NewRoot2.rc.WcCreate:			XmRowColumn
NewRoot2.rc.wcChildren:			NewDisplay UnknownDisplay

! for old Motif 1.0
!NewRoot2*NewDisplay.activateCallback:	WcManage(~remWarn.remWarn)
NewRoot2*NewDisplay.activateCallback:	WcManage(~*remWarn)

NewRoot2*remWarn.wcCreate:		XmCreateWarningDialog
NewRoot2*remWarn.autoUnmanage:		true
NewRoot2*remWarn.messageString:\
NOTE: The new shell will be named 'wcRem'\n\
and will need to load the resfile 'WcRem'\n\
from the "normal places" - XENVIRONMENT,\n\
XAPPLRESDIR, and XUSERFILESEARCHPATH.\n\
****** If the resfile is not found, ******\n\
****** the test program will exit!! ******
NewRoot2*remWarn.okCallback:		WcCreateRoot( wcRem on: :0.0 )

NewRoot2*UnknownDisplay.activateCallback:  WcCreateRoot( wcRem on: bogus:9.9)

! ===========================================================================
! Test of Sensitivity Callbacks and Actions:
! WcSetSensitiveCB, WcSetSensitiveACT
! WcSetzInsensitiveCB, WcSetInsensitiveACT
! ===========================================================================
!
*WcSetSen.activateCallback:	WcManage(*WcSen)

*WcSen.wcCreate:	XmpCreateTableDialog
*WcSen.wcChildren:	Label, Sep, SenC1, SenC2, SenA1, SenA2, \
			InC1, InC2, InA1, InA2, One, Two, Three, Four
!			nm	c r cs rs opt
*WcSen.layout:		Label	0 0  3  1 ;	\
			Sep	0 1  3  1 H;	\
			SenC1 0 2 H; InC1 1 2; One   2 2;	\
			SenC2 0 3 H; InC2 1 3; Two   2 3;	\
			SenA1 0 4 H; InA1 1 4; Three 2 4;	\
			SenA2 0 5 H; InA2 1 5; Four  2 5;

*WcSen.Label.labelString:	WcSetSensitive & WcSetInsensitive

*WcSen*SenC1.labelString:	WcSetSensitiveCB( One )
*WcSen*SenC1.activateCallback:	WcSetSensitive( ^One )
*WcSen*SenC2.labelString:	WcSetSensitiveCB( All )
*WcSen*SenC2.activateCallback:	WcSetSensitive( ^One ^Two ^Three ^Four)
*WcSen*InC1.labelString:	WcSetInsensitiveCB( One )
*WcSen*InC1.activateCallback:	WcSetInsensitive( ^One )
*WcSen*InC2.labelString:	WcSetInsensitiveCB( All )
*WcSen*InC2.activateCallback:	WcSetInsensitive( ^One,^Two , ^Three ,^Four )

*WcSen*SenA1.labelString:	WcSetSensitiveACT( One )
*WcSen*SenA1.translations:	<Btn1Up>: WcSetSensitive( ^One )
*WcSen*SenA2.labelString:	WcSetSensitiveACT( All )
*WcSen*SenA2.translations:	<Btn1Up>: WcSetSensitive(^One ^Two ^Three ^Four)
*WcSen*InA1.labelString:	WcSetInsensitiveACT( One )
*WcSen*InA1.translations:	<Btn1Up>: WcSetInsensitive( ^One )
*WcSen*InA2.labelString:	WcSetInsensitiveACT( All )
*WcSen*InA2.translations:	<Btn1Up>: WcSetInsensitive(^One ^Two ^Three ^Four)

! ===========================================================================
! Test of Popup actions and callbacks:
! WcPopupACT, WcPopupCB,
! WcPopupGrabACT, WcPopupGrabCB,
! WcPopdownCB, WcPopdownACT
!
! CAUTION: Motif fucks up popup callbacks, so you MUST NOT specifiy them
! as resources, but you CAN add them in a set values.
! ===========================================================================
!
*WcPopup.activateCallback:	WcManage(*WcPop)

*WcPop.wcCreate:		XmpCreateTableDialog
*WcPop.wcPopups:		pop1, pop2
*WcPop.wcChildren:		Label ,Sep, \
				PuC1 PdC1 PgC1 PuC2 PdC2 PgC2 \
				Sep2 \
				PuA1 PdA1 PgA1 PuA2 PdA2 PgA2
!			nm	c r cs rs opt
*WcPop.layout:		Label	0 0  3  1 ;	\
			Sep	0 1  3  1 H;	\
			PuC1 0 2 H; PdC1 1 2; PgC1 2 2; \
			PuC2 0 3 H; PdC2 1 3; PgC2 2 3; \
			Sep	0 4  3  1 H;	\
			PuA1 0 5 H; PdA1 1 5; PgA1 2 5; \
			PuA2 0 6 H; PdA2 1 6; PgA2 2 6;

*WcPop.Label.labelString:\
WcPopup & WcPopdown & WcPopupGrab\n\
XmpCreateTableTransient\n\
WcPositionTransient

! XmpCreateTableTransient makes pop1_popup.pop1
!
*WcPop.pop1.wcCreate:			XmpCreateTableTransient
*WcPop.pop1_popup.transientFor:		/
*WcPop*pop1.wcCallback:			WcAddCallbacks( ~ popupCallback \
							WcPositionTransient())
*WcPop*pop1.wcChildren:			b
*WcPop*pop1.b.labelString:		Popup 1
*WcPop.pop2.wcCreate:			XmpCreateTableTransient
*WcPop*pop2.wcCallback:			WcAddCallbacks( ~ popupCallback \
							WcPositionTransient()\
							WcTrace(popped 2))
*WcPop*pop2.wcChildren:			b
*WcPop*pop2.b.labelString:		Popup 2
*WcPop*b.activateCallback:		WcPopdown(~)

*WcPop.PuC1.labelString:	WcPopupCB( Popup1 )
*WcPop.PuC1.activateCallback:	WcPopup( ^pop1_popup )
*WcPop.PdC1.labelString:	WcPopdownCB( Popup1 )
*WcPop.PdC1.activateCallback:	WcPopdown( ^pop1_popup )
*WcPop.PgC1.labelString:	WcPopupGrabCB( Popup1 )
*WcPop.PgC1.activateCallback:	WcPopupGrab( ^pop1_popup )
*WcPop.PuC2.labelString:	WcPopupCB( Popup1 Popup2 )
*WcPop.PuC2.activateCallback:	WcPopup( ^pop1_popup ^pop2_popup )
*WcPop.PdC2.labelString:	WcPopdownCB( Popup1 Popup2 )
*WcPop.PdC2.activateCallback:	WcPopdown( ^pop1_popup ^pop2_popup )
*WcPop.PgC2.labelString:	WcPopupGrabCB( Popup1 Popup2 )
*WcPop.PgC2.activateCallback:	WcPopupGrab( ^pop1_popup ^pop2_popup )

*WcPop.PuA1.labelString:	WcPopupACT( Popup1 )
*WcPop.PuA1.translations:	<Btn1Up>: WcPopup( ^pop1_popup )
*WcPop.PdA1.labelString:	WcPopdownACT( Popup1 )
*WcPop.PdA1.translations:	<Btn1Up>: WcPopdown( ^pop1_popup )
*WcPop.PgA1.labelString:	WcPopupGrabACT( Popup1 )
*WcPop.PgA1.translations:	<Btn1Up>: WcPopupGrab( ^pop1_popup )
*WcPop.PuA2.labelString:	WcPopupACT( Popup1 Popup2 )
*WcPop.PuA2.translations:	<Btn1Up>: WcPopup( ^pop1_popup ^pop2_popup )
*WcPop.PdA2.labelString:	WcPopdownACT( Popup1 Popup2 )
*WcPop.PdA2.translations:	<Btn1Up>: WcPopdown( ^pop1_popup ^pop2_popup )
*WcPop.PgA2.labelString:	WcPopupGrabACT( Popup1 Popup2 )
*WcPop.PgA2.translations:	<Btn1Up>: WcPopupGrab( ^pop1_popup ^pop2_popup )

! ===========================================================================
! Test of Map actions and callbacks:
! WcMapCB, WcMapACT,
! WcUnmapCB, WcUnmapACT
! ===========================================================================
!
*WcMap.activateCallback:	WcManage(*WcMp )

*WcMp.wcCreate:			XmpCreateTableDialog
*WcMp.wcChildren:		Label, Sep, \
				MaC1 MaC2 UmC1 UmC2 Sep2 \
				MaA1 MaA2 UmA1 UmA2 \
				One Two Three Four
!			nm	c r cs rs opt
*WcMp.layout:		Label	0 0  3  1 ;	\
			Sep	0 1  3  1 H;	\
			MaC1	0 2 H;		UmC1 1 2;	One   2 2; \
			MaC2	0 3 H;		UmC2 1 3; 	Two   2 3; \
			Sep2	0 4  3  1 H;	\
			MaA1	0 5 H;		UmA1 1 5; 	Three 2 5; \
			MaA2	0 6 H;		UmA2 1 6; 	Four  2 6;

*WcMp.Label.labelString:	WcMap & WcUnmap
*WcMp.One.mappedWhenManaged:	False
*WcMp.Two.mappedWhenManaged:	False
*WcMp.Three.mappedWhenManaged:	False
*WcMp.Four.mappedWhenManaged:	False

*WcMp.MaC1.labelString:		WcMapCB( One )
*WcMp.MaC1.activateCallback:	WcMap( ^One )
*WcMp.UmC1.labelString:		WcUnmapCB( One )
*WcMp.UmC1.activateCallback:	WcUnmap( ^One )
*WcMp.MaC2.labelString:		WcMapCB( All )
*WcMp.MaC2.activateCallback:	WcMap( ^One, ^Two ,^Three , ^Four )
*WcMp.UmC2.labelString:		WcUnmapCB( All )
*WcMp.UmC2.activateCallback:	WcUnmap( ^One ^Two ^Three ^Four )

*WcMp.MaA1.labelString:		WcMapACT( One )
*WcMp.MaA1.translations:	<Btn1Up>: WcMap( ^One )
*WcMp.UmA1.labelString:		WcUnmapACT( One )
*WcMp.UmA1.translations:	<Btn1Up>: WcUnmap( ^One )
*WcMp.MaA2.labelString:		WcMapACT( All )
*WcMp.MaA2.translations:	<Btn1Up>: WcMap( ^One, ^Two ,^Three , ^Four )
*WcMp.UmA2.labelString:		WcUnmapACT( All )
*WcMp.UmA2.translations:	<Btn1Up>: WcUnmap( ^One ^Two ^Three ^Four )

! ===========================================================================
! Test of Accelerator stuff
! WcInstallAcceleratorsCB, WcInstallAllAcceleratorsCB
! WcInstallAcceleratorsACT, WcInstallAllAcceleratorsACT
! ===========================================================================
!
*WcAccel.activateCallback:	WcManage(*WcInAc)

*WcInAc.wcCreate:	XmpCreateTableDialog
*WcInAc.input:		TRUE
*WcInAc.wcPopups:	CApop, CBpop

*WcInAc.CApop.wcCreate:		XmCreateInformationDialog
*WcInAc*CApop.messageString:	You Hit CtrlA or Ctrl-A
*WcInAc.CBpop.wcCreate:		XmCreateInformationDialog
*WcInAc*CBpop.messageString:	You Hit CtrlB or Ctrl-B

*WcInAc.wcChildren:		Label, Sep, fr1, fr2
!			nm	c r cs rs opt
*WcInAc.layout:		Label	0 0;	\
			Sep	0 1 H;	\
			fr1	0 2 H;	\
			fr2	0 3 H;

*WcInAc.Label.labelString: \
WcInstallAccelerators\n&\nWcInstallAllAccelerators\n\n\
THIS DOES NOT WORK ON MOST VERSIONS OF MOTIF\n\
AS ACCELERATORS ARE HEAVILY BODGED BY MOTIF.\n\n\
Use the Motif accelerator resources for accelerators.\n\
That works quite well.


! Two frames, almost identical...
!
*WcInAc.fr1.wcCreate:		XmFrame
*WcInAc.fr2.wcCreate:		XmFrame
*WcInAc.XmFrame.wcChildren:	rc
*WcInAc.fr1.wcAfterChildren:	WcInstallAccelerators(this*CtrlA this*CtrlB)
*WcInAc.fr2.wcAfterChildren:	WcInstallAllAccelerators(this*rc this*rc) 

*WcInAc*rc.wcCreate:		XmRowColumn
*WcInAc*rc.wcChildren:		Label, Sep, CtrlA, CtrlB

*WcInAc*fr1*Label.labelString:	\
Give focus to CtrlA below,\n\
then typing Control-B is\n\
the same as selecting\n\
the CtrlB button below:
*WcInAc*fr1*Label.activateCallback:

*WcInAc*fr2*Label.labelString:	\
If WcInstallAllAccelerators\n\
works, then CtrlA or CtrlB\n\
in this frame is the same as\n\
selecting the buttons below:
*WcInAc*fr2*Label.activateCallback:

! for old Motif 1.0
!*WcInAc*CtrlA.activateCallback: WcManage(*WcInAc*CApop.CApop)
!*WcInAc*CtrlA.accelerators:	#augment \n\
!				Ctrl<Key>a: WcManage(*WcInAc*CApop.CApop)
!*WcInAc*CtrlB.activateCallback: WcManage(*WcInAc*CBpop.CBpop)
!*WcInAc*CtrlB.accelerators:	#augment \n\
!				Ctrl<Key>b: WcManage(*WcInAc*CBpop.CBpop)

*WcInAc*CtrlA.activateCallback:	WcManage(*WcInAc*CApop)
*WcInAc*CtrlA.accelerators:	#augment \n\
				Ctrl<Key>a: WcManage(*WcInAc*CApop) WcTrace(cA)
*WcInAc*CtrlB.activateCallback:	WcManage(*WcInAc*CBpop)
*WcInAc*CtrlB.accelerators:	#augment \n\
				Ctrl<Key>b: WcManage(*WcInAc*CBpop) WcTrace(cB)

! ===========================================================================
! Test of shell oriented things
! WcSpawnCB, WcSpawnACT
! WcSystemCB, WcSystemACT
! ===========================================================================
!
*WcSystem.activateCallback:	WcManage(*WcSys)

*WcSys.wcCreate:	XmpCreateTableDialog
*WcSys.wcChildren:		Label, Sep, SyC SpC SyA SpA
!			nm	c r cs rs opt
*WcSys.layout:		Label	0 0;	\
			Sep	0 1 H;	\
			SyC	0 2 H;	\
			SpC	0 3 H;	\
			SyA	0 4 H;	\
			SpA	0 5 H;

*WcSys.Label.labelString:	WcSystem & WcSpawn

*WcSys.SyC.labelString:		WcSystemCB( \n\
echo WcSystem takes any Shell string.\n\
echo Your display is $DISPLAY\n\
echo you are in `pwd` )
*WcSys.SyC.activateCallback:	WcSystem( \n\
echo WcSystem takes any Shell string.\n\
echo Your display is $DISPLAY\n\
echo you are in `pwd` )
*WcSys.SpC.labelString:		WcSpawnCB( Mri -rf Hello )
*WcSys.SpC.activateCallback:	WcSpawn( Mri -rf Hello )

*WcSys.SyA.labelString:		WcSystemACT( \n\
echo Invoked as action, no way to insert newlines.; ls -l Wc*.ad ) 
*WcSys.SyA.translations:	<Btn1Up>:WcSystem( \
echo Invoked as action, no way to insert newlines.; ls -l Wc*.ad ) 
*WcSys.SpA.labelString:		WcSpawnACT( Mri -rf Dialogs )
*WcSys.SpA.translations:	<Btn1Up>: WcSpawn( Mri -rf Dialogs )

! ===========================================================================
! Test of WcLoadResourceFile
! WcLoadResourceFileACT, WcLoadResourceFileCB
! ===========================================================================
!
*WcLoad.activateCallback:	WcLoadResourceFile( WcLo ) \
				WcCreatePopups( ^ WcLo )

! ===========================================================================
! Test of Debug tools
! WcPrintTreeCB, WcPrintTreeACT
! WcTraceCB, WcTraceACT
! ===========================================================================
!

*WcDebug.activateCallback:	WcManage(*WcDbg)

*WcDbg.wcCreate:	XmpCreateTableDialog
*WcDbg.wcChildren:	Label, Sep, PrC, PrA, Sep2, TrC, TrA
*WcDbg.layout:		Label 0 0 ; \
			Sep   0 1 ; \
			PrC   0 2 ; \
			PrA   0 3 ; \
			Sep2  0 4 ; \
			TrC   0 5 ; \
			TrA   0 6 ; \

*WcDbg.Label.labelString:	WcPrintTree & WcTrace

*WcDbg.PrC.labelString:		WcPrintTreeCB( ^ )
*WcDbg.PrC.activateCallback:	WcPrintTree( ^ )
*WcDbg.PrA.labelString:		WcPrintTreeACT( ~ )
*WcDbg.PrA.translations:	<Btn1Up>: WcPrintTree( ~ )

*WcDbg.TrC.labelString:		WcTraceCB( You Pressed TrC )
*WcDbg.TrC.activateCallback:	WcTrace( You Pressed TrC )
*WcDbg.TrA.labelString:		WcTraceACT( You Pressed TrA )
*WcDbg.TrA.translations:	<Btn1Up>: WcTrace( You Pressed TrA )

! ===========================================================================
! Test of WcLateBind
! ===========================================================================
!
*WcLateBind.activateCallback:	WcManage(*WcLb)

*WcLb.wcCreate:		XmpCreateTableDialog
*WcLb.wcChildren:	Label, Sep, First, Second, RegClosure ResClosure
*WcLb.layout:		Label 0 0 2 1 ; \
			Sep   0 1 2 1 ; \
			First 0 2 ; Second 1 2 ; \
			RegClosure 0 3 ; ResClosure 1 3

*WcLb.Label.labelString:	WcLateBind\nHook Test

*WcLb.First.activateCallback:	TestFirstHook( some stuff )

*WcLb.Second.activateCallback:	TestSecondHook()

*WcLb.RegClosure.activateCallback:	TestClosure()
*WcLb.ResClosure.activateCallback:	TestClosure(in-resource-file)

! ===========================================================================
! Test of Callback Methods
! ===========================================================================
!
*WcMethods.activateCallback:	WcManage(*WcCBM)

*WcCBM.wcCreate:	XmpCreateTableDialog
*WcCBM*alignment:	XmALIGNMENT_BEGINNING
*WcCBM.wcChildren:	Label, Sep, crObj1, crObj2, crObj3, cbm1, cbm2, cbm3
*WcCBM.layout:		Label 0 0 2 1 ; \
                        Sep   0 1 2 1 ; \
			crObj1 0 2 ; cbm1 1 2 ; \
			crObj2 0 3 ; cbm2 1 3 ; \
			crObj3 0 4 ; cbm3 1 4

*WcCBM.Label.labelString:	\
Wcl Callback Method Test\n\
\n\
When the "Create" buttons are pressed, a new object instance\n\
is created and attached to the table dialog.  Think: this makes\n\
the table dialog represent a new object instance.\n\
\n\
When the "Invoke" buttons are pressed, methods of the current\n\
object are invoked.

*WcCBM.crObj1.labelString:	Create An Object
*WcCBM.crObj2.labelString:	Create Second Object
*WcCBM.crObj3.labelString:	Create Third Object

*WcCBM.crObj1.activateCallback:	TestObj::Create( object_1 ) \
				TestObj::AttachTo(*WcCBM)
*WcCBM.crObj2.activateCallback:	TestObj::Create( second object ) \
				TestObj::AttachTo(*WcCBM)
*WcCBM.crObj3.activateCallback:	TestObj::Create() \
				TestObj::AttachTo(*WcCBM)

*WcCBM.cbm1.labelString:	Invoke 1st Method on Current Object
*WcCBM.cbm2.labelString:	Invoke 2nd Method on Current Object
*WcCBM.cbm3.labelString:	Invoke 1st and 2nd Methods on Current Object

*WcCBM.cbm1.activateCallback:	TestObj::1st(yeah)
*WcCBM.cbm2.activateCallback:	TestObj::2nd()
*WcCBM.cbm3.activateCallback:	TestObj::1st() TestObj::2nd( third      )

! ===========================================================================
! Test of Dynamically Linked Callbacks
! ===========================================================================
!
*WcDynamicLibs.activateCallback:	WcManage(*WcDyn)

*WcDyn.wcCreate:	XmpCreateTableDialog
*WcDyn*alignment:	XmALIGNMENT_BEGINNING
*WcDyn.wcChildren:	Label, Sep, dcb1, dcb2, dcb3
*WcDyn.layout:		Label 0 0 ; \
                        Sep   0 1 ; \
			dcb1 0 2 ; \
			dcb2 0 3 ; \
			dcb3 0 4 

*WcDyn.Label.labelString:	Wcl Dynamically Linked Callback Test

*WcDyn.dcb1.labelString:	WcDynamicCallback( -lStuff PrintCB(Bang!) )
*WcDyn.dcb2.labelString: \
WcDynamicCallback( ../Stuff/libStuff.so.2.7 PrintCB(Pow!))
*WcDyn.dcb3.labelString:	-lStuff::PrintCB(Zap!)

*WcDyn.dcb1.activateCallback:	WcDynamicCallback( -lStuff PrintCB(Bang!) )
*WcDyn.dcb2.activateCallback:	WcDynamicCallback( ../Stuff/libStuff.so.2.7 \
						   PrintCB(Pow!))
*WcDyn.dcb3.activateCallback:	-lStuff::PrintCB(Zap!)

! ===========================================================================
! Test of WcSetValueCB
! ===========================================================================
!

*WcSetValue.activateCallback:	WcSetValue( \
	(this.labelString: I did!) \
	(this.activateCallback: WcSetValue( this.labelString: and again! )) )

