Mri.wcChildren:        LinearTransform
Mri.geometry:         300x400


!*LinearTransform.wcConstructor:     XtCreateTopLevelShell
*LinearTransform.wcConstructor:     XtCreateTransientShell
*LinearTransform.wcChildren:      bb
*LinearTransform.title:           Linear Transformation

*LinearTransform.bb.wcClassName:  XmBulletinBoard
*LinearTransform.bb.wcChildren:   table
	
*LinearTransform.bb.table.wcConstructor:     CreateTable
*LinearTransform.bb.table.wcChildren:        f, times, xplus, b, ok, cancel
*LinearTransform.bb.table.layout:            f 0 0; times 1 0; xplus 2 0 ; b 3 0; ok 1 1; cancel 2 1

! UpdateTransformDefaultCB is called each time a default is updated.
! This callback uses the name of the widget that invokes it as an argument
! to the setValue functions of the transform function to figure out which
! argument has been updated. Again, this is an evil hack.

*LinearTransform.bb.table.f.wcClassName:	         XmText
*LinearTransform.bb.table.f.value:                 0
*LinearTransform.bb.table.f.losingFocusCallback:   UpdateTransformDefaultCB

*LinearTransform.bb.table.times.wcClassName:        XmLabel
*LinearTransform.bb.table.times.labelString:        *

*LinearTransform.bb.table.xplus.wcClassName:        XmLabel
*LinearTransform.bb.table.xplus.labelString:        (scalar data value) +

*LinearTransform.bb.table.b.wcClassName:	         XmText
*LinearTransform.bb.table.b.value:                 0
*LinearTransform.bb.table.b.losingFocusCallback:   UpdateTransformDefaultCB


! The OK button means that the transform has been selected, and its 
! parameters have been set. I.e., we are done with the TransformFunctionMenu.
! So any variables are reset to their
! defaults. This is done because this same widget will reappear in a 
! different context, and if the values are not reset, it would be possible
! to click "OK" and believe the defaults are different from what they are.

! Finally, doneRunningCB is called to do all final cleanup.

*LinearTransform.bb.table.ok.wcConstructor:      XmCreatePushButton
*LinearTransform.bb.table.ok.labelString:        OK
*LinearTransform.bb.table.ok.activateCallback:    \
	WcSetValueCB(^^table.b.value: 0), \
	WcSetValueCB(^^table.f.value: 0), doneRunningCB


! The cancel action means that Linear Transform is not for us, so return
! to the TransformFunctionMenu. 
! Any defaults that might have changed are reset, for the same 
! reasons as above.

*LinearTransform.bb.table.cancel.wcConstructor:      XmCreatePushButton
*LinearTransform.bb.table.cancel.labelString:        Cancel
*LinearTransform.bb.table.cancel.activateCallback:   \
        WcSetValueCB(^^table.b.value: 0),\
        WcSetValueCB(^^table.f.value: 0),\
	CancelledCB



