#!../bltwish

source bltDemo.tcl
#bltdebug 100

option clear

image create photo label1 -file ./images/mini-book1.gif
image create photo label2 -file ./images/mini-book2.gif
image create photo testImage -file ./images/txtrflag.gif


tabset .t \
    -gap 2 \
    -textside right \
    -dashes "5 2" \
    -side right \
    -samewidth yes \
    -highlightcolor yellow \
    -bd 0 \
    -tiers 1 \
    -scrollcommand { .s set } \
    -scrollincrement 1 

set graph .t.graph1
option clear
source graph1.tcl

set graph .t.graph2
option clear
source graph2.tcl

set graph .t.graph3
option clear
source graph3.tcl

set graph .t.graph5
option clear
source barchart2.tcl

label .t.l -image testImage

option clear

option add *Tabset.Tab.font -*-helvetica-bold-r-*-*-12-*-*-*-*-*-*-*
#option add *Tabset.Tab.fill both

set attributes {
    "Graph \#1" pink	.t.graph1 
    "Graph \#2" blue	.t.graph2
    "Graph \#3" cyan	.t.graph3
    "Graph \#5" yellow	.t.graph5
    one		salmon	.t.l    
}

foreach { label color window } $attributes {
    .t insert end $label -window $window \
	-selectbackground ${color}2  \
	-background ${color}3 \
	-activebackground ${color}1 
}

set f [open "../MANIFEST" "r"]
for { set i 0 } { $i < 50 } { incr i } {
    gets $f word
    .t insert end $word -state normal
}
close $f

scrollbar .s -command { .t view } -orient horizontal
radiobutton .left -text "Left" -variable side -value "left" \
    -command { .t configure -side $side -rotate 90 }
radiobutton .right -text "Right" -variable side -value "right" \
    -command { .t configure -side $side -rotate 270 }
radiobutton .top -text "Top" -variable side -value "top" \
    -command { .t configure -side $side -rotate 0 }
radiobutton .bottom -text "Bottom" -variable side -value "bottom" \
    -command { .t configure -side $side -rotate 0 }

table . \
    .t 0,0 -fill both -cspan 2 \
    .s 1,0 -fill x -cspan 2 \
    .top 2,0 -cspan 2 \
    .left 3,0 \
    .right 3,1 \
    .bottom 4,0 -cspan 2 

table configure . r1 r3 r4 r2 -resize none
focus .t

.t focus 0

after 3000 {
	.t move 0 after 3
	.t tab configure 3 -state normal 
}
