#! ../mofe --f
# a small sample script to demonstrate the Raster widget of the
# EuroBridge Widget set (tested with Xew-3.1.tar.gz)
#
# Gustaf Neumann            May 10 23:49:28 EDT 1995

scriptNeeds XeRaster "This script requires the EuroBridge Widget set!"

  mergeResources topLevel \
      *pd2*activateCallback {sV v colorMode %w}

  XmMainWindow main topLevel \
      scrollingPolicy APPLICATION_DEFINED width 340 height 310
  XmMenuBar menubar main

  XmPulldownMenu pd1 menubar unmanaged 
   XmPushButtonGadget quit pd1 \
       accelerator Ctrl<Key>C \
       acceleratorText Ctrl+C \
       activateCallback quit
   XmCascadeButtonGadget Actions menubar subMenuId pd1 mnemonic A

 XmPulldownMenu pd2 menubar unmanaged 
   foreach mode {mono gray color} {XmPushButtonGadget $mode pd2}
 XmCascadeButtonGadget ColorMode menubar subMenuId pd2 mnemonic C

 if [string compare "" [set fn \
     [resolvePathname topLevel NULL ws9.gif NULL $FILESEARCHPATH:tcl/%N]]] {
   XeRaster v main \
       scaling maxaspect \
       colormapUse sharedown \
       useShm 1 \
       contentFormat gif \
       contentFile $fn
 } else {
   puts stderr "cannot locate file  ws9.gif in $FILESEARCHPATH"
 }


realize