#! ../mofe --f
# small example script to demonstrate the Layout widget 
# Gustaf Neumann  March 8, 1993
scriptNeeds Layout {
  This program can only be used, when mofe was compiled 
  with support for the Layout widget.
}

set Layout {vertical {
  space = (height label/2)
  $space <+inf -100%>
  horizontal {
    $space <-100%>
    label
    $space <+inf -100%>
  }
  $space <+inf -100%>
  horizontal {
    $space <-100%>
    textInsertionField <+inf -100% *>
    $space <-100%>
  }
  $space <+inf -100%>
  horizontal {
    $space <-100%>
    button1
    (3*$space) <+inf -100%>
    button2
    $space <-100%>
  }
  $space <+inf -100%>
}}

mergeResources topLevel \
    *XmTextField*background white \
    *.background gray90 \
    *.foreground black \
    *l.layout $Layout

XmMainWindow main topLevel
Layout l main
XmLabelGadget label l labelString "Label Widget" 
XmTextField textInsertionField l width 300
XmPushButtonGadget button1 l labelString "Button 1" 
XmPushButtonGadget button2 l labelString Quit activateCallback quit
sV main workWindow l
realize
