Posted to tcl by GPS at Fri Dec 14 09:55:12 GMT 2007view raw
- proc NS__grid-layout-xy {grid xsizesvar ysizesvar} {
- upvar $xsizesvar xsizes
- upvar $ysizesvar ysizes
-
- foreach row $grid {
- foreach cells $row {
- foreach w $cells {
- if {"" eq $w} continue
- lassign [$w -slot] xslot yslot
- set x 0; set y 0
- for {set xi 0} {$xi < $xslot} {incr xi} {
- if {[info exists xsizes($xi)]} { incr x $xsizes($xi) }
- }
- for {set yi 0} {$yi < $yslot} {incr yi} {
- if {[info exists ysizes($yi)]} {incr y $ysizes($yi) }
- }
- $w x $x y $y
- }
- }
- }
- }
-