! VUESCR.BAS how to use VUESBR.SBR
! by James A. Jarboe IV, GR/AM  (409) 295-5767
! 02/20/86
! makes use of:
!               VUESBR.SBR
!               VUESCR.INC
!               WINDOW.SBR
!
! VUESBR.SBR (by James A. Jarboe) is an inhanced version of VUE.SBR by Dave Pallmann
!
! VUESBR.SBR allows editing of text in a VUE like fashion
! Hope it helps someone else
!
!        XCALL VUESBR,ST,ROWS,COLUMNS,START'ROW,START'COL
!
!  ST       =  variable string to input or change
!              I map it as ARRAY(?) to make access easier
!              although just using the ST as the variable will work just as well
! ROWS      =  the maximum amount of rows you choose to use
! COLUMNS   =  the maximum amount of columns you choose to use
! START'ROW =  row number that you wish the editing to begin on.
! START'COL =  column number that you wish the editing to begin on.
!
!
!
! ESCAPE    : the escape key gets you out of the VUESCR.SBR editing mode and
!           : returns the string ST with the changes you have made
!
! EXTRA  -   Using START'ROW, START'COL, ROWS, and COLUMNS for your ? TAB
!            Statements makes movement of the editing area easier than changing
!            everything. I.E. try changing the value of START'ROW to 5 and
!            START'COL to 8 and everything moves accordingly
!
!
! WINDOW.SBR by James A. Jarboe IV draws an alternate set graphics window
! according to dimensions
!
!       XCALL WINDOW, START'ROW, START'COL, COLUMNS, ROWS
!
!       START'ROW   = Row number you want corner of window to start on
!       START'COL   = Column number you want left vertical side to be on
!       COL'LONG    = number of columns wide you want window to be
!       ROW'LONG    = number of rows deep you want window to be


MAP1 ST                 ! make string length as long as you want
   MAP2 ARRAY(22),X,77 ! easier way to get at ST
                       ! this string is 256 bytes long
MAP1 ROWS,F,6,20        ! maximum number of rows you want to have
MAP1 COLUMNS,F,6,77     ! maximum number of columns per row that you want
MAP1 START'ROW,F,6,1    ! what screen row you want to start display at-1
MAP1 START'COL,F,6,1    ! what screen col you want to start display at-1
MAP1 COL'LONG,F
MAP1 ROW'LONG,F


CLEAR'SCREEN:
       ? tab(-1,0);

? TAB(1,1);"123456789*123456789*123456789*123456789*123456789*123456789*123456789*123456789*";
       FOR A=1 TO 24
               I=I+1
               IF I=10 THEN I=0
               ? TAB(A,1);STR(I);
       NEXT A
       XCALL WINDOW,2,2,78,23
DEMO:
       FOR A=3 TO 23
       ? TAB(A,3);SPACE$(76);
       NEXT A
       ? TAB(3,20);"VUESCR.SBR Demonstration Program"
       ? tab(5,10);"Enter the number of screen ROWS to edit ";
       INPUT "",ROWS
       ? TAB(6,10);"Enter the number of screen COLUMNS to edit ";
       INPUT "",COLUMNS
       ? TAB(7,10);"Enter the ROW to start editing on ";
       INPUT "",START'ROW
       ? TAB(8,10);"Enter the COLUMN to start editing on ";
       INPUT "",START'COL
       IF ROWS<22 AND COLUMNS<77 AND START'ROW>2 AND START'COL>2       &
               AND START'ROW<23 AND START'COL<77 THEN GOTO VUE
       IF ROWS>21 THEN ? TAB(10,3);"That many ROWS will upset the display"
       IF COLUMNS > 76 THEN ? TAB(11,3);"That many COLUMNS will upset the display"
       IF START'ROW<3 THEN ? TAB(12,3);"Starting on that ROW will upset the display"
       IF START'COL<3 THEN ? TAB(13,3);"Starting on tha COLUMN will upset the display"
       ? TAB(15,3);"Enter a Carriage Return to Try Again ";:INPUT "",A$
       GOTO DEMO
! here it is the infamous VUESCR.SBR
VUE:
 XCALL WINDOW, START'ROW-1,START'COL-1,COLUMNS+2,ROWS+2
 XCALL VUESCR, ST,ROWS,COLUMNS,START'ROW,START'COL


DO'AGAIN:

       ? TAB(22,3);
       INPUT "Would you like to try again  ?",Y$
       ? tab(22,3);"                               ";
       IF UCS(Y$[1;1])="Y" THEN GOTO DEMO
       ? TAB(-1,0);"Hope this helps someone !!!!"
END