#!../wafe --f
# Wafe script to demonstrate how to create pulldown menus 
# witch checkbuttons in Wafe    
# Gustaf Neumann    Jun  3 3:01:55 EDT 1994

mergeResources topLevel \
    *background gray90 \
    *foreground black \
    *SimpleMenu*font -adobe-*-medium-*-*-*-14-*-*-*-*-*-*-* \
    *SimpleMenu*menuLabel*font  -adobe-*-bold-*-*-*-14-*-*-*-*-*-*-* \
    *SimpleMenu*HorizontalMargins 20 \
    *SmeBSB.callback {toggleMenuEntry %w}

proc toggleMenuEntry {w} {
  global on
  if [info exists on($w)] { sV $w leftBitmap None;    unset on($w)
  } else                  { sV $w leftBitmap xlogo11; set   on($w) 1 }
}

MenuButton pressMe topLevel menuName menu
  SimpleMenu menu pressMe label "Check Menu"
    SmeLine line menu
    SmeBSB one menu
    SmeBSB two menu
    SmeBSB three menu
    SmeLine line menu
    SmeBSB quit menu callback %w

toggleMenuEntry two

realize
