#!../wafe --f
# script to demonstrate how to change the layout
# of an application dynamically (here by clicking on the buttons)
# Gustaf Neumann

set layout1 "vertical {a b c}"
set layout2 "horizontal {a b c}"
set layout3 "horizontal { vertical {a b} vertical {c} }"
set layout4 "horizontal { vertical {a b} vertical {1 <+inf -0> c 1 <+inf -0>}}"
set layout5 "horizontal { vertical {a b} vertical {c <+inf-0*+inf-0>}}"
set layout6 {horizontal { vertical { a <+inf -0*+inf -0> b <+inf -0*+inf -0>} 
                          vertical {c <+inf -0*+inf -0> }}}

sV topLevel allowShellResize true

Layout l topLevel layout $layout6
  Command a l label "i am the first Button" callback {sV l layout $layout1}
  Command b l label "i am the second"  callback {sV l layout $layout2}
  Command c l bitmap xlogo32  callback {sV l layout $layout6}

realize
