SP SuperLib Environment Functions

 SETCOLORS()    Interactive color setting interface

 SATTPOP()      Pops previously pushed SuperLib interface variables
 SATTPUSH()     Pushes the current SuperLib interface variables
 SATTPICKPUT()  Stores SuperLib environment variables to COLORS.DBF
                with picklist
 SATTPICKDEL()  Picklist deletion of stored color sets
 SATTPUT()      Stores current SuperLib environment variables to DBF
 SLS_*()        Series of functions for system settings and colors
 SLSF_*()       Series of functions to determine system file names and
                locations
 INITSUP()      Sets SuperLib system interface vars for MONO or COLOR
 SATTDIRECT()   Sets up the the system color and interface settings directly
 SATTGET()      Sets up SuperLib environment variables from COLORS.DBF
 SATTCOLOR()    Sets up the the system color and interface settings
                for color monitor
 SATTPICK()     Sets up SuperLib environment vars by selecting from
                stored definitions
 SATTMONO()     Sets up the the system color and interface settings
                for MONOCHROME monitor
 SATTGETMEM()   Sets up SuperLib environment variables from old
                COLORS.MEM file

SP_SFRR_HCODE

SFRR_HCODE()

  Short:
  ------
  SFRR_HCODE() Output report definition to .PRG code

  Returns:
  --------
  Nothing

  Syntax:
  -------
  SFRR_HCODE()

  Description:
  ------------
  SFRR_HCODE will present you with a menu-driven
  interface to allow selection of output options for a hard-coded
  .PRG file for a given saved report.

  You will be presented options for :
     SOURCE Report Definition and
     OUTPUT .PRG file name (you choose)

  Once these are selected, you may do a translation
  into .PRG code. The .PRG will do all of the setup needed to call
  SFRR_PMAIN() - the main print routine called by both REPORT()
  and QUICKREPORT().

  The .PRG will no longer require the SFREPORT.DBF in
  order to produce the report.

  This has been written as a function, so you may
  incorporate it easily.

  To produce a stand-alone .EXE to generate report
  .PRGs, you could do the following:

     initsup()

     USE SFREPORT

     sfrr_hcode()

  The resulting .PRGs must be called with DO <prgname>
  If you like, you could make them into a function by issuing a
  by issuing a FUNCTION <function name> at the top.

  Examples:
  ---------
   initsup()
   USE SFREPORT
   sfrr_hcode()

  Source:
  -------
  R_HCODE.PRG

 

SP_PROGON

PROGON()

  Short:
  ------
  PROGON() Initialize and display a progress bar box

  Returns:
  --------
  Nil

  Syntax:
  -------
  PROGON([cMessage])

  Description:
  ------------
  Places a progress box on the screen for use by
  PROGDISP()

  [cMessage] is an optional box title

  Examples:
  ---------

   //--------- this just shows progress from 1 - 1000
   initsup()
   ProgOn("Test")
   for i = 1 to 1000
     ProgDisp(i,1000,{||alltrim(str(i))+" of 1000"} )
   next
   ProgOff()

   //-------- this show indexing progress
   use Customer
   ProgOn("Index")
   dbcreateindex("Eraseme","(LNAME)",  ;
    {||ProgDisp( recno(),recc() ),LNAME},.f.)
   ProgOff()

  Source:
  -------
  S_PROG.PRG

See also : PROGCOUNT(), PROGDISP(), PROGEVAL(), PROGINDEX(), PROGOFF()

SP_PROGOFF

PROGOFF()

  Short:
  ------
  PROGOFF() Removes a progress bar box created by PROGON()

  Returns:
  --------
  Nil

  Syntax:
  -------
  PROGOFF()

  Description:
  ------------
  Removes the progress box placed on the screen by
  PROGON()

  Examples:
  ---------

   //---------- this just shows progress from 1 - 1000
   initsup()
   ProgOn("Test")
   for i = 1 to 1000
     ProgDisp(i,1000,{||alltrim(str(i))+" of 1000"} )
   next
   ProgOff()

   //---------- this shows indexing progress
   use Customer
   ProgOn("Index")
   dbcreateindex("Eraseme","(LNAME)",  ;
    {||ProgDisp( recno(),recc() ),LNAME},.f.)
   ProgOff()

  Source:
  -------
  S_PROG.PRG

See also : PROGCOUNT(), PROGDISP(), PROGEVAL(), PROGINDEX(), PROGON()

SP_PROGDISP

PROGDISP()

  Short:
  ------
  PROGDISP() Displays progress bar in box created with PROGON()

  <quick descrip>

  Returns:
  --------
  <expReturn> => determined by several things

  Syntax:
  -------
  PROGDISP(nCurrent,nTotal,[bMessage],[bReturn])

  Description:
  ------------
  Updates a progress bar created with PROGON().

  <nCurrent> is the current item/position. <nTotal> is
  the total items. What is displayed is the percentage <nCurrent>
  is of <nTotal>.

  [bMessage] is an optional message line block, which
  is displayed

  on the bottom inside line of the box [bReturn] is an
  optional return value, with the default being  True

  Examples:
  ---------
   //---------- this just shows progress from 1 - 1000
   initsup()
   ProgOn("Test")
   for i = 1 to 1000
     IF !ProgDisp(i,1000,{||alltrim(str(i))+" of 1000"},;
            {||inkey()#27} )
       exit
     endif
   next
   ProgOff()

   //--------- this show indexing progress
   use Customer
   ProgOn("Index")
   dbcreateindex("Eraseme","(LNAME)", ;
    {||ProgDisp( recno(),recc() ),LNAME},.f.)
   ProgOff()
   // note the use of parentheses around LNAME.
   // see also PROGINDEX()

   //--------- this shows a count progress
   nCounted := 0
   nMatches := 0
   bDisplay := {||alltrim(str(nMatches))+" matches of "+;
             alltrim(str(nCounted)) }
   ProgOn("Counting")
   count for "S"$LNAME to ;
      nMatches while ProgDisp(++nCounted,recc(),bDisplay )
   ProgOff()

  Source:
  -------
  S_PROG.PRG

See also : PROGCOUNT(), PROGEVAL(), PROGINDEX(), PROGOFF(), PROGON()

SP_INITSUP

INITSUP()

  Short:
  ------
  INITSUP() Sets SuperLib system interface vars for MONO or COLOR

  Returns:
  --------
  Nothing

  Syntax:
  -------
  INITSUP([lMakePublic])

  Description:
  ------------
  Checks SLS_ISCOLOR(), and calls SATTCOLOR() or
  SATTMONO() appropriately, to set to default color or mono color
  sets. This is only done the first time INITSUP() is called.

  If [lMakePublic] is True (default), the old style
  SuperLib PUBLIC variables are declared and set to their
  corresponding values based on the new SLS_*() and SLSF_*()
  functions. This is to help with conversion, but be sure to
  change any reference to the old style PUBLIC variables to the
  new function calls, as the PUBLICs will not be an option in the
  next SuperLib.

  Each time INITSUP() is called with (True), the values
  in the PUBLIC variables are reset from their SLS_*() and
  SLSF_*() counterparts. The PUBLIC declaration is only done
  once.

  Examples:
  ---------
   INITSUP(.f.)  // do not initialize publics

  Notes:
  -------
  This is mainly here for compatibility with older
  versions, where INITSUP() was everywhere. INITSUP() previously
  set up the PUBLIC variables for use by SuperLib. The PUBLIC
  variable set have now been replaced by the SET/ACCESS function
  scheme in S_ATTRIB.PRG. INITSUP()'s previous duties have been
  replaced by the functions:

    SLSF_*()
    SLS_*()
    SATT*()

  See the APPENDIX for upgrading guidance.

  Source:
  -------
  S_INIT.PRG