home *** CD-ROM | disk | FTP | other *** search
/ C!T ROM 2 / ctrom_ii_b.zip / ctrom_ii_b / PROGRAM / CLIPPER / NFPAT6 / MENUTO.PRG < prev    next >
Text File  |  1993-01-12  |  21KB  |  605 lines

  1. /*
  2.  * File......: MENUTO.PRG
  3.  * Author....: Ted Means
  4.  * Date......: $Date:   12 Jan 1993 08:57:08  $
  5.  * Revision..: $Revision:   1.6  $
  6.  * Log file..: $Logfile:   C:/nanfor/src/menuto.prv  $
  7.  * 
  8.  * This is an original work by Ted Means and is placed in the
  9.  * public domain.
  10.  *
  11.  * Modification history:
  12.  * ---------------------
  13.  *
  14.  * $Log:   C:/nanfor/src/menuto.prv  $
  15.  * 
  16.  *    Rev 1.6   12 Jan 1993 08:57:08   GLENN
  17.  * Ted fixed a bug in which an array bounds error could occur if you
  18.  * used nested submenus.
  19.  * 
  20.  *    Rev 1.5   16 Oct 1992 00:20:28   GLENN
  21.  * Cleaned up documentation header.
  22.  * 
  23.  *    Rev 1.4   16 Oct 1992 00:08:44   GLENN
  24.  * Just making sure we had Ted's latest revision.
  25.  * 
  26.  *    Rev 1.3   13 Oct 1992 20:45:46   GLENN
  27.  * Complete rewrite by Ted Means, dumping assembler version for a
  28.  * Clipper version.
  29.  * 
  30.  *    Rev 1.2   15 Aug 1991 23:03:54   GLENN
  31.  * Forest Belt proofread/edited/cleaned up doc
  32.  * 
  33.  *    Rev 1.1   14 Jun 1991 19:52:16   GLENN
  34.  * Minor edit to file header
  35.  * 
  36.  *    Rev 1.0   01 Apr 1991 01:01:42   GLENN
  37.  * Nanforum Toolkit
  38.  *
  39.  */
  40.  
  41. /*  $DOC$
  42.  *  $FUNCNAME$
  43.  *     FT_Prompt()
  44.  *  $CATEGORY$
  45.  *     Menus/Prompts
  46.  *  $ONELINER$
  47.  *     Define a menu item for use with FT_MenuTo()
  48.  *  $SYNTAX$
  49.  *     #include "FTMENUTO.CH"
  50.  *
  51.  *     @ <nRow>, <nCol> PROMPT <cPrompt>                     ;
  52.  *                      [COLOR <cColor>]                     ;
  53.  *                      [MESSAGE <cMessage>]                 ;
  54.  *                      [MSGROW <nMsgRow>]                   ;
  55.  *                      [MSGCOL <nMsgCol>]                   ;
  56.  *                      [MSGCOLOR <cMsgColor>]               ;
  57.  *                      [TRIGGER <nTrigger>]                 ;
  58.  *                      [TRIGGERCOLOR <cTriggerColor>]       ;
  59.  *                      [HOME <nHome>]                       ;
  60.  *                      [END <nEnd>]                         ;
  61.  *                      [UP <nUp>]                           ;
  62.  *                      [DOWN <nDown>]                       ;
  63.  *                      [LEFT <nLeft>]                       ;
  64.  *                      [RIGHT <nRight>]                     ;
  65.  *                      [EXECUTE <bExec>]                    ;
  66.  *
  67.  *  $ARGUMENTS$
  68.  *     <nRow> is the row at which the prompt is to appear.
  69.  *
  70.  *     <nCol> is the column at which the prompt will appear.
  71.  *
  72.  *     <cPrompt> is the menu item string.
  73.  *
  74.  *     <cColor> is optional and is the color attribute of the prompt.  Note
  75.  *     that two colors are required; one for the standard setting and one
  76.  *     for the enhanced setting (i.e. the light bar color).  See the example
  77.  *     below if this isn't clear.  If <cColor> is not specified then the
  78.  *     current SetColor() value is used by default.
  79.  *
  80.  *     <cMessage> is optional and is the message associated with the
  81.  *     prompt. If not specified, then no message will be displayed.
  82.  *
  83.  *     <nMsgRow> is optional and is the row at which the message, if any,
  84.  *     will appear.  If not specified, the default is the current setting
  85.  *     of the SET MESSAGE TO command.
  86.  *
  87.  *     <nMsgCol> is optional and is the column at which the message, if
  88.  *     any, will appear.  If not specified, the default is either zero or
  89.  *     centered, depending on the current setting of the CENTER option of
  90.  *     the SET MESSAGE TO command.
  91.  *
  92.  *     <cMsgColor> is optional and is the color attribute of the message.
  93.  *     If not specified, the default is the same as the prompt color.
  94.  *
  95.  *     <nTrigger> is optional and is the position within the prompt string
  96.  *     where the trigger character is located.  If not specified, the
  97.  *     default is one.
  98.  *
  99.  *     <cTriggerColor> is optional and is the color attribute of the trigger
  100.  *     character.  Note that two colors are required; one for the standard
  101.  *     setting and one for the enhanced setting (i.e. the light bar color).
  102.  *     See the example below if this isn't clear.  If <cTriggerColor> is not
  103.  *     specified then the default is the same color as the rest of the
  104.  *     prompt.
  105.  *
  106.  *     <nHome> is optional and specifies which prompt becomes active
  107.  *     when the home key is pressed.  If not specified, the default is
  108.  *     the first prompt.
  109.  *
  110.  *     <nEnd> is optional and specifies which prompt becomes active
  111.  *     when the end key is pressed.  If not specified, the default is
  112.  *     the last prompt.
  113.  *
  114.  *     <nUp> is optional and specifies which prompt becomes active
  115.  *     when the up arrow key is pressed.  If not specified, the
  116.  *     default is the previous prompt.  The current setting of SET
  117.  *     WRAP TO is obeyed.
  118.  *
  119.  *     <nDown> is optional and specifies which prompt becomes
  120.  *     active when the down arrow key is pressed.  If not
  121.  *     specified, the default is the next prompt.  The current
  122.  *     setting of SET WRAP TO is obeyed.
  123.  *
  124.  *     <nRight> is optional and specifies which prompt becomes
  125.  *     active when the right arrow key is pressed.  If not
  126.  *     specified, the default is the next prompt.  The current
  127.  *     setting of SET WRAP TO is obeyed.
  128.  *
  129.  *     <nLeft> is optional and specifies which prompt becomes
  130.  *     active when the left arrow is pressed.  If not specified,
  131.  *     the default is the previous prompt.  The current setting of
  132.  *     SET WRAP TO is obeyed.
  133.  *
  134.  *     <bExec> is optional and is a code block to evaluate whenever
  135.  *     the menu item to which it belongs is selected.
  136.  *  $DESCRIPTION$
  137.  *     Clipper's @...PROMPT and MENU TO commands are fine as far as
  138.  *     they go.  But many times you need more flexibility.  As
  139.  *     you'll no doubt notice if you read the argument list, this
  140.  *     function is almost completely flexible. You can adjust
  141.  *     locations and colors for every part of the prompt and its
  142.  *     associated message.  In addition, since you can control the
  143.  *     effect of the arrow keys, you can allow both horizontal and
  144.  *     vertical movement, or even disable certain arrow keys if you
  145.  *     so desire.  Support for nested menus is also available, since
  146.  *     the prompts are stored in stack-based static arrays.
  147.  *
  148.  *     Note that this command can also be called using function-style
  149.  *     syntax.  See the entry for FT_PROMPT() for further details.
  150.  *
  151.  *     This enhanced version of @...PROMPT requires the inclusion of
  152.  *     the header file FTMENUTO.CH in any source file that uses it.
  153.  *     It is may be used in place of the standard Clipper @...PROMPT
  154.  *     command.  However, in the interests of functionality it is NOT
  155.  *     100% compatible.  No whining!  If compatibility is such a big
  156.  *     deal then use the standard Clipper commands.
  157.  *
  158.  *  $EXAMPLES$
  159.  *    #include "FTMENUTO.CH"
  160.  *
  161.  *    // Simple prompt
  162.  *    @ 1, 1 PROMPT "Menu choice #1"
  163.  *
  164.  *    // Prompt with color
  165.  *    @ 3, 1 PROMPT "Menu choice #2" COLOR "W+/R,W+/B"
  166.  *
  167.  *    // Prompt with a message
  168.  *    @ 5, 1 PROMPT "Menu choice #3" MESSAGE "Go to lunch"
  169.  *
  170.  *    // Prompt with pinpoint message control
  171.  *    @ 7, 1 PROMPT "Menu choice #4" MESSAGE "Drop Dead" ;
  172.  *                   MSGROW 22 MSGCOL 4 MSGCOLOR "GR+/N"
  173.  *
  174.  *    // Prompt with a trigger character ("#" character)
  175.  *    @11, 1 PROMPT "Menu choice #6" TRIGGER 13
  176.  *
  177.  *    // Prompt with trigger character color control
  178.  *    @13, 1 PROMPT "Menu Choice #7" TRIGGER 13 TRIGGERCOLOR "R+/BG,G+/N"
  179.  *
  180.  *    // Prompt with right and left arrow keys disabled
  181.  *    @15, 1 PROMPT "Menu Choice #8" RIGHT 8 LEFT 8
  182.  *  $INCLUDE$
  183.  *     FTMENUTO.CH
  184.  *  $SEEALSO$
  185.  *   
  186.  *  $END$
  187.  */
  188.  
  189. #include "SETCURS.CH"
  190. #include "INKEY.CH"
  191.  
  192. #xcommand if <true> then <action> => ;
  193.           if <true> ; <action> ; end
  194.  
  195. #xtranslate display( <row>, <col>, <stuff>, <color> ) => ;
  196.             setpos( <row>, <col> ) ; dispout( <stuff>, <color> )
  197.  
  198. #xtranslate EnhColor( <colorspec> ) => ;
  199.             substr( <colorspec>, at( ",", <colorspec> ) + 1 )
  200.  
  201. #xtranslate isOkay( <exp> ) => ;
  202.             ( <exp> \> 0 .and. <exp> \<= nCount )
  203.  
  204. #xtranslate isBetween( <val>, <lower>, <upper> ) => ;
  205.             ( <val> \>= <lower> .and. <val> \<= <upper> )
  206.  
  207. #define nTriggerInkey asc( upper( substr( cPrompt, nTrigger, 1 ) ) )
  208. #define cTrigger substr( cPrompt, nTrigger, 1 )
  209. #define nCurrent nMenu,nActive
  210. #define nLast nMenu,nPrev
  211.  
  212. // These arrays hold information about each menu item
  213.  
  214. static aRow          := {{}}
  215. static aCol          := {{}}
  216. static aPrompt       := {{}}
  217. static aColor        := {{}}
  218. static aMsgRow       := {{}}
  219. static aMsgCol       := {{}}
  220. static aMessage      := {{}}
  221. static aMsgColor     := {{}}
  222. static aTrigger      := {{}}
  223. static aTriggerInkey := {{}}
  224. static aTriggerColor := {{}}
  225. static aHome         := {{}}
  226. static aEnd          := {{}}
  227. static aUp           := {{}}
  228. static aDown         := {{}}
  229. static aLeft         := {{}}
  230. static aRight        := {{}}
  231. static aExecute      := {{}}
  232. static nLevel        := 1
  233.  
  234. function FT_Prompt( nRow,    nCol,    cPrompt,  cColor,      ;
  235.                     nMsgRow, nMsgCol, cMessage, cMsgColor,   ;
  236.                     nTrigger, cTriggerColor, nHome, nEnd,    ;
  237.                     nUp, nDown, nLeft, nRight, bExecute      )
  238.  
  239. // If the prompt color setting is not specified, use default
  240.  
  241. if cColor  == NIL then cColor  := setcolor()
  242.  
  243. // If no message is supplied, set message values to NIL
  244.  
  245. if cMessage == NIL
  246.  
  247.    nMsgRow := nMsgCol := cMsgColor := NIL
  248.  
  249. else
  250.  
  251.    // If message row not supplied, use the default
  252.  
  253.    if nMsgRow == NIL then nMsgRow := set( _SET_MESSAGE )
  254.  
  255.    // If message column not supplied, use the default
  256.  
  257.    if nMsgCol == NIL
  258.       if set( _SET_MCENTER )
  259.          nMsgCol := int( ( maxcol() + 1 - len( cPrompt ) ) / 2 )
  260.       else
  261.          nMsgCol := 0
  262.       endif
  263.    endif
  264.  
  265.    // If message color not specified, use the default
  266.  
  267.    if cMsgColor == NIL then cMsgColor := cColor
  268. endif
  269.  
  270. // If trigger values not specifed, set the defaults
  271.  
  272. if nTrigger       == NIL then nTrigger      := 1
  273. if cTriggerColor  == NIL then cTriggerColor := cColor
  274.  
  275. // Now add elements to the static arrays -- nLevel indicates the recursion
  276. // level, which allows for nested menus.
  277.  
  278. aadd(          aRow[ nLevel ], nRow          )
  279. aadd(          aCol[ nLevel ], nCol          )
  280. aadd(       aPrompt[ nLevel ], cPrompt       )
  281. aadd(        aColor[ nLevel ], cColor        )
  282. aadd(       aMsgRow[ nLevel ], nMsgRow       )
  283. aadd(       aMsgCol[ nLevel ], nMsgCol       )
  284. aadd(      aMessage[ nLevel ], cMessage      )
  285. aadd(     aMsgColor[ nLevel ], cMsgColor     )
  286. aadd(      aTrigger[ nLevel ], nTrigger      )
  287. aadd( aTriggerInkey[ nLevel ], nTriggerInkey )
  288. aadd( aTriggerColor[ nLevel ], cTriggerColor )
  289. aadd(         aHome[ nLevel ], nHome         )
  290. aadd(          aEnd[ nLevel ], nEnd          )
  291. aadd(           aUp[ nLevel ], nUp           )
  292. aadd(         aDown[ nLevel ], nDown         )
  293. aadd(         aLeft[ nLevel ], nLeft         )
  294. aadd(        aRight[ nLevel ], nRight        )
  295. aadd(      aExecute[ nLevel ], bExecute      )
  296.  
  297. // Now display the prompt for the sake of compatibility
  298.  
  299. dispbegin()
  300. display( nRow, nCol, cPrompt, cColor )
  301. display( nRow, nCol - 1 + nTrigger, cTrigger, cTriggerColor )
  302. dispend()
  303.  
  304. return NIL
  305.  
  306.  
  307.  
  308. /*  $DOC$
  309.  *  $FUNCNAME$
  310.  *     FT_MenuTo()
  311.  *  $CATEGORY$
  312.  *     Menus/Prompts
  313.  *  $ONELINER$
  314.  *     Execute light bar menu using prompts created with @...PROMPT
  315.  *  $SYNTAX$
  316.  *     #include "FTMENUTO.CH"
  317.  *
  318.  *     MENU TO <var> [COLD]
  319.  *  $ARGUMENTS$
  320.  *     <var> is the name of the variable to which the result of the menu
  321.  *     selection should be assigned.
  322.  *
  323.  *     [COLD] is optional and if specified indicates that trigger characters
  324.  *     should be treated as "cold," i.e. rather than causing the menu item
  325.  *     to be selected it only causes the light bar to move to that selection.
  326.  *  $DESCRIPTION$
  327.  *     This enhanced version of MENU TO requires the inclusion of the header
  328.  *     file FTMENUTO.CH in any source file that uses it.  It may be used in
  329.  *     place of the standard Clipper MENU TO command.  However, in the
  330.  *     interests of functionality it is NOT 100% compatible (in particular,
  331.  *     you should make sure that the target memvar exists before executing
  332.  *     the menu -- the Clipper version will create a PRIVATE memvar for you
  333.  *     if it does not already exist, but this version does not).  No whining!
  334.  *     If compatibility is such a big deal then use the standard Clipper
  335.  *     command.
  336.  *
  337.  *     Note that this command can also be called using function-style
  338.  *     syntax.  See the entry for FT_MENUTO() for further details.
  339.  *  $EXAMPLES$
  340.  *    #include "FTMENUTO.CH"
  341.  *
  342.  *    // Simple command
  343.  *
  344.  *    MENU TO memvar
  345.  *
  346.  *  $INCLUDE$
  347.  *    FTMENUTO.CH
  348.  *  $SEEALSO$
  349.  *    "@...PROMPT"
  350.  *  $END$
  351.  */
  352.  
  353. function FT_MenuTo( bGetSet, cReadVar, lCold )
  354.  
  355. local nMenu   := nLevel++
  356. local nActive := 1
  357. local nCount  := len( aRow[ nMenu ] )
  358. local lChoice := .F.
  359. local nCursor := set( _SET_CURSOR,SC_NONE )
  360. local nKey,bKey,nScan,lWrap,cScreen,nPrev
  361.  
  362. // Validate the incoming parameters and assign some reasonable defaults
  363. // to prevent a crash later.
  364.  
  365. cReadVar := iif( cReadVar == NIL, "", upper( cReadVar ) )
  366.  
  367. if bGetSet == NIL then bGetSet := {|| 1}
  368.  
  369. // Eval the incoming getset block to initialize nActive, which indicates
  370. // the menu prompt which is to be active when the menu is first displayed.
  371. // If nActive is outside the appropriate limits, a value of 1 is assigned.
  372.  
  373. nActive := eval( bGetSet )
  374.  
  375. if ( nActive < 1 .or. nActive > nCount ) then nActive := 1
  376.  
  377. // Increment the recursion level in case a hotkey procedure
  378. // calls FT_Prompt().  This will cause a new set of prompts
  379. // to be created without disturbing the current set.
  380.  
  381. aadd(          aRow, {} ) 
  382. aadd(          aCol, {} )
  383. aadd(       aPrompt, {} )
  384. aadd(        aColor, {} )
  385. aadd(       aMsgRow, {} )
  386. aadd(       aMsgCol, {} )
  387. aadd(      aMessage, {} )
  388. aadd(     aMsgColor, {} )
  389. aadd(      aTrigger, {} )
  390. aadd( aTriggerInkey, {} )
  391. aadd( aTriggerColor, {} )
  392. aadd(         aHome, {} )
  393. aadd(          aEnd, {} )
  394. aadd(           aUp, {} )
  395. aadd(         aDown, {} )
  396. aadd(         aLeft, {} )
  397. aadd(        aRight, {} )
  398. aadd(      aExecute, {} )
  399.  
  400. // Loop until Enter or Esc is pressed
  401.  
  402. while .not. lChoice
  403.    
  404.    // Evaluate the getset block to update the target memory variable
  405.    // in case it needs to be examined by a hotkey procedure.
  406.  
  407.    eval( bGetSet,nActive )
  408.  
  409.    // Get the current setting of SET WRAP so that the desired menu behavior
  410.    // can be implemented.
  411.  
  412.    lWrap := set( _SET_WRAP )
  413.  
  414.    // If a message is to be displayed, save the current screen contents
  415.    // and then display the message, otherwise set the screen buffer to NIL.
  416.  
  417.    dispbegin()
  418.  
  419.    if aMessage[ nCurrent ] != NIL
  420.       cScreen := savescreen( aMsgRow[ nCurrent ], aMsgCol[ nCurrent ],  ;
  421.                              aMsgRow[ nCurrent ], aMsgCol[ nCurrent ] + ;
  422.                        len( aMessage[ nCurrent ] ) - 1 )
  423.  
  424.       display( aMsgRow[ nCurrent ],   aMsgCol[ nCurrent ], ;
  425.               aMessage[ nCurrent ], aMsgColor[ nCurrent ]  )
  426.  
  427.    else
  428.       cScreen := NIL
  429.    endif
  430.  
  431.    // Display the prompt using the designated colors for the prompt and
  432.    // the trigger character.
  433.  
  434.    display( aRow[ nCurrent ], aCol[ nCurrent ], ;
  435.          aPrompt[ nCurrent ], EnhColor( aColor[ nCurrent ] ) )
  436.  
  437.    display( aRow[ nCurrent ], ;
  438.             aCol[ nCurrent ] - 1 + aTrigger[ nCurrent ], ;
  439.             substr( aPrompt[ nCurrent ], aTrigger[ nCurrent ], 1 ), ;
  440.             EnhColor( aTriggerColor[ nCurrent ] ) )
  441.  
  442.    dispend()
  443.  
  444.    // Wait for a keystroke
  445.  
  446.    nKey := inkey( 0 )
  447.  
  448.    // If the key was an alphabetic char, convert to uppercase
  449.  
  450.    if isBetween( nKey,97,122 ) then nKey -= 32
  451.  
  452.    // Set nPrev to the currently active menu item
  453.  
  454.    nPrev := nActive
  455.  
  456.    do case
  457.  
  458.       // Check for a hotkey, and evaluate the associated block if present.
  459.  
  460.       case ( bKey := setkey( nKey ) ) != NIL
  461.          eval( bKey, ProcName( 1 ), ProcLine( 1 ), cReadVar )
  462.  
  463.       // If Enter was pressed, either exit the menu or evaluate the
  464.       // associated code block.
  465.  
  466.       case nKey == K_ENTER
  467.          if aExecute[ nCurrent ] != NIL
  468.             eval( aExecute[ nCurrent ] )
  469.          else
  470.             lChoice := .T.
  471.          endif   
  472.  
  473.       // If ESC was pressed, set the selected item to zero and exit.
  474.  
  475.       case nKey == K_ESC
  476.          lChoice := .T.
  477.          nActive := 0
  478.  
  479.       // If Home was pressed, go to the designated menu item.
  480.  
  481.       case nKey == K_HOME
  482.          nActive := iif( aHome[ nCurrent ] == NIL, 1, aHome[ nCurrent ] )
  483.  
  484.       // If End was pressed, go to the designated menu item.
  485.  
  486.       case nKey == K_END
  487.          nActive := iif( aEnd[ nCurrent ] == NIL, nCount, aEnd[ nCurrent ] )
  488.  
  489.       // If Up Arrow was pressed, go to the designated menu item.
  490.  
  491.       case nKey == K_UP
  492.          if aUp[ nCurrent ] == NIL
  493.             if --nActive < 1 then nActive := iif( lWrap, nCount, 1 )
  494.          else
  495.             if isOkay( aUp[ nCurrent ] ) then nActive := aUp[ nCurrent ]
  496.          endif
  497.  
  498.       // If Down Arrow was pressed, go to the designated menu item.
  499.  
  500.       case nKey == K_DOWN
  501.          if aDown[ nCurrent ] == NIL
  502.             if ++nActive > nCount then nActive := iif( lWrap, 1, nCount )
  503.          else
  504.             if isOkay( aDown[ nCurrent ] ) then nActive := aDown[ nCurrent ]
  505.          endif
  506.  
  507.       // If Left Arrow was pressed, go to the designated menu item.
  508.  
  509.       case nKey == K_LEFT
  510.          if aLeft[ nCurrent ] == NIL
  511.             if --nActive < 1 then nActive := iif( lWrap, nCount, 1 )
  512.          else
  513.             if isOkay( aLeft[ nCurrent ] ) then nActive := aLeft[ nCurrent ]
  514.          endif
  515.  
  516.       // If Right Arrow was pressed, go to the designated menu item.
  517.  
  518.       case nKey == K_RIGHT
  519.          if aRight[ nCurrent ] == NIL
  520.             if ++nActive > nCount then nActive := iif( lWrap, 1, nCount )
  521.          else
  522.             if isOkay( aRight[ nCurrent ] ) then nActive := aRight[ nCurrent ]
  523.          endif
  524.  
  525.       // If a trigger letter was pressed, handle it based on the COLD
  526.       // parameter.
  527.  
  528.       case ( nScan := ascan( aTriggerInkey[ nMenu ], nKey ) ) > 0
  529.          nActive := nScan
  530.          if .not. lCold then FT_PutKey( K_ENTER )
  531.    endcase
  532.  
  533.    // Erase the highlight bar in preparation for the next iteration
  534.  
  535.    if .not. lChoice
  536.       dispbegin()
  537.       display( aRow[ nLast ], aCol[ nLast ], ;
  538.             aPrompt[ nLast ], aColor[ nLast ] )
  539.  
  540.       display( aRow[ nLast ], aCol[ nLast ] - 1 + aTrigger[ nLast ], ;
  541.                substr( aPrompt[ nLast ], aTrigger[ nLast ], 1 ), ;
  542.                aTriggerColor[ nLast ] )
  543.  
  544.       
  545.       if cScreen != NIL then restscreen( aMsgRow[ nLast ], ;
  546.                                          aMsgCol[ nLast ], ;
  547.                                          aMsgRow[ nLast ], ;
  548.                                          aMsgCol[ nLast ]  ;
  549.                                          + len( aMessage[ nLast ] ) - 1, ;
  550.                                          cScreen )
  551.       dispend()
  552.       endif
  553. end
  554.  
  555. // Now that we're exiting, decrement the recursion level and erase all
  556. // the prompt information for the current invocation.
  557.  
  558. nLevel--
  559.  
  560. asize(          aRow, nLevel ) 
  561. asize(          aCol, nLevel )
  562. asize(       aPrompt, nLevel )
  563. asize(        aColor, nLevel )
  564. asize(       aMsgRow, nLevel )
  565. asize(       aMsgCol, nLevel )
  566. asize(      aMessage, nLevel )
  567. asize(     aMsgColor, nLevel )
  568. asize(      aTrigger, nLevel )
  569. asize( aTriggerInkey, nLevel )
  570. asize( aTriggerColor, nLevel )
  571. asize(         aHome, nLevel )
  572. asize(          aEnd, nLevel )
  573. asize(           aUp, nLevel )
  574. asize(         aDown, nLevel )
  575. asize(         aLeft, nLevel )
  576. asize(        aRight, nLevel )
  577. asize(      aExecute, nLevel )
  578.  
  579.          aRow[ nLevel ] := {}
  580.          aCol[ nLevel ] := {}
  581.       aPrompt[ nLevel ] := {}
  582.        aColor[ nLevel ] := {}
  583.       aMsgRow[ nLevel ] := {}
  584.       aMsgCol[ nLevel ] := {}
  585.      aMessage[ nLevel ] := {}
  586.     aMsgColor[ nLevel ] := {}
  587.      aTrigger[ nLevel ] := {}
  588. aTriggerInkey[ nLevel ] := {}
  589. aTriggerColor[ nLevel ] := {}
  590.         aHome[ nLevel ] := {}
  591.          aEnd[ nLevel ] := {}
  592.           aUp[ nLevel ] := {}
  593.         aDown[ nLevel ] := {}
  594.         aLeft[ nLevel ] := {}
  595.        aRight[ nLevel ] := {}
  596.      aExecute[ nLevel ] := {}
  597.  
  598. set( _SET_CURSOR, nCursor )
  599.  
  600. eval( bGetSet, nActive )
  601.  
  602. return nActive
  603.  
  604.  
  605.