Category : Dbase (Clipper, FoxBase, etc) Languages Source Code
Archive   : 50MOUSE.ZIP
Filename : MAUS.DOC

 
Output of file : MAUS.DOC contained in archive : 50MOUSE.ZIP

******************************************************************
*-------------< DOCUMENTATION - DEMO >--------------------------*
Please note: The new Docomentation has changed. This text is for 
demonstration purpose only!

The Clipper UDF's are called from C right away! No keyboard stuffing
anymore! Like others still do ... ! The registered version
will not beep(), unless you wnat it!

The terms:
To register for S'87 & 5.0 send 30.00 U$ to. (Cash or check, cash prefered)
job-soft
c./o. Jobst Hensiek
Claustorwall 23
W-3380 Goslar 1, Germany (W)
If it is ready, you will get the tbrowse stuff for free. How is that?
You will get a grid cursor (done C & ASM), and a new wp-merge for free.
The last two, are ready! Imagine the value..

For thouse, who want to know how it is done:
for 75 U$ the source for the maus will be included. To complile it, you 
will need MS-C 6.0 (inline _asm).


Hey, you can call me too:
011-(495)-321-4457, ask for _jobst_.

The BASICs:
**************
The main idea is very simple:
You have to peek the location of the real cursor & the location of
THE MOUSE cursor. Well, if you know where you at & do know where you want
to go, it is realy simple to take appropiate action to get there.

How can you interface THE MAUS with your programs ?
Write (or use) a function to determine where your real cursor is &
setup your THE MAUS event handler (SET KEY TO PROC) to determine what
action has to be taken. ( Look at the examples.)

2 A closer look:
*****************
1 Trun mouse on: mouse function 0 & 1

2 Set up the event for your mouse.
Make a call to M_setint(ascii,mask_bit,action) See demo.
- where
ascii is : the clipper key code used for SET KEY ascii TO action
mask_bit : enter a string like "1010" for the bits to set
: see description for f(12/20) below
action : "name" of procedure to call on event (button/key)
Use dots!

3 For achoice() & memoedit() & dbedit() write the "UDFs" and load status
into publics. They get checked in the SET KEY xyz TO action proc.
For get & prompt see demo.

4 Write the action function (SET KEY xyz TO action)
In the top lines call GETMXY(..) to get mouse position & button
status.
Check mouse cursor against the real cursor and read the button status
than
do case....
( ..build string for KEYBOARD..., see demo...)

Put str into keyboard
TIP: Get the cursor out of sight while you update the screen,
you don't get ugly spots!

5 DON`T FORGET TO RESET MOUSE BEFORE YOU GO BACK TO DOS


3 MAUS.OBJ
**********
Implemented functions in maus.obj

NAME:
-- MAUS(@m1..@m5)

SYNOPSYS:
@m1 to @m5 are #'s & passed by reference

DESCRIPTION:
See the demo & op.4 below, for the decription of the supported mouse.funcs
Example:
Use within the CLIPPER function MOUSE(),

function mouse
parameters m1,m2,m3,m4,m5
IF ! CLIP50 && Summer '87
m5 = if(pcount()< 5,0.0,m5)
_m1 = m1 * 1.0
_m2 = m2 * 1.0
_m3 = m3 * 1.0
_m4 = m4 * 1.0
_m5 = m5 * 1.0 && used for function 16 only
call _maus with _m1, _m2, _m3, _m4, _m5 &&
m1 = int( _m1 )
m2 = int( _m2 )
m3 = int( _m3 )
m4 = int( _m4 )
ELSE && 5.0 ?
m5 = if(pcount()< 5,0,m5)
DECLARE _m[ 6 ] && Might want to declare 
itsomewhere else
_m[ 1 ] = m1 && take these lines as aapproach..
_m[ 2 ] = m2 &&
_m[ 3 ] = m3
_m[ 4 ] = m4
_m[ 5 ] = m5 && used for function 16 only
MAUS( _m )
m1 = _m[ 1 ]
m2 = _m[ 2 ]
m3 = _m[ 3 ]
m4 = _m[ 4 ]
ENDIF
return .t.

!! There is no error-checking done !!
-------

NAME:
-- GETMXY(@m1..@m4)

SYNOPSYS:
@m1 to @m4 are of TYPE "N" & passed by reference
@m1 := mouse status at interrupt-state
@m2 := horicontal position (devide by 8 to get col)
@m3 := vertical position (devide by 8 to get row)
@m4 := Condition-Mask

DESCRIPTION:
Tell's you the status at interrupt state. Put this function
in the top lines of your set key xyz PROCEDURE to determine
what caused the int & where it occured (location).
See demo for details!
Example:

function m_getmxy
parameters mi2, mi3, mi4, mi5
IF ! CLIP50 && Summer '87
store 0.0 to _m1, _m2, _m3, _m4
call _getmxy with _m1, _m2, _m3, _m4
mi2 = int( _m1 ) && status of button
mi3 = int( _m2 ) && horinzontal position (Max = 632)
mi4 = int( _m3 ) && verticlal position (max= 192)
mi5 = int( _m4 ) && condition mask (reseved)
else
DECLARE _m[ 6 ] && Might want to declare it somewhere else
afill(_m, 0, 5 )
GETMXY( _M )
mi2 = _m[ 1 ]
mi3 = _m[ 2 ]
mi4 = _m[ 3 ]
mi5 = _m[ 4 ]
ENDIF
set_f16()
return .t.

!! There is no error-checking done !!
-------

NAME:
-- = BIT_DEC()

SYNOPSYS:
expC := "binary bits" as a string
expN := converted "binary bits"

DESCRIPTION:
Convert "binary bits" from a string to a number.
Usefull to set the bit-mask.

Example:
FUNCTION m_setint
PARAMETER asci,mask_bit,action
m1 = 20 && <-- Function 20 is safer than f(12)
m3 = bit_dec(mask_bit) && however, it is not supported by all
m4 = asci && the mouse drivers
SET KEY asci TO &action
Mouse(@m1,@m2,@m3,@m4)
RETURN (.T.)
or
x=BIT_DEC("1101")
? x && x = 13
!! There is no error-checking done !!
-------

NAME:
-- SHAPE(,)

SYNOPSYS:
expN1 := lower cursor scanline
expN2 := upper cursor scanline

DESCRIPTION:
Set shape of cursor

Example:
-- SHAPE(0,8)) && Block-Cursor on VGA
!! There is no error-checking done !!
-------
NAME:
-- BUSY()

SYNOPSYS:
expL := Set/lower the busy flag

DESCRIPTION:
Set busy flag while you enter SET key .. PROCEDURE .., lower it on exit.

Example:
-- BUSY(.T.) && Set busy flag
!! There is no error-checking done !!


4 Supported THE MAUS functions
*******************************

If your are already familiar with the MS-MOUSE, let me inform you:
Up to functions 9, 12, 16 & 20 everything works like the orginal
mouse-interface from MICROSOFT(tm); the differences are explained
below.


Always call:
MOUSE(@M1,@M2,@M3,@M4,@M5)
--------------
function : 0
purpose : Mouse reset & status, truns interrupt 12 & 20 off
call with : m1 = 0
returns : m1= status (if mouse found and reset = -1, otherwise = 0
: m2= number of buttons
-------------
function : 1
purpose : show mouse cursor
call with : m1 = 1
returns : nothing
-------------
function : 2
purpose : hide mouse cursor
call with : m1 = 2
returns : nothing
-------------
function : 3
purpose : get button status & mouse position
call with : m1 = 3
returns : m2= button status: (down: 1=left, 2=right, 3=both)
: m3= horizontal cursor coordinate (max = 632/ 8-> 79)
: m4= vertical cursor coordinate (max = 192/ 8 -> 24)
-------------
function : 4
purpose : set mouse cursor position
call with : m1 = 4
: m3 = new horizontal cursor position (max = 632)
: m4 = new vertical cursor position (max = 192)
returns : nothing
-------------
function : 5
purpose : get mouse button press information
call with : m1 = 5
: m2 = check on button press (1=lft,2=rght,3=bth)
returns : m1 = button status (down: 1=lft,2=rght,3=bth)
: m2 = number of times buttons pressed since last call
: m3 = horizontal cursor position at last press (max = 632)
: m4 = vertical cursor position at last press (max = 192)
-------------
function : 6
purpose : get button release information
call with : m1 = 6
: m2 = check on button release (1=lft,2=rght,3=bth)
returns : m1 = button status (release: 1=lft,2=rght,3=bth)
: m2 = number of times buttons releases since last call
: m3 = horizontal cursor position at last press (max = 632)
: m4 = vertical cursor position at last press (max = 192)
-------------
function : 7
purpose : set min & max horizontal mouse cursor position
call with : m1 = 7
: m3 = minnimum position (max = 632)
: m4 = maximun position (max = 192)
returns : nothing
-------------
function : 8
purpose : set min & max vertical mouse cursor position
call with : m1 = 8
: m3 = minnimum position (max = 632)
: m4 = maximun position (max = 192)
returns : nothing
-------------
* function 9 ist not supported (graphic)
-------------
function : 10
purpose : set text cursor
call with : m1 = 10
: m2 = cursor select mode ( 0 sofware / 1 hardware)
: m3 = sreen mask / start scan line
: m4 = cursor mask / end scan line
returns : nothing
-------------
function : 11
purpose : read mouse mickeys
call with : m1 = 11
returns : m3 = horizontal mickeys
: m4 = vertical mickeys
-------------
: This function is shaped for Clipper S'87 * NOT STANDARD *
function : 12
purpose : set interrupt
call with : m1 = 12
: m3 = mask bits : 4 3 2 1 0
: ³ ³ ³ ³ ÀÄÄ cursor moved
: ³ ³ ³ ÀÄÄÄÄÄ left button pressed
: ³ ³ ÀÄÄÄÄÄÄÄÄ left button released
: ³ ÀÄÄÄÄÄÄÄÄÄÄÄ right button down
: ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄ right button released
: Use BET_DEC() to convert mask string to number
: For example: m3 = BET_DEC("1010")
: m4 = KEY CODE (same as SET KEY ASCII TO proc)
-------------
function : 13
purpose : light pen emulation on
call with : m1 = 13
returns : nothing
-------------
function : 14
purpose : light pen emulation off
call with : m1 = 14
returns : nothing
-------------
function : 15
purpose : set mickey / pixel ratio
call with : m1 = 15
: m3 = horizontal mickey / pixel ratio
: m4 = vertical mickey / pixel ratio
returns : nothing
-------------
: This function is shaped for Clipper S'87 * NOT STANDARD *
function : 16
purpose : conditional off
call with : m1 = 16
: m2 = upper left col
: m3 = upper left row
: m4 = lower left col
------> : m5 = lower left row
returns : nothing
-------------
function : 19
purpose : set double-speed Threshold
call with : m1 = 19
: m4 = threshold speed in mickeys per second
returns : nothing
-------------
: This function is shaped for Clipper S'87 * NOT STANDARD *
function : 20
purpose : set interrupt
call with : m1 = 20
: m3 = mask bits : 4 3 2 1 0
: ³ ³ ³ ³ ÀÄÄ cursor moved
: ³ ³ ³ ÀÄÄÄÄÄ left button pressed
: ³ ³ ÀÄÄÄÄÄÄÄÄ left button released
: ³ ÀÄÄÄÄÄÄÄÄÄÄÄ right button down
: ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄ right button released
: Use BET_DEC() to convert mask string to number
: For example enter m3 = BET_DEC("1010")
: m4 = KEY CODE (same as SET KEY ASCII TO proc)

******************< End of Documentation >***************************




  3 Responses to “Category : Dbase (Clipper, FoxBase, etc) Languages Source Code
Archive   : 50MOUSE.ZIP
Filename : MAUS.DOC

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/