! SCCS_data: @(#) MultiWin 1.1 92/12/02 14:47:13
!
!	Multiple windows.  Initially, only one shell (window).
!	Pressing buttons causes other shells to be created.

Ari.wcChildren:			table

*table.wcClassName:		XpTable
*table.wcChildren:		boxC, boxM, quit
!			c r cs rs opt
*table.layout:	boxC	0 0  1  1	;\
		boxM	1 0  1  1	;\
		quit	0 1  2  1	;

*quit.wcClassName:	Command
*quit.callback:		WcExitCB

*boxC.wcClassName:		XpTable
*boxC.wcChildren: 		title, one, two, three, four, five
*boxC.layout:		title	0 0  1  1	;\
			one	0 1  1  1	;\
			two	0 2  1  1	;\
			three	0 3  1  1	;\
			four	0 4  1  1	;\
			five	0 5  1  1	;

*boxC.title.wcClassName:	Label
*boxC.title.label:		Create

*boxC.one.wcClassName:		Command
*boxC.one.callback:		WcCreateChildrenCB(~, ShellOne),	\
				WcSetInsensitiveCB( this ),		\
				WcSetSensitiveCB( *boxM.one )

*boxC.two.wcClassName:		Command
*boxC.two.callback:		WcCreateChildrenCB(~, ShellTwo),	\
				WcSetInsensitiveCB( this ),		\
				WcSetSensitiveCB( *boxM.two )

*boxC.three.wcClassName:	Command
*boxC.three.callback:		WcCreateChildrenCB(~, ShellThree),	\
				WcSetInsensitiveCB( this ),		\
				WcSetSensitiveCB( *boxM.three )

*boxC.four.wcClassName:		Command
*boxC.four.callback:		WcCreateChildrenCB(~, ShellFour),	\
				WcSetInsensitiveCB( this ),		\
				WcSetSensitiveCB( *boxM.four )

*boxC.five.wcClassName:		Command
*boxC.five.callback:		WcCreateChildrenCB(~, ShellFive)

! Initially, all the buttons are insensitive because 
! there is nothing to manage yet.
!
*boxM.wcClassName: 		XpTable
*boxM.wcChildren: 		title, one, two, three, four
*boxM*Command.sensitive:	False
*boxM.layout:		title	0 0  1  1	;\
			one	0 1  1  1	;\
			two	0 2  1  1	;\
			three	0 3  1  1	;\
			four	0 4  1  1	;

*boxM.title.wcClassName:	Label
*boxM.title.label:		Manage

*boxM.one.wcClassName:		Command
*boxM.one.callback:		WcManageCB(*ShellOne)

*boxM.two.wcClassName:		Command
*boxM.two.callback:		WcManageCB(*ShellTwo)

*boxM.three.wcClassName:	Command
*boxM.three.callback:		WcManageCB(*ShellThree)

*boxM.four.wcClassName:		Command
*boxM.four.callback:		WcManageCB(*ShellFour)

! Below are resources describing five different shells.  The
! shells are very similar: each shell has a single child, a table.
! Each table has two children, a label and a button.  The label
! always gives a unique description of its parent shell.  The
! button always unmanages its parent shell.
!
! The buttons all use relative naming in the WcUnmanageCB: a ~ means 
! the shell ancestor of the button.

*shellBox.wcClassName:		XpTable
*shellBox.wcChildren:		title, button
!				name	c r cs rs opt
*shellBox.layout:		title	0 0  1  1	; \
				button	1 0  1  1	;

*title.wcClassName:		Label

*button.wcClassName:		Command
*button.label:			Unmanage This Shell
*button.callback:		WcUnmanageCB(~)

!
! A TopLevelShell with two children: a label and a button.
! The button unmanages the shell (~ means the shell ancestor of the button)
!
*ShellOne.wcClassName:		TopLevelShell
*ShellOne.wcChildren:		shellBox

*ShellOne*title.label:		A TopLevelShell

!
! Another TopLevelShell with two children: a label and a button.
! The button unmanages the shell (~ means the shell ancestor of the button)
!
*ShellTwo.wcClassName:          TopLevelShell
*ShellTwo.wcChildren:           shellBox

*ShellTwo*title.label:          Another TopLevelShell

!
! A Transient shell with two children: a label and a button
!
*ShellThree.wcClassName:	TransientShell
*ShellThree.wcChildren:		shellBox

*ShellThree*title.label:	A TransientShell

!
! Another Transient shell with two children: a label and a button
!
*ShellFour.wcClassName:		TransientShell
*ShellFour.wcChildren:		shellBox

*ShellFour*title.label:		Another TransientShell

!
! Another Transient shell with two children: a label and a button
! This shell destroys itself, rather than unmanaging itself.
!
*ShellFive.wcClassName:		TransientShell
*ShellFive.wcChildren:		shellBox

*ShellFive*title.label:		Yet Another TransientShell

*ShellFive*button.callback:	WcDestroyCB(~)
*ShellFive*button.label:	Destroy This Shell
