! SCCS_data:    @(#) Popup 1.1 92/12/08 13:45:23
!
!	This example shows a special way to use WcSetValue:
!		WcSetValue( widget.resource(type): value )
!	Note that the type of the resource can be specified in parenthesis
!	before the `:' following the resource name.  There cannot be any
!	spaces before the `:' in any case.
!
!	Using WcSetValue in this way is dangerous.  If you get the type wrong,
!	the application will probably crash.  Don't do that!  Seriously, this
!	is exactly the same problem as you have if you use XtSetValues directly
!	(that is what the callback does).  
!
!	You are MUCH more safe to leave out the parenthsized type.  Without a
!	type specification, WcSetValue will ask the widget for the type it
!	needs, and then it will invoke the string-to-whatever type converter 
!	which has been registered with Xt.
!
!	The ONLY ONLY ONLY reason to specify the type to WcSetValue is when you
!	need to change a *sub-resource* of a widget.  
!	
!	How do you know when its a sub-resource?  When you are *certain* that
!	the resource exists, yet WcSetValue complains that the widget does not
!	have the resource. 
!
!	Sometimes, the widget documentation gives you a clue.  Sometimes, you
!	discover it by looking at the source.
!
!	Sometimes, somebody tells you.  I'm telling you: with XmText
!	widgets, the resources titled "XmTextOutputResource Set" are
!	all sub-resources.  I looked at the source, and that's also
!	the way XawText widgets work.
!
Mri.wcChildren:		msgWindow

*msgWindow.wcCallback:	WcSetValue(Mri.title: Popup)

*XmText.translations:	#augment \n\
                <Btn3Down>: XmpPopup( *msgFontMenu )

*msgWindow.wcClassName:		XmText
*msgWindow.wcPopups:		msgFontMenu
*msgWindow.activateCallback:	WcSetValue(this.value: Saw that return )
*msgWindow.fontList:		*times-bold-i-*--14-*
*msgWindow.value:		XmText with a popup menu

*msgFontMenu.WcConstructor:	XmCreatePopupMenu
*msgFontMenu.WcChildren:	msgFont1, msgFont2, msgFont3, Quit

*msgFont1.wcConstructor:	XmCreateCascadeButton
*msgFont1.labelString:		courier bold oblique 10
*msgFont1.fontList:		*courier-bold-o-*--10-*
*msgFont1.activateCallback:	WcSetValue(				\
					*msgWindow.fontList(FontList):	\
						*courier-bold-o-*--10-* )

*msgFont2.wcConstructor:	XmCreateCascadeButton
*msgFont2.labelString:		helvetica bold oblique 18
*msgFont2.fontList:		*helvetica-bold-o-*--18-*
*msgFont2.activateCallback:	WcSetValue(				\
					*msgWindow.fontList(FontList):	\
						*helvetica-bold-o-*--18-*)

*msgFont3.wcConstructor:	XmCreateCascadeButton
*msgFont3.labelString:		symbol 24
*msgFont3.fontList:		*symbol-*--24-*
*msgFont3.activateCallback:	WcSetValue(				\
					*msgWindow.fontList(FontList):	\
						*symbol-*--24-* )

*Quit.wcConstructor:		XmCreateCascadeButton
*Quit.fontList:			*times-bold-i-*--14-*
*Quit.activateCallback:		WcExit
