TIP: Click on subject to list as thread! ANSI
echo: foxpro
to: ALL
from: DAVID POWELL
date: 1997-01-26 18:27:00
subject: FPLib(): BigMover, pt5 of 5

*!*******************************************************************
*! Function..........: MuaDib()  * Did anyone read Dune?
*! Author............: David Lee Powell
*! Project...........: Common
*! Created...........: 1-Jan-1994
*! Copyright.........: None:  Public Domain
*) Description.......: Responds to mouse input and directs actions
*! Syntax............: None
*! Parameter list....: None
*! Platform..........: DOS
*! Major change list.: None
*! Called by.........: BigMover
*! Calls.............: None
*!*******************************************************************
FUNC MuaDib
 
jnRow = MROW()
jnCol = MCOL()
 
IF jnRow < 0 OR jnCol < 0
   =Alarm()
   RETU
ENDI
 
IF jaPointer[ jnWindow ] + jnRow + 1 > jaTotRecs[ jnWindow ]
   =Alarm()
   RETU
ENDI
IF jnWindow = 1
   j1 = jaPointer[ 1 ] + jnRow + 1
ELSE
   j2 = jaPointer[ 2 ] + jnRow + 1
ENDI
=MoveElem()
 
 
*!*******************************************************************
*! Function..........: MoveElem()
*! Author............: David Lee Powell
*! Project...........: Common
*! Created...........: 1-Jan-1994
*! Copyright.........: None:  Public Domain
*) Description.......: Sends line data from one array to the other
*! Syntax............: None
*! Parameter list....: None
*! Platform..........: DOS
*! Major change list.: None
*! Called by.........: OKL SpaceBar
*!                   : MuaDib             (FUNC in BigMover)
*! Calls.............: None
*!*******************************************************************
FUNC MoveElem
 
ON KEY LABE SpaceBar                 && Disable hot key
DO CASE
   CASE jnWindow = 1
      IF jaTotRecs[ 1 ] = 0
         =Alarm()
         RETU
      ENDI
      jaTotRecs[ 2 ] = jaTotRecs[ 2 ] + 1
      jaTotRecs[ 1 ] = jaTotRecs[ 1 ] - 1
      DIME jaSelect[ jaTotRecs[ 2 ] ]
      =ACOPY( jaAvail, jaSelect, j1, 1, jaTotRecs[ 2 ] )
      =ADEL( jaAvail, j1, 1 )
      IF jaTotRecs[ 1 ] > 0            && Dimension 0 is illegal
         DIME jaAvail[ jaTotRecs[ 1 ] ]  && Suppress display when 0
      ENDI
      jnWindow = 2
      =WinClean()
      =Dim()
      jnWindow = 1
      * ---- If picker emptied window, reset to redisplay from top
      IF jaTotRecs[ 1 ] = jaPointer[ 1 ]
         jaPointer[ 1 ] = 0
      ENDI
      * ---- Redisplay window
      =WinClean()
      IF jaTotRecs[ 1 ] = 0
         jnWindow = 2
         =WinClean()
      ENDI
   CASE jnWindow = 2
      IF jaTotRecs[ 2 ] = 0
         =Alarm()
         RETU
      ENDI
      jaTotRecs[ 1 ] = jaTotRecs[ 1 ] + 1
      jaTotRecs[ 2 ] = jaTotRecs[ 2 ] - 1
      DIME jaAvail[ jaTotRecs[ 1 ] ]
      =ACOPY( jaSelect, jaAvail, j2, 1, jaTotRecs[ 1 ] )
      =ADEL( jaSelect, j2, 1 )
      IF jaTotRecs[ 2 ] > 0            && Dimension 0 is illegal
         DIME jaSelect[ jaTotRecs[ 2 ] ]  && Suppress display when 0
      ENDI
      jnWindow = 1
      =WinClean()
      =Dim()
      jnWindow = 2
      * ---- If picker emptied window, reset to redisplay from top
      IF jaTotRecs[ 2 ] = jaPointer[ 2 ]
         jaPointer[ 2 ] = 0
      ENDI
      * ---- Redisplay window
      =WinClean()
      IF jaTotRecs[ 2 ] = 0
         jnWindow = 1
         =WinClean()
      ENDI
ENDC
ON KEY LABE SpaceBar DO MoveElem     && Re-enable hot key
 
 
*!*******************************************************************
*! Function..........: MoveLeft()
*! Author............: David Lee Powell
*! Project...........: Common
*! Created...........: 1-Jan-1994
*! Copyright.........: None:  Public Domain
*) Description.......: Sends all data from right to left
*! Syntax............: None
*! Parameter list....: None
*! Platform..........: DOS
*! Major change list.: None
*! Called by.........: OKL F2
*!                   : MuaDib             (FUNC in BigMover)
*! Calls.............: None
*!*******************************************************************
FUNC MoveLeft
 
IF jaTotRecs[ 2 ] = 0
   =Alarm()
   RETU
ENDI
ON KEY LABE F2                       && Disable hot key
jnStart        = jaTotRecs[ 1 ] + 1
jnCopy         = jaTotRecs[ 2 ]
jaTotRecs[ 1 ] = jaTotRecs[ 1 ] + jaTotRecs[ 2 ]
jaTotRecs[ 2 ] = 0
DIME jaAvail[ jaTotRecs[ 1 ] ]
=ACOPY( jaSelect, jaAvail, 1, jnCopy, jnStart )
DIME jaSelect[ 1 ]
STOR 0 TO jaPointer                  && Resets them both
jnWindow       = 2
=WinClean()
=Dim()
jnWindow       = 1
=WinClean()
ON KEY LABE F2 DO MoveLeft
 
 
*!*******************************************************************
*! Function..........: MoveRight()
*! Author............: David Lee Powell
*! Project...........: Common
*! Created...........: 1-Jan-1994
*! Copyright.........: None:  Public Domain
*) Description.......: Sends all data from left to right
*! Syntax............: None
*! Parameter list....: None
*! Platform..........: DOS
*! Major change list.: None
*! Called by.........: OKL F3
*!                   : MuaDib             (FUNC in BigMover)
*! Calls.............: None
*!*******************************************************************
FUNC MoveRight
 
IF jaTotRecs[ 1 ] = 0
   =Alarm()
   RETU
ENDI
ON KEY LABE F3                       && Disable hot key
jnStart        = jaTotRecs[ 2 ] + 1
jnCopy         = jaTotRecs[ 1 ]
jaTotRecs[ 2 ] = jaTotRecs[ 1 ] + jaTotRecs[ 2 ]
jaTotRecs[ 1 ] = 0
DIME jaAvail[ jaTotRecs[ 2 ] ]
=ACOPY( jaAvail, jaSelect, 1, jnCopy, jnStart )
DIME jaAvail[ 1 ]
STOR 0 TO jaPointer                  && Resets them both
jnWindow       = 1
=WinClean()
=Dim()
jnWindow       = 2
=WinClean()
ON KEY LABE F3 DO MoveLeft
 
 
*!*******************************************************************
*! Function..........: MoveHelp()
*! Author............: David Lee Powell
*! Project...........: Common
*! Created...........: 1-Jan-1994
*! Copyright.........: None:  Public Domain
*) Description.......: Help with this routine
*! Syntax............: None
*! Parameter list....: None
*! Platform..........: DOS
*! Major change list.: None
*! Called by.........: OKL F1
*!                   : MuaDib             (FUNC in BigMover)
*! Calls.............: None
*!*******************************************************************
FUNC MoveHelp
 
ON KEY LABE F1
 
DEFI WIND KeyList FROM 03,10 TO 19,70 DOUB SHAD
ACTI WIND KeyList
 
TEXT
                How to use the pick list:
               
 Letter - Find the first entry starting with that letter
 F2     - Move all items to SELECTED list and clear the 
          AVAILABLE list
 F3     - Move all items to AVAILABLE list and clear the
          SELECTED list
 Space  - Move currently highlighted item to other window
 TAB    - Select the other window
     - Move around the active window (also PgUp, PgDn)
 ESCAPE - Finished
 
            
              
ENDT
=INKEY(0)
RELE WIND KeyList
ON KEY LABE F1 DO MoveHelp
 
  Enjoy!
--- Maximus/2 3.01
---------------
* Origin: * MacSavvy OS/2 BBS * Dallas, Texas * 972-250-4479 * (1:124/1208)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.