! SCCS_data: @(#) SWin 1.1 92/12/10 13:37:00
!
!----Demo 12--Scrolling window with a text item and a popup! ----

! This example shows the use of a scrolled window widget with a text
! edit widget as its content.  A popup window is also shown to simulate
! opening a text file.  Some important items are: The file button can't
! be a gadget and still have a popup child; the names of the widgets in
! the structure of the popup are not the ones in the docs, the real names
! are upper, lower, and panel;  the wcCallback is used to create the
! children of the popup.  I could not get the textWidgetClass to work in
! a manner shown in this example.  Please send me a copy if you can make
! it work.

!*wcTrace:               True
Ori.wcChildren:		aform
*Ori.wcCallbac:		WcSetValue(this.title:SWin)
*threeD:		TRUE
*background:		grey

*aform.wcClass:		formWidgetClass
*aform.wcChildren:	control,swind

*control.wcClass:	controlAreaWidgetClass
*control.layoutType:	fixedcols
*control.measure:	4
*control.wcChildren:	quit,file

*quit.wcClass:		oblongButtonGadgetClass
*quit.label:		Quit
*quit.select:		WcExitCB(0)

*file.wcClass:		oblongButtonWidgetClass
*file.label:		File...
*file.wcPopups:		fname
*file.select:		WcPopupCB(*fname)

*swind.wcClass:			scrolledWindowWidgetClass
*swind.recomputeWidth:		TRUE
*swind.recomputeHeight:		TRUE
*swind.yRefName:		control
*swind.yAddHeight:		TRUE
*swind.xOffset:			10
*swind.yOffset:			10
*swind.wcChildren:		ttext

*ttext.wcClass:			textEditWidgetClass
*ttext.font:			8x13
*ttext.wrapMode:		wrapoff
*ttext.linesVisible:		20
*ttext.charsVisible:		80
*ttext.sourceType:		disksource
*ttext.source:			Ori/Ori.c

*fname.wcClass:			popupWindowShellWidgetClass
*fname.reset:			WcSystemCB(echo reset)
*fname.apply:			WcSystemCB(echo apply)
*fname.resetFactory:		WcSystemCB(echo factory)
*fname.setDefaults:		WcSystemCB(echo defaults)
*fname.title:			Load a New file...
*fname.wcCallback:		WcCreateChildrenCB(*fname*upper, fcap) \
				WcCreateChildrenCB(*fname*lower, open) \
				WcCreateChildrenCB(*fname*panel, errors)

*fcap.wcClass:			captionWidgetClass
*fcap.label:			Open file:
*fcap.wcChildren:		ftext

*ftext.wcClass:			textFieldWidgetClass
*ftext.width:			200
*ftext.traversalOn:		TRUE

*open.wcClass:			oblongButtonWidgetClass
*open.label:			Do It
*open.select:			WcSetValueCB(*errors.string: Good job! ) \
				WcPopDownCB(*fname)

*errors.wcClass:		staticTextWidgetClass
*errors.alignment:		left
*errors.font:			8x13bold
*errors.gravity:		southwest
*errors.string:			Go ahead... Do something!
