SP Event Functions

 RAT_EVENT()    Event handler - inkey() with mouse awareness
 RAT_ERBHD()    Determines if right mouse button is held down
 RAT_ISMOUSE()  Determines mouse usage by RAT_EVENT()
 RAT_ELBHD()    Determines if left mouse button is held down
 RAT_EQMCOL()   Returns mouse column at last press
 RAT_EQMROW()   Returns mouse row at last press
 IFMOUSEHD()    Checks if mouse held down,evals codeblock while it is
 ISMOUSEAT()    Checks for mouse click within passed coordinates
 MBRZCLICK()    Checks for mouse click on current Tbrowse row/col
 MBRZMOVE()     Checks for mouse click at and moves to Tbrowse row/col
 MOUSEHOTAT()   Checks for mouse click from array of hot coordinates
 RAT_LASTEV()   Returns the last event recorded by RAT_EVENT()
 R_ISRATREAD()  Determines if RAT_READ() is current get system

 

SP_MBRZMOVE

MBRZMOVE()

  Short:
  ------
  MBRZMOVE() Checks for mouse click at and moves to Tbrowse row/col

  Returns:
  --------
  <lClicked> => If the mouse clicked on a new Tbrowse Row/Column.

  Syntax:
  -------
  MBRZMOVE(oTBrowse, nMouseRow, nMouseCol,[nTop,nLeft,nBottom,nRight])

  Description:
  ------------
  Determines if the mouse coordinates <nMouseRow> and <nMouseCol>
  are on a new Tbrowse row/column, and causes the Tbrowse cursor to
  move there.

  [nTop,nLeft,nBottom,nRight] determine the Tbrowse 'live' area - the
  area exclusive of headers, footers, seperators etc. MBRZMOVE() can
  determine this on its own, but it is much faster to pass these
  coordinates if you can.

  Examples:
  ---------
  from MCHOICE():

   case nLastKey == K_MOUSELEFT
     do case
     case ISMOUSEAT(nMouseR, nMouseC, nBottom,nRight-3, nBottom, nRight-2)
        oTb:down()
        IFMOUSEHD({||oTb:down()},oTb)
     case MBRZMOVE(oTb,nMouseR, nMouseC,nTop+1,nLeft+1,nBottom-1,nRight-1)
        keyboard chr(K_ENTER)
     case MBRZMOVE(oTb,nMouseR, nMouseC)
        EXIT
     endcase
   endcase

  Source:
  -------
  S_MOOSE.PRG

 

SP_MBRZCLICK

MBRZCLICK()

  Short:
  ------
  MBRZCLICK() Checks for mouse click on current Tbrowse row/col

  Returns:
  --------
  <lClicked> => if the mouse clicked on the current Tbrowse cursor row and
                column.

  Syntax:
  -------
  MBRZCLICK(oTBrowse, nMouseRow, nMouseCol)

  Description:
  ------------
  Determines if the mouse coordinates <nMouseRow> and <nMouseCol>
  are within the area of the current Tbrowse row and column.

  Examples:
  ---------
  from MCHOICE():

   case nLastKey == K_MOUSELEFT
         do case
         case ISMOUSEAT(nMouseR, nMouseC, nBottom,nRight-3, nBottom, nRight-2)
            oTb:down()
            IFMOUSEHD({||oTb:down()},oTb)
         case MBRZMOVE(oTb,nMouseR, nMouseC,nTop+1,nLeft+1,nBottom-1,nRight-1)
            keyboard chr(K_ENTER)
         case MBRZCLICK(oTb,nMouseR, nMouseC)   //<-----here
            EXIT
         endcase
   endcase

  Source:
  -------
  S_MOOSE.PRG