#!/bin/sh
# the next line restarts using tclsh \
exec tclsh "$0" "$@"

load ../src/gnocl.so

set mainBox [gnocl::box -orientation vertical]

set box [gnocl::box -orientation horizontal -label "With box"]
$mainBox add $box
$box add [gnocl::label -text "1\n2\n3\n4\n5"]
$box add [gnocl::label -text "Top"] -align 0
$box add [gnocl::label -text "Top 20%"] -align 0.2
$box add [gnocl::label -text "Center (Default)"] 
$box add [gnocl::label -text "Bottom 80%"] -align 0.8
$box add [gnocl::label -text "Bottom"] -align 1 

set table [gnocl::table -homogeneous 0 -label "With table"]
$mainBox add $table
$table add [gnocl::label -text "1\n2\n3\n4\n5"] 0 0
$table add [gnocl::label -text "Top"] 1 0 -align 0
$table add [gnocl::label -text "Top 20%"] 2 0 -align 0.2
$table add [gnocl::label -text "Center (Default)"] 3 0
$table add [gnocl::label -text "Bottom 80%"] 4 0 -align 0.8
$table add [gnocl::label -text "Bottom"] 5 0 -align 1 

if { $argc == 1 } {
   set win [gnocl::plug [lindex $argv 0] -child $mainBox]
} else {
   set win [gnocl::window -child $mainBox]
}

gnocl::mainLoop

