SP_R_ISRATREAD

R_ISRATREAD()

  Short:
  ------
  R_ISRATREAD() Determines if RAT_READ() is current get system

  Returns:
  --------
  <lIsRatRead> => True if RAT_READ() is current get system

  Syntax:
  -------
  R_ISRATREAD()

  Description:
  ------------

  By calling R_ISRATREAD(), you can determine if the current
  read is a RAT_READ or not, and call the regular exported
  read/get functions, or call their equivalent RAT* functions
  as listed in RAT_READ().

  An exception is GETACTIVE(), which may be called while using
  either get system, as RAT_READ() calls GETACTIVE() to update
  the current get, and also saves and restores the active get
  in case there is a prior READ active.

  This R_ISRATREAD() function returns TRUE/FALSE for 'is the current
  read a RAT_READ or a READMODAL (normal) read'. Essentially it tells
  you which GetSystem you are in.

  Thus you can have both RAT_READ() mouse aware reads, and standard
  READMODAL() Clipper reads in the same system, and tell the
  difference between the two.

  Examples:
  ---------
  IF R_ISRATREAD()
     ...
  ENDIF

  Notes:
  -------

  Source:
  -------
  S_RREAD.PRG

See also : RAT_READ(), READMODAL()

 

 

SP_RRLASTKEY

RRLASTKEY()

  Short:
  ------
  RRLASTKEY()  Retrieve the last key handled by ratapplykey()

  Returns:
  --------
  <nLastKey> => last key handled by ratapplykey()

  Syntax:
  -------
  RRLASTKEY()

  Description:
  ------------
  Returns the last key - including pseudo keys - handled by
  RatApplyKey().

  The [nRmKey]  and [aLmKeys] parameters of RAT_READ() allow
  emulation of keypresses. The [nRmKey] determines what key is
  emulated when the right mouse button is pressed. The [aLmKeys]
  array contains key emulations to be used for a set of screen
  hot areas for left mouse button clicks. In both cases, the
  ascii key code is passed to RatApplyKey() to handle. However,
  the keys ARE NOT STUFFED INTO THE KEYBOARD, and thus are not
  retrievable through LASTKEY(). The reason, by the way, that they
  are not stuffed into the keyboard, is that some keys cannot be
  stuffed with the KEYBOARD command  ( i.e. ALT-F10 or -39 )

  After a number of requests to be able to tell what key was
  pressed last when exiting a read, even when it is an interpreted
  key based on a mouse click, I've added this function. It will return
  the last key handled by RatApplyKey(), even if the key is based on
  a mouse click. If the last event is a mouse event that does not
  translate into a key value, it will return either K_MOUSELEFT for left
  mouse click, or K_MOUSERIGHT for right mouse click.

  Examples:
  ---------
  RAT_READ(getlist,...)
  if RRLASTKEY()==27
    * escape was pressed or mouse right button was pressed

  endif

  Notes:
  -------

  Source:
  -------
  S_RREAD.PRG

See also : RAT_READ()

 

SP_RRJUMP2

RRJUMP2()

  Short:
  ------
  RRJUMP2()  Jump to a new get in a RAT_READ()

  Returns:
  --------
  NIL

  Syntax:
  -------
  RRJUMP2(nNew)

  Description:
  ------------
  While in a RAT_READ(), causes the jump flag to be set to <nNew>, and
  and the current get's exitstate variable to be set to GE_ENTER. This
  causes an exit from the current get, and a jump to get <nNew>.

  Examples:
  ---------
   // in this example, pressing or clicking F3 causes a jump to
   // get # 1, while pressing or clicking F4 causes a jump to
   // get # 5.

   #include "inkey.ch"

   v1 := space(10)
   v2 := space(10)
   v3 := space(10)
   v4 := space(10)
   v5 := space(10)

   setkey(K_F4,{||rrjump2(5)} )
   setkey(K_F3,{||rrjump2(1)} )

   @24,0 say "[F3-Go to First Get]  [F4-Go to Last Get]"

   ahot := {{24,0,24,20,K_F3},{24,23,24,41,K_F4} }

   @10,10 get v1
   @11,10 get v2
   @12,10 get v3
   @13,10 get v4
   @14,10 get v5

   RAT_READ(getlist,1,.T.,27,nil,aHot)

  Notes:
  -------

  Source:
  -------
  S_RREAD.PRG

See also : RAT_READ()

SP_RJUST

RJUST()

  Short:
  ------
  RJUST() Right justifies a string

  Returns:
  --------
  <cJustified> => string right justified

  Syntax:
  -------
  RJUST(cTarget)

  Description:
  ------------
  Right justifies <cTarget>

  Examples:
  ---------
   string        := "Superfunction      "

   string        := RJUST(string)

   // (returns       "      Superfunction"

  Source:
  -------
  S_RJUST.PRG

See also : LJUST(), RTRIM()

 

 

SP_RESTSETKEYS

RESTSETKEYS()

  Short:
  ------
  RESTSETKEYS() Restores  set keys saved with SAVESETKEYS()

  Returns:
  --------
  Nil

  Syntax:
  -------
  RESTSETKEYS(aSaved)

  Description:
  ------------
  SAVESETKEYS() saves the inkey codes and codeblocks
  associated with all active setkeys to an array. RESTSETKEYS()
  takes the saved array and restores the setkeys back.

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

   * do stuff

   RESTSETKEYS(aSaved)

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

See also : SAVESETKEYS()

 

 

SP_REPORTER

REPORTER()

  Short:
  ------
  REPORTER() Create, modify, execute reports

  Returns:
  --------
  Nothing

  Syntax:
  -------
  REPORTER([aFieldNames,aFieldTypes,aFieldLengths])

  Description:
  ------------
  Build/modify reports based on fields in database.
  Fields in database may be specified in arrays 1-3 which are
  [aFieldNames] field names [aFieldTypes] field types and
  [aFieldLengths] field lengths. All fields are used by default.

  Reporter allows a MAJOR and MINOR group, using the
  indexes currently available and open.

  Examples:
  ---------
   example 1:

   Use Customer
   REPORTER()

   example 2:
   USE Customer
   aFieldNames := {"fname","lname","mi"}
   aFieldTypes := {"C","C","C"}
   aFieldLens  := {15,35,1}
   REPORTER(aFieldNames,aFieldTypes,aFieldLens)

  Notes:
  -------
  Reporter() reports are stored in a DBF file. See the
  index for file structures. See SLSF_REPORT() for further info on
  the name and location of this file.

  Upgrade note:
  The look and feel have changed to one more uniform
  with other SuperLib functions.

  Source:
  -------
  R_REPORT.PRG

See Also : SLSF_REPORT()