#! ../mofe --f
# sample script to demonstrate the XmContainer widget (requires Motif 2.0)
scriptNeeds XmContainer "This Script requires Motif 2.0!"

 XmMainWindow m topLevel
  XmMenuBar menubar m
   XmPulldownMenu pd1 menubar unmanaged
    XmPushButtonGadget Quit pd1 \
       accelerator Ctrl<Key>c \
       acceleratorText Ctr-C \
       activateCallback {echo quit;addTimeOut 100 quit}
  XmCascadeButtonGadget Actions menubar subMenuId pd1 mnemonic A
   XmPulldownMenu pd2 menubar unmanaged radioBehavior true
    XmToggleButtonGadget Outline pd2 \
	set 1 valueChangedCallback {setLayoutType %s %w}
    XmToggleButtonGadget Detail pd2 \
	valueChangedCallback {setLayoutType %s %w}
    XmToggleButtonGadget Spatial pd2 \
	valueChangedCallback {setLayoutType %s %w}
  XmCascadeButtonGadget Layout menubar subMenuId pd2 mnemonic L

  mergeResources topLevel \
      *c*background ivory \
      *c.XmIconGadget.background AntiqueWhite

  XmContainer c m width 450  height 350 \
      detailColumnHeadingCount 3 detailColumnHeading {" " Sex Description} \
      detailTabList "100,200,300" \
      background ivory \
      layoutType OUTLINE \
      selectionPolicy BROWSE_SELECT \
      automaticSelection NO_AUTO_SELECT \
      entryViewType SMALL_ICON \
      selectionCallback {makeACall "%S"}
  
  XmIconGadget Jim c outlineState EXPANDED \
      detailCount 2 detail {"male" "the Boss"} \
      smallIconPixmap romeo.xpm smallIconMask romeo_m.xpm
  XmIconGadget Libby c outlineState EXPANDED entryParent Jim \
      detailCount 2 detail {"female" "nice daughter"} \
      smallIconPixmap julia.xpm smallIconMask julia_m.xpm
  XmIconGadget Kamesh c outlineState EXPANDED entryParent Jim \
      detailCount 2 detail {"male" "black sheep"} \
      smallIconPixmap romeo.xpm smallIconMask romeo_m.xpm
  XmIconGadget Sang c entryParent Libby \
      smallIconPixmap romeo.xpm smallIconMask romeo_m.xpm
  XmIconGadget Nonie c entryParent Libby \
      smallIconPixmap julia.xpm smallIconMask julia_m.xpm
  XmIconGadget Hansel c entryParent Kamesh \
      smallIconPixmap romeo.xpm smallIconMask romeo_m.xpm
  XmIconGadget Betty c entryParent Kamesh \
      smallIconPixmap julia.xpm smallIconMask julia_m.xpm

  proc makeACall {w} {
    puts stderr "CALL w=$w <[widgetName $w]>"
  }
  proc setLayoutType {S T} {
    if $S {sV c layoutType $T}
  }
#  foreach t {NONE SOLID SPIRAL PIXMAP} {
#    XmLabel binding-type:$t rc
#    XmNotebook $t rc bindingType $t 
#    foreach n {1 2 3} {
#      XmLabel p$n $t notebookChildType page pageNumber $n
#      XmPushButton tab$n $t notebookChildType major_tab pageNumber $n
#    }
#
# } 
# XmLabel info rc labelString ""

realize