SP_SBROWS

SBROWS()

  Short:
  ------
  SBROWS() Determine number of rows in a box

  Returns:
  --------
  <nRows> => rows in the box

  Syntax:
  -------
  SBROWS(nTop,nBottom,[lIncludeFrame])

  Description:
  ------------
  The number of rows of a box with top of <nTop> and
  bottom of <nBottom> is returned. By default, the frame is
  included (the top and the bottom)

  [lIncludeFrame] by default is True - and all rows are
  counted. If passed as False, only the inside rows are counted.

  Examples:
  ---------
   nRows := SBROWS(nTop,nBottom,.f.)
   for i = nTop to nRows
     @nTop+i,nLeft say i
   next

  Source:
  -------
  S_BOXES.PRG

 

SP_SBREADER

SBREADER()

  Short:
  ------
  SBREADER() Creates specialized spacebar spinner get reader
  block

  Returns:
  --------
  <bReader> => get reader block for GET

  Syntax:
  -------
  SBREADER(aValues)

  Description:
  ------------
  Creates a get reader block that allows space bar to
  rotate values from an array into the current get.

  Implement by using the SEND keyword for your
  @Say..Get.. statements.

  i.e. @10,10 say blah get blahblah SEND ;
                      reader:=SBREADER(aValues)

  <aValues> is an array of values that are of the same
  type and length as the GET.

  Examples:
  ---------
   // while in the get V1, you will be able to use the spacebar to
   // rotate values from the array

   aValues := {"Section 1","Section 2","Section 3"}
   v1 := "Section 1"
   @10,10 get v1 send reader := sbreader(aValues)
   READ

  Source:
  -------
  S_READRS.PRG

 

SP_SBCOLS

SBCOLS()

  Short:
  ------
  SBCOLS() Determine number of columns in a box

  Returns:
  --------
  <nCols> => columns in the box

  Syntax:
  -------
  SBCOLS(nLeft,nRight,[lIncludeFrame])

  Description:
  ------------
  The number of columns of a box with left of <nLeft>
  and right of <nRight> is returned. By default, the frame is
  included (the left and the right)

  [lIncludeFrame] by default is True - and all columns
  are counted. If passed as False, only the inside columns are
  counted.

  Examples:
  ---------
   // this example fills a box with "X"'s

   nRows := SBROWS(nTop,nBottom,.f.)
   nCols := SBCOLS(nLeft,nRight,.f.)
   for i = nTop to nRows
     @nTop+i,nLeft say repl("X",nCols)
   next

  Source:
  -------
  S_BOXES.PRG

 

SP_SBCENTER

SBCENTER()

  Short:
  ------
  SBCENTER() Centers box coordinates

  Returns:
  --------
  Nil

  Syntax:
  -------
  SBCENTER(@nTop,@nLeft,@nBottom,@nRight)

  Description:
  ------------
  Dimensions nTop,nLeft,nBottom,nRight are passed by
  reference.

  They are changed by SBCENTER to dimensions that are
  centered on the screen.

  Examples:
  ---------

   nTop    := 0
   nLeft   := 0
   nBottom := nRows+2
   nRight  := nMaxwidth+2

   SBCENTER(@nTop,@nLeft,@nBottom,@nRight)
                  // center the coordinates

   cBox := makebox(nTop,nLeft,nBottom,nRight)

  Source:
  -------
  S_BOXES.PRG

 

SP_SAVESETKEYS

SAVESETKEYS()

  Short:
  ------
  SAVESETKEYS() Saves active set keys to an array

  Returns:
  --------
  <aSaved> => setkey setting saved to an array

  Syntax:
  -------
  SAVESETKEYS([lClear])

  Description:
  ------------
  Saves the inkey codes and codeblocks associated with
  all active setkeys to an array.

  [lClear] If True, clear any active setkeys (set to NIL)

  Examples:
  ---------
   aSaved := SAVESETKEYS(.t.)

   * do stuff

   RESTSETKEYS(aSaved)

  Source:
  -------
  S_SETKEY.PRG

 

SP_SATTPUT

SATTPUT()

  Short:
  ------
  SATTPUT() Stores current SuperLib color vars to COLORS.DBF

  Returns:
  --------
  <lSuccess> => Success, True of False

  Syntax:
  -------
  SATTPUT([cSetName])

  Description:
  ------------
  This stores the system color and interface variables
  described in SLS_*() in the colors dbf defined by SLSF_COLOR().

  [cSetName] is an optional name of a previously saved
  color set.

  If none is passed, the color set named "DEFAULT" is
  used.

  Examples:
  ---------
   SATTGET("THE BLUE SET")        // restore a previous definition
   SLS_POPCOL("+GR/N,+W/R,,,W/R")
                              // changes the sls_popcol() setting
   SATTPUT("THE BLUE SET # 2")    // stores the revised set in the dbf

  Notes:
  -------
  SETCOLORS() also allows storage of color sets.

  SATTPUT() attempts to re-used deleted records.

  Source:
  -------
  S_CLRFUN.PRG

 

SP_SATTPUSH

SATTPUSH()

  Short:
  ------
  SATTPUSH() Pushes the current SuperLib color vars

  Returns:
  --------
  Nil

  Syntax:
  -------
  SATTPUSH()

  Description:
  ------------
  This pushes the current system color and interface
  variables described in SLS_*() onto a stack, for later retrieval
  with SATTPOP().

  Examples:
  ---------
   SATTPUSH()
   SATTGET("THE BLUE SET")
   //...some code
   SATTPOP()  // restore the prior color set

  Source:
  -------
  S_CLRFUN.PRG