SP Color functions

1. These are the functions that relate to entire color sets

  SATTCOLOR()         Sets up the the color set for color monitor
  SATTMONO()          Sets up the the color set for MONO
  SATTDIRECT()        Sets up the the color set directly
  SATTGET()           Sets up color set from COLORS.DBF
  SATTPICK()          Sets up color set by selecting from stored definitions
  SATTGETMEM()        Sets up color set from old colors.mem
  SATTPUT()           Stores current color set  to colors.dbf
  SATTPICKPUT()       Stores current SuperLib color set to
                      colors.dbf, with picklist selection of set
  SATTPICKDEL()       Picklist deletion of stored color sets
  SATTPUSH()          Pushes the current SuperLib color set
  SATTPOP()           Pops previously pushed color set
  SETCOLORS()         Interactive color setting -
                      save/restore/edit color sets
  COLPIK()            10 built in color sets to select
                      from a popup

 2. These are the functions that deal with individual color set items

  SLS_NORMCOL()       Normal screen output
  SLS_NORMMENU()      Normal MENU color
  SLS_POPCOL()        Popup screen output
  SLS_POPMENU()       Popup MENU color
  SLS_FRAME()         Box frames
  SLS_SHADATT()       Shadow attribute
  SLS_SHADPOS()       Shadow position
  SLS_XPLODE()        Explode/implode popups

 3. Other color related functions

  SLS_ISCOLOR( )      Is this a color monitor

SP Color Implementation

 This is not the perfect color scheme. It is the one
 this library runs on. The color scheme relates to SuperLib functions,
 and will not affect your other color usage.

 Basically, when a SuperLib metafunction is called, it
 will usually have a main screen, a menu, and a number of popups
 and other attached screens. Rather than have a burned-in color
 set, or use SETCOLOR() as the default, SuperLib has a dynamic
 color scheme, which may be changed and stored by both the
 programmer and the end-user.

 Several global color settings are used by SuperLib
 functions. The settings are accessed and set via a set of
 functions calls, which themselves access a set of STATIC
 variables. The functions are:

   <cSetting> := sls_normcol([cNew])      For normal output
   <cSetting> := sls_normmenu([cNew])     For normal 'menu to'
   <cSetting> := sls_popcol([cNew])       For popup  box colors
   <cSetting> := sls_popmenu([cNew])      For popup box menus
   <cSetting> := sls_frame([cNew])        Frame string
   <nSetting> := sls_shadatt([nNew])      Shadow color attribute
   <nSetting> := sls_shadpos([nNew])      Shadow  position
                 (0,1,3,7,9) to match the numeric keypad
   <lSetting> := sls_xplode([lNew])       Logical - explode
                                          popups

 All colors are of the format "fg/bg,fg/bg,,,fg/bg"

 (fg-foreground bg-background) except for shadow
 attribute, which is numeric.

 By default, a monochrome set of colors is used. You
 may call the function SATTCOLOR() to make the 'color' colors the
 default.

 The function SETCOLORS() allows interactive setting
 of these colors. The variables are stored in COLORS.DBF, which
 contains multiple sets of colors.

 You may override the Clipper ISCOLOR() by
 initializing another setting accessed via the function
 SLS_ISCOLOR(), and setting it to True or False. This is helpful
 in instances where ISCOLOR() sees a color card with a monochrome
 monitor, or some such combination.

 If you are upgrading from 2.50 or previous, see
 "Upgrading" in the appendix.

 

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_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_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_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