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 Popup Functions

 TAGMARRAY()    Tag elements in muti-dimensioned array
 STAGFIELDS()   Tag fields
 UNBOX()        Removes a box created by makebox()
 SPOPORDER()    Popup allows user to change viewing (index) order
 SPOPSEEK()     Popup seek based on present index keys
 VIEWMEMOS()    Popup viewing (non-edit mode) of memos
 VERTVIEW()     Pops up a vertical view of the current record
 TAGARRAY()     Tag selected elements of an array
 SGETMANY()     Virtual (scrolling) gets in a popup box
 AMSG()         Pop up message box for an array of messages
 POPUPDIR()     Popup of a given directory for file selection
 POPREAD()      Pops up a box with 1-5 say-get combinations
 POPVDATE()     Pops up a picklist of virtual dates
 POPEX()        Pops up an achoice for a certain filespec
 POPMONTH()     Popup month selection
 POPCOLSEL()    Popup color grid for selecting a single color
 PROGINDEX()    Perform an index with a progress box
 PROGEVAL()     Perform a Database DBEVAL() with a progress box
 POPVYEAR()     Pops up a picklist of virtual years
 PROGCOUNT()    Perform a count with a progress box
 PROGDISP()     Displays progress bar in box created with PROGON()
 PROGOFF()      Removes a progress bar box created by PROGON()
 MESSYN()       Popup YesNo prompt box
 MCHOICE()      Creates a box for an Achoice call
 MFIELDS()      Pops up an selection box for current dbf fields
 GETDATE()      Point and shoot calendar
 MAKEBOX()      Draws a box on the screen with optional shadow,
                returns saved screen
 PLSWAIT()      Pops up a 'Please Wait' window or removes it
 ONE_READ()     Pop-up window with 1-4 Say/Get combinations
 MULTMSGYN()    Multi-line popup message - yes -no
 MFIELDSTYPE()  Pops up a list of fields of given type(s)
 MSG()          Displays up to a 9 line message in a window
 HARDCOPY()     Prints current record or memo fields to printer
 EDITMEMO()     Performs a windowed memoedit() on a memo field
 ASCIITABLE()   Pops up an ASCII table for character selection
 DELREC()       Dialog box to delete/undelete current record
 EDITMEMOV()    Performs a windowed memoedit() on a string
 BROWSE2D()     Popup tbrowse of 2 dimension array (array of arrays)
 SBUNSHADOW()   Removes shadow drawn with SBSHADOW()
 ABORT()        Pops up dialog box asking: Abort  Don't Abort
 SBSHADOW()     Draw a shadow around a box
 PROGON()       Initialize and display a progress bar box
 QUIKREPORT()   Runtime pre-defined report printing module
 P_READY()      Determines if printer is ready, prompts user
 SACHOICE()     Achoice replacement, uses TBROWSE, accepts exception
                codeblock
 S1LABEL()      Prints a single label
 GETCALC()      Pops up a quick 'solar' calculator

 

SP_VIEWMEMOS

VIEWMEMOS()

  Short:
  ------
  VIEWMEMOS() Popup viewing (non-edit mode) of memos

  Returns:
  --------
  Nil

  Syntax:
  -------
  VIEWMEMOS([nTop,nLeft,nBottom,nRight],[cColor],[cMemoName])

  Description:
  ------------
  VIEWMEMOS() will determine first off if there are any
  memo fields to view. If there are not, it will display a message
  to that effect and exit.

  If there is only one memo, it will be immediately
  viewed.

  If there are more than one memo, a picklist of memos
  will be popped up for selection. The memo selected will be viewed.

  [nTop,nLeft,nBottom,nRight] are the dimensions of the
  popup box.

  Default is 2,15,22,65. (Just numbers off the top of
  my head.)

  [cColor] is an optional color string. Default is
  sls_popcol().

  [cMemoName] (new to 3.5) allows you to pass in a memo name and
  bypass the "Which memo?" screen.

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

   if qfldstype("M") > 0  // qfldstyp() is a superlib function
      VIEWMEMOS()
   endif

  Source:
  -------
  S_VMEMO.PRG

 

SP_TODOLIST

TODOLIST()

  Short:
  ------
  TODOLIST() Simple todo list manager

  Returns:
  --------
  Nothing

  Syntax:
  -------
  TODOLIST()

  Description:
  ------------
  Pops up a simple TODO list interface,allowing the  user to enter in things 
  'To do' by Description, Category, Priority and Date Due. These categories 
   may be sorted, filtered and printed.

  Examples:
  ---------
   TODOLIST()

  Source:
  -------
  S_TODO.PRG

 

SP_TAGMARRAY

TAGMARRAY()

  Short:
  ------
  TAGMARRAY() Tag elements in muti-dimensioned array

  Returns:
  --------
  <aTagged> => an array of numbers representing the
  tagged elements

  Syntax:
  -------
  TAGMARRAY(aArray,[cTitle],[cMark],[aTags],[aHeads])

  Description:
  ------------
  A popup which allows tagging/untagging of elements in
  <aArray>, which is a multi-dimmed array of the format
  {array(n),array(n)} such as is returned by DIRECTORY() or DBSTRUCT().

    SPACE   = Tag/Untag
    F10     = Done
    ESC     = Abort
    ALT-A   = Tag All
    ALT-U   = Untag All
    ALT-S   = Swap Tagged/untagged

  The return value <aTagged> is an array of integer
  values representing the offsets into the original array <aArray> which
  were tagged.

  [cTitle] is a string to be used as the box title

  [cMark]  is the tag character. Default is chr(251) - checkmark

  [aTags]  is an array of logicals the same length as
  <aArray>. This allows pre-tagging. You may also use this
  array on return from the function. The (.T.) elements
  correspond to the tagged elements in <aArray>.

  [aHeads] is an array for the column titles for each
  subarray element in <aArray>, and needs to be the same length
  as a subarray of <aArray>

  Examples:
  ---------
   aDir  := directory()

   aCols := {"File","Size","Date","Time","Attribute"}

   aCopy := tagmarray(aDir,"Select Files for copying",nil,nil,aCols)

   for i = 1 to len(aCopy)

     COPY FILE (aDir[aCopy[i],1 ]) TO (cDestination)

   next

  Notes:
  -------
  Coded by Matthew Maier - thanks.

  Source:
  -------
  S_TAGAM.PRG

 

SP_STAGFIELDS

STAGFIELDS()

  Short:
  ------
  STAGFIELDS() Tag fields

  Returns:
  --------
  aTagged => an array of element #'s of the tagged items

  Syntax:
  -------
  STAGFIELDS([aFieldnames],[cTitle],[cMark])

  Description:
  ------------
  Tags selected items in an array of fields, returning
  an array of element #'s of tagged items in the array of fields.

  [aFieldNames] - an array of field names. Default -
  all fields

  [cTitle]      - title for the popup. Default none

  [cMark]       - character used to mark as tagged.

                          Default is checkmark chr(251)

  Examples:
  ---------
   aTagged := STAGFIELDS()

   for i = 1 to len(aTagged)

     ?field(aTagged[i])   // fieldname

   next

  Source:
  -------
  S_TAGF.PRG

 

SP_SPOPSEEK

SPOPSEEK()

  Short:
  ------
  SPOPSEEK() Popup seek based on present index keys

  Returns:
  --------
  <lFound> => seek succesful or not

  Syntax:
  -------
  SPOPSEEK([aKeys])

  Description:
  ------------
  Pops up first a box asking for which index selection,
  and when the index key is selected, asks for a value to be
  entered to seek on. Performs a seek and returns <lFound>
  success. The index order is saved and restored.

  [aKeys] is an optional array of current index keys.

  Examples:
  ---------
   IF choice = POP_SEEK
      if SPOPSEEK()
        redrawscreen()
      endif
   ENDIF

  Source:
  -------
  S_PSEEK.PRG

 

SP_SPOPORDER

SPOPORDER()

  Short:
  ------
  SPOPORDER() Popup allows user to change viewing (index) order

  Returns:
  --------
  <nOrder> => current index order

  Syntax:
  -------
  SPOPORDER()

  Description:
  ------------
  Pops up a list of current index keys, with first
  option being <Natural (record) order>. If an index order is
  selected, index order is set to that order. Current index order (after
  selection and change) is returned.

  Examples:
  ---------
   nIndexOrd := spoporder()

  Source:
  -------
  S_POPORD.PRG

 

SP_SLS_XPLODE

SLS_XPLODE()

  Short:
  ------
 SLS_XPLODE() A Superlib box setting function

 Returns
 <lSetting> => Current value of the setting

 Syntax
 SLS_XPLODE([lNew])

 Function                   Setting                     Default
 --------------------------------------------------------------
 SLS_XPLODE([lNew])         Explode/implode popups      .T.

 [lNew] sets the setting to a new setting
 If [lNew] is passed, the setting is changed and the
 new setting is returned.

 Examples

  SLS_XPLODE(.f.)        //  NO EXPLODING BOXES

 Notes:

 Source: S_GLOBAL.PRG

 

SP_QUERY

QUERY()

  Short:
  ------
  QUERY() Popup Interactive query by example condition
  builder

  Returns:
  --------
  <cQuery> => macro expandable logical condition
  expression

  Syntax:
  -------
  QUERY([aFields,aDesc,aTypes],[cQuitTo],[lUseBuildex])

  Description:
  ------------
  A point and shoot condition builder. Complex
  conditions are allowed with multiple .and./.or. Called without
  parameters, all fields in the current dbf are presented for condition
  building.

  [aFields,aDesc,aTypes] give field array, field
  description and field types.These, if passed will be used in
  place of the default of all dbf fields. (pass all or none)

  [cQuitTo] is a 'quit to' phrase. Default exit option
  is 'Quit'. 'Quit to' phrase will be tacked to the end of this .
  i.e. "Quit"+quit_to  [ Quit to Report Writer ]

  [lUseBuildex] determines whether BUILDEX() expression
  builder will be available from QUERY(). Default is not.

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

   aFields := {"fname", "lname",  "mi" }
   aFdesc  := {"First", "Last",  "Middle" }
   aTypes  := {"C","C","C"}
   cFilt   := QUERY(aFields,aFdesc,aTypes,nil,.t.)

   count for &cFilt  to nCount

   // or (preferably)
   count for eval( sls_bquery() ) to nCount

  Notes:
  -------
  Query always stores the current query with the
  function SLS_QUERY(). Calling SLS_QUERY() will return the
  currently stored query string. SLS_BQUERY() returns the query as
  a codeblock. Remember to clear sls_query()/sls_bquery() when
  changing DBFs.

  Source:
  -------
  S_QUERY.PRG

See also : SLS_BQUERY(), SLS_QUERY()