+proc show_context {maxhv x ctxs} {
+ global mul
+ upvar 1 $maxhv maxh
+ set w .d.ctx.at$x
+ if {[llength $ctxs]==1} { set fg blue } { set fg yellow }
+ label $w -bg black -fg $fg -text [join $ctxs "/\n"] -justify left
+ place $w -x [expr {($x-1)*$mul}] -y 0
+ set wh [winfo reqheight $w]
+ if {$wh > $maxh} { set maxh $wh }
+}
+
+proc resize_widgets {} {
+ global mulcols mulrows csrh gotsh ctxh glyphsdone
+ global unk_l unk_contexts
+
+ foreach w {.d.csr .d.got .d.ctx} {
+ $w configure -width $mulcols
+ }
+ #.d configure -height [expr {$csrh+$mulrows+$gotsh+$ctxh}]
+ foreach w {0 1} {
+ .d.mi.csr_$w configure -height $mulrows
+ }
+
+ eval destroy [winfo children .d.ctx]
+
+ set maxh 0
+ foreach {min max contexts got} $glyphsdone {
+ show_context maxh $min $contexts
+ }
+ show_context maxh $unk_l $unk_contexts
+ .d.ctx configure -height $maxh
+}
+