1 #!/home/people/tkys/Eos/util/SGI/bin/bltwish
16 -scrollcommand { .s set } \
18 -selectcommand { MakePhoto %W %n } \
19 -pagewidth 4i -pageheight 3.5i
21 scrollbar .s -command { .t view } -orient horizontal
24 option add *Tabset.Tab.font -*-helvetica-bold-r-*-*-10-*-*-*-*-*-*-*
26 set files [glob ./images/*.gif]
27 set files [lsort $files]
32 proc ResizePhoto { src dest maxSize } {
33 set maxSize [winfo fpixels . $maxSize]
34 set w [image width $src]
35 set h [image height $src]
36 set sw [expr double($maxSize) / $w]
37 set sh [expr double($maxSize) / $h]
38 set s [expr min($sw, $sh)]
39 set w [expr round($s * $w)]
40 set h [expr round($s * $h)]
41 $dest configure -width $w -height $h
43 global horzFilter vertFilter
44 winop resample $src $dest $horzFilter $vertFilter
47 image create photo src
48 image create photo dest
50 label .t.label -image dest -bg purple
52 proc MakePhoto { w name } {
53 set file ./images/$name.gif
54 src configure -file $file
55 ResizePhoto src dest 3i
56 .t tab configure $name -window .t.label -padx 4m -pady 4m
63 table configure . r1 -resize none
67 src configure -file $f
68 set f [file tail [file root $f]]
69 set thumb [image create photo]
70 ResizePhoto src $thumb 1i
71 .t insert end $f -image $thumb -fill none