home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / progmisc / nfsrc21.zip / MENUTO.PRG < prev    next >
Text File  |  1992-10-16  |  20KB  |  595 lines

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