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

if [string match "" [info command XeVideo]] {
  XmLabel w topLevel \
      labelString "This script requires the EuroBridge Widget set!"
} else {

  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 restart pd1 \
       activateCallback {sV v play forward;callActionProc v ""  restart-play}
   XmPushButtonGadget freeze pd1 \
       activateCallback {sV v play freeze}
   XmSeparatorGadget sep pd1
   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

 XeVideo v main \
     scaling maxaspect \
     colormapUse sharedown \
     minFrameDelay 0 \
     useShm 1 \
     contentFile /u/neumann/import/enterprise.mpg
}

realize