~?!i&32768 ~o=295 ~$>end_of_copyright ~/!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ~/Copyright (C) Heinz Spiess, CH-2558 Aegerten, 1999. All rights reserved. ~/ ~/The right to use this macro is granted to all EMME/2 users, provided the ~/following conditions are met: ~/ 1) The macro cannot be sold for a fee (but it can be used and distributed ~/ without charge within consulting projects). ~/ 2) The user is aware that this macro is not a part of the EMME/2 software ~/ licence and there is no explicit or implied warranty or support ~/ provided with this macro. ~/ 3) The comments in this macros must not be removed and any additions or ~/ modification must be appropriately identified as such and give at least ~/ date, name and the reason of the modification. ~/!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ~:end_of_copyright ~/========================================================================= ~/ TILEWGEN 1.0 - Generate coordinates of tiled windows and call macro ~/ (Heinz Spiess, EMME/2 Support Center, CH-2558 Aegerten - 1999-03-21) ~/ ~/ Macro TILEWGEN computes the coordinates of a set of adjacent windows ~/ and calls, for one window after the other, a user specified macro. ~/ ~/ no. of windows per row ~/ +---------+---------+---------+---------+ ~/ | W9 | W10 | W11 | W12 | ~/ |---------|---------|---------|---------| ~/ | W5 | W6 | W7 | W8 | no of rows ~/ |---------|---------|---------|---------| ~/ | W1 | W2 | W3 | W4 | ~/ *---------+---------+---------+---------+ ~/ ^ <-width-> ~/ lower left coordinate of lower left window (X0/Y0) ~/ ~t1=%1% ~?t1=ask ~$ask ~/ Calling sequence: ~/ ~ [ ...]] ~/ or ~/ ~0 ~$width ~:nrows ~t0=~*Enter: Number of rows of windows= ~r4=%1% ~?e ~$nrows ~?!r4>0 ~$nrows ~:wprow ~t0=~*Enter: Number of windows per row= ~r5=%1% ~?e ~$wprow ~?!r5>0 ~$wprow ~/Enter: Macro to be called for each window (incl. optional initial args) ~t1=~* = ~:nextrow ~x=0 ~:nextplot ~r11=%r3% ~r11*%x% ~r11+%r1% ~r12=%r3% ~r12*.75 ~r12*%y% ~r12+%r2% ~r13=%r11% ~r13+%r3% ~r14=%r3% ~r14*.75 ~r14+%r12% ~z=%o% ~r10+1 ~o=0 ~t9= ~?!t1= ~<%t1% %r11% %r12% %r13% %r14% ~?t1= ~/Window %r10_2%: XLOW=%r11_<6% YLOW=%r12_<6% XHIGH=%r13_<6% YHIGH=%r14_<6% ~o=%z% ~?t9=quit ~$end ~x+1 ~?x<%r5% ~$nextplot ~y+1 ~?y<%r4% ~$nextrow ~:end