#!../mofe --f
# sample script to demonstrate the notebook widget (requires Motif 2.0)

if [string match "" [info command XmNotebook]] {
  XmLabel w topLevel labelString "This script requires Motif 2.0!"
} else {
  set p1 {
   This is the first 
   page in by shiny
   new notebook
  }
  set p2 {
   On the second 
   page is some
   more information
   that i like
  }
  set p3 {
   The third page
   is unfortunately
   the last page
   that i have written 
   so far
  }
  mergeResources topLevel \
    *bindingPixmap spiral.xpm \
    *p1.labelString $p1 \
    *p2.labelString $p2 \
    *p3.labelString $p3 

  XmRowColumn rc topLevel
  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