SP_SATTPICK

SATTPICK()

  Short:
  ------
  SATTPICK() Sets up SuperLib color vars by selecting from DBF

  Returns:
  --------
  Nil

  Syntax:
  -------
  SATTPICK()

  Description:
  ------------
  This sets up the system color and interface variables
  described in SLS_*() by allowing a picklist of them from the
  colors dbf defined in SLSF_COLOR().

  Examples:
  ---------
   SATTPICK()

  Notes:
  -------
  SATTPUT() and SETCOLORS() allow storage of color sets
  to disk. SETCOLORS() makes use of SATTPICK().

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

 

SP_SATTMONO

()

  Short:
  ------
  SATTMONO() Sets up color vars for mono monitor

  Returns:
  --------
  Nil

  Syntax:
  -------
  SATTMONO()

  Description:
  ------------
  This sets up the system color and interface variables
  described in SLS_*() for MONOCHROME monitor defaults.

  Examples:
  ---------
   IF ISCOLOR()
     SATTCOLOR()
   ELSE
     SATTMONO()
   ENDIF

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

 

SP_SATTGETMEM

SATTGETMEM()

  Short:
  ------
  SATTGETMEM() Sets up SuperLib color vars from old COLORS.MEM

  Returns:
  --------
  Nil

  Syntax:
  -------
  SATTGETMEM(cFileName)

  Description:
  ------------
  This sets up the system color and interface variables
  described in SLS_*() by restoring from an old stype COLORS.MEM

  <cFileName> is the name (and path) of the file.

  The COLORS.MEM vars are NOT made public.

  Examples:
  ---------
   SATTGETMEM("COLORS.MEM")
    // GRAB FROM OLD COLORS.MEM

   SATTPUT("OLD COLORS.MEM SETTINGS")
   // store them in COLORS.DBF

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

 

SP_SATTGET

SATTGET()

  Short:
  ------
  SATTGET() Sets up SuperLib color vars from COLORS.DBF

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

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

  Description:
  ------------
  This sets up the system color and interface variables
  described in SLS_*() by grabbing them from the COLORS.DBF file, as
  described in 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")

  Notes:
  -------
  SATTPUT() and SETCOLORS() allow store of color sets.

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

 

SP_SATTDIRECT

SATTDIRECT()

  Short:
  ------
  SATTDIRECT() Sets up the the color vars directly

  Returns:
  --------
  Nil

  Syntax:
  -------
  SATTDIRECT([cNormCol],[cNormMenu],[cPopCol],[cPopMenu],[cFrame],;
        [nShadAtt],[nShadPos],[lExplode])

  Description:
  ------------
  This sets up the system color and interface variables
  described in SLS_*() all in one shot, rather than with individual
  calls.

  Examples:
  ---------
   To restore from an old COLORS.MEM:

   restore from colors.mem additive
   SATTDIRECT(c_normcol,c_normmenu,c_popcol , ;
                  c_popmenu,c_frame,c_shadatt,;
                         c_shadpos, c_xplode)

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

 

SP_SATTCOLOR

SATTCOLOR()

  Short:
  ------
  SATTCOLOR() Sets up color vars for color monitor

  Returns:
  --------
  Nil

  Syntax:
  -------
  SATTCOLOR()

  Description:
  ------------
  This sets up the system color and interface variables
  described in SLS_*() for color monitor defaults.

  If  COLORS.DBF is present, the color set named
  "DEFAULT" is retrieved, otherwise a default set is used.

  Examples:
  ---------
   IF ISCOLOR()
     SATTCOLOR()
   ELSE
     SATTMONO()
   ENDIF

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

 

SP_SAPPOINT

SAPPOINT()

  Short:
  ------
  SAPPOINT() Appointments manager - uses popup calendar.

  Returns:
  --------
  nil

  Syntax:
  -------
  SAPPOINT()

  Description:
  ------------
  Presents a menu driven appointment manager, including
  the ability to print the day's appointments.

  Examples:
  ---------
   SAPPOINT()

  Notes:
  -------
  see SLSF_APPOINT() for setting the default
  APPOINTMENTS dbf to another location/name. Default is "APPOINT".

  Source:
  -------
  S_APPT.PRG

 

SP_SADD_REC

SADD_REC()

  Short:
  ------
  SADD_REC() Attempts to append a blank record

  Returns:
  --------
  <lSuccess> => success

  Syntax:
  -------
  SADD_REC([nTries],[lAskMore],[cAskMessage])

  Description:
  ------------
  Attempts to append a blank record. Tries [nTries]
  times and then allows user to retry or not if [lAskMore] by
  giving message [cAskMessage] and asking YES/NO.

  Examples:
  ---------
   IF SADD_REC(5,.T.,"Unable to ADD,Try again?")

       IF SREC_LOCK(5,.T.,"Unable to lock, Try again?")
         REPLACE XXX WITH YYY, ZZZ WITH BBB
         UNLOCK
       ENDIF
   ENDIF

  Source:
  -------
  S_SADDR.PRG

 

SP_SACHOICE

SACHOICE()

  Short:
  ------
  SACHOICE() Achoice replacement, uses TBROWSE, codeblock

  Returns:
  --------
  <nSelection> => selection, 0 if none

  Syntax:
  -------
  SACHOICE(nTop,nLeft,nBottom,nRight,aOptions,[bKeyBlock],[nStart],[@nRow],;
           [nMRow, nMCol],[bMouse])

  Description:
  ------------
  This semi-replaces ACHOICE() by using TBROWSE
  instead, and by accepting an exception codeblock instead of a user
  defined function.

  <nTop,nLeft,nBottom,nRight> are the dimensions.

  <aOptions> is the array. It need not be of type
  Character.

  First-letter presses go to the next matching letter
  of the next character-type element.
  Up/down/home/end/pageup/pagedown are used to position the
  cursor. ENTER returns the current selection. Escape returns 0.

  The screen is not saved and restored. This is a
  building block function, like ACHOICE(), so save and restore the
  screen, draw a box around it, etc, as you would ACHOICE().

  [bKeyBlock] a codeblock which will be executed if an
  exception key is received (any key not otherwise meaningful). The
  codeblock will be evaluated and will be passed:

           1. current element #
           2. exception key value
           3. the tbrowse object

  as parameters.

  [nStart] is an optional starting element. Default is 1.
  [@nRow] is an optional starting row. Default is 1. Pass by reference
  to retain value between calls.

  [nMRow, nMCol]  (new in 3.5) Directs sachoice() to draw
  the "[.][.]" for mouse up/down at nMrow, nMCol, and to be aware of mouse
  clicks on these buttons. (the screen under the arrows is saved/restored)

  [bMouse] is a codeblock to evaluate mouse clicks other than those
  meaningful to sachoice(). The codeblock is evaluated as follows:
            eval(bMouse,mouserow, mousecolumn)

  Examples:
  ---------
   USE CUSTOMER

   aFlds       := afieldsx()
   bExcept     := {|e,k|msg("You pressed ",str(k))}
   ?SACHOICE(10,10,20,12,aFlds,bExcept)

   //to retain element and position between calls
   nSelect := 1
   nRow    := 1
   aMeals   := {"Pizza","Chicken","Chinese"}
   while nSelect > 0
     nSelect  := sachoice(10,10,20,20,aMeals,nil,nSelect,@nRow)
     // code
   endif

  Notes:
  -------
  This will be a lot easier to mouse-ize than ACHOICE.
  (or is that RAT-ify..)

  Source:
  -------
  S_ACHOI.PRG

 

SP_S1LABEL

S1LABEL()

  Short:
  ------
  S1LABEL() Prints a single label

  Returns:
  --------
  Nothing

  Syntax:
  -------
  S1LABEL(cLblfile)

  Description:
  ------------
  Prints a single label (1 or more copies) for the
  current record, based on the dimensions and contents definitions in
  .LBL file name <cLblfile>. The dimensions and contents are
  figured, and then presented for printing and/or editing.

  Examples:
  ---------
   setkey(K_F10,{||S1LABEL("MAILING.LBL")} )
                      // sets key F10 to call this
                     // as a popup

  Source:
  -------
  S_1LABEL.PRG