/*********************************************************************** (c) Copyright 1992 Command Technology Corporation MACRO: BOX - SPF/PC Box Drawing Edit Macro PURPOSE: Draw a box from the top left hand corner as defined by the current cursor position to the cursor position as defined by the second invocation of the macro. As an aid to invoking the macro twice, it sets the PF48 key to "BOX" and then resets the key back to its original contents after it is done. USAGE: Type "BOX" on the command line and then move your cursor to where you would like the upper left hand corner of the box to be; hit ENTER. Move the cursor to where you would like the lower right hand corner of the box to be, and hit PF48. A double lined box is copied over the existing data. PF48 gets reset back to its original value. NOTE: PF48 = Alt-PF12 ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» WARNING: º BOX is a destructive macro; it writes over any text º º that was already there!! See BACKBOX for macro that º º creates a box in the background of existing text. º ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ **********************************************************************/ 'isredit macro' 'isredit (ROW, COL) = cursor' 'isredit (WIDTH) = data_width' if (ROW<1) | (COL<1) | (COL>WIDTH) then call fatalerr cursor not in text, cursor must be positioned in text to perform box 'ispexec vget BASEROW BASECOL LASTPF48 ZPF48' if (BASEROW='') then do BASEROW = ROW+0 BASECOL = COL+0 LASTPF48 = ZPF48 ZPF48 = 'BOX' 'ispexec vput BASEROW BASECOL LASTPF48 ZPF48' call dispmsg position lr corner and hit PF48, move the cursor to the lower right corner and hit PF48 end else do if (ROW0) then do 'isredit change p"=" Í .top .top all 'BASECOL+1' 'DESTCOL-1 if (x>0) then 'isredit change p"=" Í .bott .bott all 'BASECOL+1' 'DESTCOL-1 end if (x>1) then do 'isredit change p"=" Í .bott .bott all 'BASECOL+1' 'DESTCOL-1 'isredit change p"=" º .top .bott all 'BASECOL' 'BASECOL 'isredit change p"=" º .top .bott all 'DESTCOL' 'DESTCOL end if (x>1) & (y>0) then do 'isredit change p"=" É .top .top all 'BASECOL' 'BASECOL 'isredit change p"=" » .top .top all 'DESTCOL' 'DESTCOL 'isredit change p"=" È .bott .bott all 'BASECOL' 'BASECOL 'isredit change p"=" ¼ .bott .bott all 'DESTCOL' 'DESTCOL end 'isredit reset chg .top .bott' return 0 fatalerr: arg mvar call dispmsg mvar exit -1 dispmsg: arg ZEDSMSG, ZEDLMSG 'ISPEXEC SETMSG MSG(ISRZ000)' return 0