#!../wafe --f
# Wafe script to demonstrate how to create drop down menus
# without a menu button 
# -- Gustaf Neumann    Jun  1 20:03:59 EDT 1994

mergeResources topLevel \
    *background wheat \
    *foreground black \
    *SmeBSB.callback {echo %w}

Command pressMe topLevel \
    translations {#override
       <BtnDown>: set() XtMenuPopup(menu) reset()
    }

SimpleMenu menu pressMe \
    popupCallback {positionMenuUnder %W pressMe}
      SmeBSB one menu
      SmeBSB two menu
      SmeBSB three menu
      SmeLine line menu
      SmeBSB quit menu callback %w

proc positionMenuUnder {shell parent} {
  translateCoords $parent 0 0 px py
  sV $shell x $px y [expr $py+[gV $parent height]]
}


realize
