Warning: this is an htmlized version!
The original is here, and the conversion rules are here. |
# This file: # http://angg.twu.net/TCL/placer.tcl.html # http://angg.twu.net/TCL/placer.tcl # (find-angg "TCL/placer.tcl") # Author: Eduardo Ochs <[email protected]> # # See: (find-es "tcl" "placer") package-require-Tk; # See: (find-es "tcl" "package-require-Tk") proc incrsize {dx dy} { regexp {([0-9]+)(.)([0-9]+)(.)([0-9]+)(.)([0-9]+)} [wm geometry .] \ -> width sep1 height sep2 x sep3 y wm geometry . "[expr $width+$dx]$sep1[expr $height+$dy]$sep2$x$sep3$y" } bind . <Left> { incrsize -5 0 } bind . <Right> { incrsize 5 0 } bind . <Up> { incrsize 0 -5 } bind . <Down> { incrsize 0 5 } # (find-man "3tk place") # (find-man "3tk frame") # frame .a -width 40 -height 20 -bg black frame .b -width 30 -height 60 -bg yellow frame .c -width 35 -height 35 -bg blue place .a -x 40 -y 20 place .b -x 30 -y 60 place .c -x 35 -y 35 place info . place info .a place slaves . place configure . place configure .a frame .c.d -width 10 -height 10 -bg red place .c.d -x 10 -y 10 place configure .c.d -anchor se frame .e -width 40 -height 40 -bg green frame .f -bg forestgreen place .e -anchor c -relx 0.5 -rely 0.5 place .f -anchor nw -relx 0.5 -rely 0.5 -relwidth 0.4 -relheight 0.4 frame .g -width 30 -height 30 -bg mediumvioletred place .g -in .e frame .h -width 10 -height 10 -bg blueviolet place .h -in .f -relx 1 -rely 0.5 -anchor c frame .i -width 10 -height 10 -bg violet place .i -in .g -relx 1 -rely 0.5 -anchor c set THIS_IS_A_TEST_BLOCK { * (eepitch-tclsh) * (eepitch-kill) * (eepitch-tclsh) source placer.tcl place .g -in .f place .g -in .e place .g -in .f }