home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / EDITORES / TSCREDD2.ZIP / SCRDISK3.EXE / MANUAL.PT2 < prev    next >
Encoding:
Text File  |  1990-04-29  |  39.8 KB  |  1,025 lines

  1.                                   Page I-7
  2.       
  3.       
  4.       
  5.       MOUSE SUPPORT........................................(Section M)
  6.          How to use the Mouse section of the manual............... M-1
  7.          A word to the wise about using Turbo ScrEdit mouse....... M-1
  8.          How Turbo ScrEdit Mouse Support Works.................... M-2
  9.          Compiler Directives to include/exclude mouse procedures.. M-2
  10.          Example Programs:
  11.             Pascal................................................ M-3
  12.             C......................................................M-4
  13.          Global Variables and Constants........................... M-5
  14.          Initializing the mouse procedures........................ M-6  
  15.          S_ActivateMouse.......................................... M-6
  16.          S_AnalizeMouse........................................... M-7
  17.          S_DisableMouse........................................... M-8
  18.          S_HideMouse.............................................. M-9
  19.          S_RemoveMouse............................................ M-9 
  20.          S_ResetMouse............................................. M-10
  21.          S_ResetMouseFlags........................................ M-10
  22.          S_RestoreMouse........................................... M-11
  23.          S_SetMouseCursor......................................... M-12
  24.          S_SetMouseEvent.......................................... M-13
  25.          S_SetMouseRange.......................................... M-14
  26.          S_ShowMouse.............................................. M-15
  27.       
  28.       
  29.       Alphabetical listing of Mouse System global variables:
  30.          S_Buttons...........................................3 4 5    
  31.          S_MouseInstalled....................................3 4 5     
  32.          S_MouseEvent..(Pascal)..............................3 4 5 7  
  33.          S_Ms-MouseEvent (C).................................3 4 5 7 10
  34.          S_MsLeftPressed.....................................3 4 5 7 10 
  35.          S_MsLeftReleased....................................3 4 5 7 10
  36.          S_MsMiddlePressed...................................3 4 5 7 10
  37.          S_MsMiddleReleased..................................3 4 5 7 10
  38.          S_MsRightPressed....................................3 4 5 7 10
  39.          S_MsRightReleased...................................3 4 5 7 10
  40.          S_MsRow.............................................4 5 7      
  41.          S_MsColumn..........................................3 4 5 7   
  42.       
  43.       
  44.       
  45.       
  46.       
  47.       
  48.       
  49.       
  50.       
  51.       
  52.       
  53.       
  54.       
  55.       
  56.       
  57.       
  58.       
  59.       
  60.       
  61.       
  62.       
  63.       
  64.       
  65.       
  66.       
  67.                                   Page M-1
  68.       
  69.       
  70.       How to use the MOUSE SUPPORT manual.    
  71.       -----------------------------------------------------------------
  72.       This portion of the "Turbo ScrEdit User Manual" explains each  of 
  73.       the procedures used to interact with the mouse device driver, and 
  74.       provides  an example of the procedures usage in the context of  a 
  75.       program.
  76.       
  77.       Pages  M-3  and  M-4 contain small program listings  of  "C"  and 
  78.       PASCAL coding that use most of the Turbo ScrEdit mouse processing 
  79.       functions. The files "TestMous.Pas" and "TestMous.C" that came in 
  80.       your Turbo ScrEdit package, contain the  actual working  programs 
  81.       listed  here.  Also  You will find a thorough  walk  through  and 
  82.       explanation  of  these programs in Part II of the  Turbo  ScrEdit 
  83.       Tutor. 
  84.       
  85.       In  the program listings on pages M-3 and M-4 you will find  that 
  86.       certain lines of code have been marked with 20 indicators, "==1>" 
  87.       through "==20>".  
  88.       
  89.       Each procedural reference in this section of the manual describes 
  90.       one  of the mouse functions, procedures, or global variables.  In 
  91.       each  description  you will find a reference to one of  these  19  
  92.       markers as the programming example that will allow you to see how 
  93.       the  particular  function  or variable is used in  context  in  a 
  94.       program.  
  95.       
  96.       There  are  three  procedures  that  are  not  included  in   the 
  97.       programming    example:   S_RemoveMouse,    S_RetoreMouse,    and 
  98.       S_ResetMouse.   These procedures are explained in  there  section 
  99.       and no example of their usage is provided.
  100.       
  101.       
  102.       
  103.       
  104.       A Word to the wise about using Turbo ScrEdit Mouse procedures.
  105.       -----------------------------------------------------------------
  106.       To avoid loosing your work, before beginning to program with  the 
  107.       mouse procedures BE SURE TO SET YOU PROGRAMMING ENVIRONMENT  AUTO 
  108.       SAVE  OPTION  TO "ON" SO IT WILL AUTOMATICALLY SAVE  THE  PROGRAM 
  109.       THAT YOU HAVE SPENT HOURS WORKING ON BEFORE IT EXECUTES...  Under 
  110.       certain   conditions  while  testing  new  programs,  the   mouse 
  111.       procedures  can cause your system to HANG so only rebooting  will 
  112.       get it going again.
  113.       
  114.       Turbo  ScrEdit  Mouse  uses the mouse  driver  event  handler  to 
  115.       monitor for mouse activity. The benefit of using the mouse  event 
  116.       handler is that the mouse driver interrupts your program when  the 
  117.       specified  mouse  event occurs so your program does not  have  to 
  118.       make frequent interrupt calls to check for mouse activity.
  119.       
  120.       The  disadvantage  to using the mouse event handler is  that  your 
  121.       program  must pass the mouse driver a memory location that it  is 
  122.       to  call  when  the specified mouse  event  occurs.  This  memory 
  123.       location is expected to have some kind of a programmed  procedure 
  124.       that  can  handle the mouse event and then return  to  the  mouse 
  125.       driver  via  a far return.  When your program  ends  and  another 
  126.       program  is loaded into memory, the mouse event handler will  not 
  127.       realize  this and will respond to a mouse event and  execute  any 
  128.       object code that is in memory at the time.
  129.       
  130.       
  131.       
  132.       
  133.                                   Page M-2
  134.       
  135.       
  136.       How Turbo ScrEdit Mouse Support Works.
  137.       -----------------------------------------------------------------
  138.       Turbo  ScrEdit Mouse Support (TSMS) is designed to work with  the 
  139.       MicroSoft  and LogiTech mouse device drivers and supports two  or 
  140.       three button mouse devices.
  141.       
  142.       TSMS  takes  advantage  of the mouse driver  event  task  handler 
  143.       (Interrupt  $33,  function  12.)  The  procedure  S_SetMouseEvent 
  144.       passes  the  mouse  driver the memory address  of  the  procedure 
  145.       S_SetMouseFlags  and a bit pattern representing the events to  be 
  146.       monitored,  such  as a button being pressed or the  mouse  device 
  147.       being moved.  See the complete description of S_SetMouseEvent  in 
  148.       this document. 
  149.       
  150.       Once  programmed,  the mouse driver monitors the  mouse  activity 
  151.       until one of the specified events occurs. It then interrupts your 
  152.       program   and   performs   a   far   call   to   the    procedure 
  153.       S_SetMouseFlags, passing the status of the mouse to your  program 
  154.       in  cpu registers. If you look at the  procedure  S_SetMouseFlags 
  155.       you  will see that it stores the cpu registers and set  a  global 
  156.       boolean variable "S_MouseEvent" to true.  
  157.       
  158.       It is important to understand that the mouse is always active  in 
  159.       the background, but THE MOUSE CURSOR WHEN SET TO VISIBLE IS  ONLY  
  160.       SEEN ON THE SCREEN WHILE TURBO SCREDIT IS WAITING FOR A KEY TO BE 
  161.       PRESSED. As soon as a key is pressed or a mouse event occurs, the 
  162.       mouse  cursor will disappear from the screen while Turbo  ScrEdit 
  163.       processes  the  keystroke.  As a rule Turbo  ScrEdit  handles  the 
  164.       keystroke quick enough that the mouse cursor appears to remain on 
  165.       the screen. 
  166.       
  167.       
  168.       
  169.       Compiler Directive to include/exclude mouse procedures.
  170.       -----------------------------------------------------------------
  171.       MOUSE
  172.           -------------------------------------------------------------
  173.           This compiler directive is used to determine if the  compiler 
  174.           will include the mouse procedures in the "C" object module or 
  175.           pascal unit created when the Turbo ScrEdit interface  modules 
  176.           are compiled. 
  177.       
  178.           Turbo Pascal:
  179.                At the beginning of the source file ScrEdit.Pas you will 
  180.                find:
  181.       
  182.                {$Define MOUSE}
  183.       
  184.           Turbo C:
  185.                Located in the global defines file "#defines.C"  
  186.                
  187.                #define MOUSE
  188.       
  189.       
  190.       
  191.       
  192.       
  193.       
  194.       
  195.       
  196.       
  197.       
  198.       
  199.                                   Page M-3
  200.       
  201.       Example of a PASCAL program using mouse calls:
  202.       ----------------------------------------------------------------
  203.       ==1>  uses Crt,Scredit,ScrMouse;
  204.             Begin
  205.             ClrScr;gotoxy(20,4);
  206.       
  207.       ==2>  If  Not S_MouseInstalled Then
  208.                 Begin
  209.                 WriteLn('Mouse Driver is not in memory!');Halt;
  210.                 End;
  211.       
  212.       ==3>  WriteLn('Mouse Driver is ACTIVE and has ',
  213.                      S_Buttons:1,' buttons.');
  214.       
  215.             Gotoxy(32,10);Writeln('Press ESC to end.');
  216.       
  217.       ==4>  S_ActivateMouse;
  218.       ==5>  S_SetMouseEvent('01111110');
  219.       ==6>  S_ShowMouse;
  220.       ==7>  S_SetMouseRange(10,6,70,9);
  221.       
  222.             Repeat
  223.               GoToxy(20,6);
  224.       ==8>    Write('Mouse Cursor Location.. Row:',
  225.                     S_MsRow:2,' Column:',S_MsCol:2);
  226.       
  227.               Gotoxy(10,8);
  228.       ==9>    If  S_MsLeftPressed Then       Write('[ Left Pressed     ]')
  229.       ==10>   Else If  S_MsLeftReleased Then Write('[ Left Released    ]')
  230.                    Else                      Write('[  *** Left ***    ]');
  231.       
  232.               Gotoxy(50,8);
  233.       ==11>   If  S_MsRightPressed Then       Write('[ Right Pressed    ]')
  234.       ==12>   Else If  S_MsRightReleased Then Write('[ Right Released   ]')
  235.                    Else                       Write('[  *** Right ***   ]');
  236.       
  237.               Gotoxy(30,8);
  238.       ==13>   If  S_MsMiddlePressed Then       Write('[ Middle Pressed   ]')
  239.       ==14>   Else If  S_MsMiddleReleased Then Write('[ Middle Released  ]')
  240.                    Else                        Write('[  *** Middle ***  ]');
  241.       
  242.       ==15>   S_ResetMouseFlags;
  243.               S_NextKey;
  244.       
  245.       ==16>   If  S_MouseEvent Then 
  246.       ==17>       S_AnalizeMouse;
  247.       
  248.       ==18>   If  S_F1 Then S_SetMouseCursor($00,$00,$07,$18);
  249.               If  S_F2 Then S_SetMouseCursor($77,$FF,$77,$00);
  250.       
  251.             Until S_Esc;
  252.       ==19> S_HideMouse;
  253.       ==20> S_DisableMouse;
  254.             End.
  255.       
  256.       
  257.       
  258.       
  259.       
  260.       
  261.       
  262.       
  263.       
  264.       
  265.                                   Page M-4
  266.       
  267.       
  268.       Example of a "C" program using mouse calls:
  269.       -----------------------------------------------------------------
  270.             #include <stdlib.h>
  271.             #include <conio.h>
  272.       ==1>  #include "scredit.h"
  273.       
  274.             void main()
  275.             {
  276.             clrscr();gotoxy(20,4);
  277.        
  278.       ==1>  S_Init();
  279.       
  280.       ==2>  if  (!S_MouseInstalled)
  281.                 {
  282.                 cprintf("Mouse Driver is not in memory!\n\c");exit(0);
  283.                 }
  284.        
  285.       ==3>  cprintf("Mouse Driver is ACTIVE and has %d buttons",
  286.                      S_Buttons);
  287.        
  288.             gotoxy(32,10);cprintf("Press ESC to end.");
  289.        
  290.       ==4>  S_ActivateMouse();
  291.       ==5>  S_SetMouseEvent("01111110");
  292.       ==6>  S_ShowMouse();
  293.       ==7>  S_SetMouseRange(10,6,70,9);
  294.       
  295.             while (!S_Esc)
  296.                {
  297.                gotoxy(20,6);
  298.       ==8>     cprintf("Mouse Cursor Location.. Row:%2d Column:%2d",
  299.                        S_MsRow,S_MsCol);
  300.        
  301.                gotoxy(10,8);
  302.       ==9>     if  (S_MsLeftPressed)         cprintf("[ Left Pressed  ]");
  303.       ==10>    else if  (S_MsLeftReleased)   cprintf("[ Left Released ]");
  304.                     else                     cprintf("[  *** Left *** ]");
  305.        
  306.                gotoxy(50,8);
  307.       ==11>    if  (S_MsRightPressed)        cprintf("[ Right Pressed ]");
  308.       ==12>    else if  (S_MsRightReleased)  cprintf("[ Right Released]"); 
  309.                     else                     cprintf("[  *** Right ***]");
  310.        
  311.                gotoxy(30,8);
  312.       ==13>    if  (S_MsMiddlePressed)       cprintf("[Middle Pressed ]");
  313.       ==14>    else if  (S_MsMiddleReleased) cprintf("[Middle Released]");
  314.                     else                     cprintf("[ *** Middle ***]");
  315.        
  316.       ==15>    S_ResetMouseFlags();
  317.                S_NextKey();
  318.        
  319.       ==16>    if  (S_Ms->MouseEvent) 
  320.       ==17>        S_AnalizeMouse();
  321.        
  322.       ==18>    if (S_F1)  S_SetMouseCursor(0x00,0x00,0x07,0x18);
  323.                if (S_F2)  S_SetMouseCursor(0x77,0xFF,0x77,0x00);
  324.                }
  325.       ==19> S_HideMouse();
  326.       ==20> S_DisableMouse();
  327.             } 
  328.        
  329.       
  330.       
  331.                                   Page M-5
  332.       
  333.       Global Variables and Constants.
  334.       -----------------------------------------------------------------
  335.       S_Buttons............ Program example ==3>
  336.                             (Integer)Indicates the number of buttons on 
  337.                             the mouse. This field receives a value when 
  338.                             mouse initialization is performed.
  339.       S_MouseInstalled..... Program example ==2>
  340.                             (Boolean) Indicates if the mouse driver was 
  341.                             found in memory during initialization.
  342.                             True  = Mouse driver is active in memory.
  343.                             False = Mouse drive is not in memory.
  344.       (Pascal) S_MouseEvent 
  345.       (C) S_Ms->MouseEvent. Program example ==16>
  346.                             (Boolean) Indicates to your program when  a 
  347.                             mouse     event    has    occurred.     See 
  348.                             S_AnalizeMouse  for further details on  how 
  349.                             to use this field. 
  350.       S_MsLeftPressed...... Program example ==9>
  351.                             (Boolean) True if the left mouse button has 
  352.                             been pressed.
  353.       S_MsLeftReleased..... Program example ==10>
  354.                             (Boolean) True if the left mouse button has 
  355.                             been released.
  356.       S_MsRightPressed..... Program example ==11>
  357.                             (Boolean)  True if the right  mouse  button 
  358.                             has been pressed.
  359.       S_MsRightReleased.... Program example ==12>
  360.                             (Boolean)  True if the right  mouse  button 
  361.                             has been released.
  362.       S_MsMiddlePressed.... Program example ==13>
  363.                             (Boolean)  True if the middle mouse  button 
  364.                             has been pressed.
  365.       S_MsMiddleReleased... Program example ==14>
  366.                             (Boolean)  True if the middle mouse  button 
  367.                             has been released.
  368.       S_MsCol   
  369.       S_MsRow.............. Program example ==8>
  370.                             These field have two uses:
  371.                             1 - First  to  returns the screen  row  and 
  372.                                 column  position  of the  mouse  cursor 
  373.                                 when   the  most  recent  mouse   event 
  374.                                 occurred.
  375.                             2 - To   specify  a  new  row  and   column 
  376.                                 position for the mouse cursor. See  the 
  377.                                 details for procedures S_ShowMouse  and 
  378.                                 S_MoveMouse.
  379.       
  380.       
  381.       
  382.       
  383.       
  384.       
  385.       
  386.       
  387.       
  388.       
  389.       
  390.       
  391.       
  392.       
  393.       
  394.       
  395.       
  396.       
  397.                                   Page M-6
  398.       
  399.       Initializing the mouse procedures. 
  400.       -----------------------------------------------------------------
  401.       It  is  important  the Turbo ScrEdit  Mouse  system  be  properly 
  402.       initialized  before  you attempt to use them.  Initialization  is 
  403.       different  depending  on the language that  you  are  programming 
  404.       with.
  405.            
  406.           Program example ==1>.
  407.       
  408.           Turbo Pascal:
  409.                Initialization  of the mouse unit is automatic when  the 
  410.                program is loaded.
  411.       
  412.           Turbo C:
  413.                Initialization  is  perform when  you  initialize  Turbo      
  414.                ScrEdit procedures using "S_Init()". As with using Turbo 
  415.                ScrEdit procedures you MUST PERFORM S_INIT() BEFORE  YOU 
  416.                ATTEMPT TO USE ANY MOUSE SUPPORT PROCEDURES. FAILURE  TO 
  417.                DO SO WILL RESULT IN UNPREDICTABLE RESULTS. The best way 
  418.                to  avoid problems is to perform S_Init() as one of  the 
  419.                first steps in a program.    
  420.                
  421.       
  422.       
  423.       
  424.       S_ActivateMouse
  425.       ----------------------------------------------------------------
  426.       Program example ==4>
  427.       
  428.       Function: Activates the mouse and re-establishes the most  recent 
  429.                 mouse event criteria
  430.                 (See S_SetMouseEvent for details on the EVENT HANDLER).
  431.       Remarks:  There  are two occasions during the execution  of  your 
  432.                 program that you will want to perform this procedure.
  433.                 1  -  Once  the mouse procedures have been  initialized 
  434.                       they  are ready to be used. However,  before  any 
  435.                       mouse  call  will render any  results  the  mouse 
  436.                       system must be activated. 
  437.                 2  -  Any  time after the S_DisableMouse procedure  has 
  438.                       been  used  that you wish to resume  mouse  event 
  439.                       processing. 
  440.                       (See S_DisableMouse and S_SetMouseEvent).
  441.       
  442.       Defined for Turbo C as:
  443.       
  444.                 void S_ActivateMouse()
  445.       
  446.       Defined for Turbo Pascal as:
  447.       
  448.                 Procedure S_ActivateMouse;
  449.       
  450.       Parameter description:
  451.       
  452.                 None.
  453.       
  454.       
  455.       
  456.       
  457.       
  458.       
  459.       
  460.       
  461.       
  462.       
  463.                                   Page M-7
  464.       
  465.       S_AnalizeMouse
  466.       ----------------------------------------------------------------
  467.       Program example ==17>
  468.       
  469.       Function:  Analyzes  the  register values stored  when  the  most 
  470.                  recent  mouse event occurred and sets global  variables 
  471.                  to reflect the status of the registers.
  472.       Remarks:   When a mouse event occurs, the mouse driver interrupts 
  473.                  your  program  by calling S_SetMouseFlags  and  passes  
  474.                  the  mouse status information to your program  in  cpu 
  475.                  registers.  S_SetMouseFlags stores the values  of  the 
  476.                  cpu   registers   and  sets   the   boolean   variable 
  477.                  S_MouseEvent  (S_Ms->MouseEvent for C) to  TRUE.  
  478.       
  479.                  At  any point in your program when S_MouseEvent  tests 
  480.                  TRUE  you can perform a call to S_AnalizeMouse and  it 
  481.                  will  examine the stored register values and  set  the 
  482.                  the  global boolean variables to indicate which  mouse 
  483.                  event  has  occurred. You can then examine  the  global 
  484.                  variables  to  see  if a button has  been  pressed  or 
  485.                  released,  and the current row and column position  of 
  486.                  the mouse cursor when the last event occurred. 
  487.       
  488.       ** NOTE ** It   is   important  to  understand  that  this   call 
  489.                  ACCUMULATES   button  status  information.  You   must 
  490.                  perform  the routine S_RestMouseFlags after  you  have 
  491.                  finished analyzing the mouse event to clear the button 
  492.                  indicators. 
  493.       
  494.                  See S_SetMouseEvent for details on the EVENT HANDLER.
  495.                  Also see S_ResetMouseFlags for more details.
  496.       
  497.                  Variables that are set by this procedure:
  498.                     S_MsRow          (returns current mouse cursor row) 
  499.                     S_MsCol          (returns current mouse cursor col)
  500.                     S_MsLeftPressed
  501.                     S_MsLeftReleased
  502.                     S_MsRightPressed
  503.                     S_MsRightReleased
  504.                     S_MsMiddlePressed
  505.                     S_MsMiddleReleased
  506.                     (Pascal) S_MouseEvent     (set to false)
  507.                     (C)      S_Ms->MouseEvent (set to false)  
  508.       
  509.       Defined for Turbo C as:
  510.       
  511.                 void S_AnalizeMouse(void)
  512.       
  513.       Defined for Turbo Pascal as:
  514.       
  515.                 Procedure S_AnalizeMouse;
  516.       
  517.       Parameter description:
  518.                     None.
  519.       
  520.       
  521.       
  522.       
  523.       
  524.       
  525.       
  526.       
  527.       
  528.       
  529.                                   Page M-8
  530.       
  531.       S_DisableMouse
  532.       ----------------------------------------------------------------
  533.       Program example ==19>
  534.       
  535.       Function: Disables the mouse functions.
  536.       Remarks:  When  this procedure is called the mouse status is  set 
  537.                 to invisible, the mouse is removed from the screen, the 
  538.                 mouse  event  handler is disabled. When  the  mouse  is 
  539.                 disabled  calling  other mouse routines  will  have  no 
  540.                 visible effect until the mouse is reactivated.
  541.       
  542.                 See  S_Activate mouse for details on  reactivating  the 
  543.                 mouse.  
  544.       
  545.                 *** IMPORTANT NOTE *** 
  546.       
  547.                 Turbo  "C" programmers.. It is very important  that  you 
  548.                 disable  the  mouse  driver before  your  program  ends 
  549.                 normally or otherwise. Failure to do so will leave  the 
  550.                 current  mouse  event  handler  active  in  memory  and 
  551.                 programmed  to respond when the specified  mouse  event 
  552.                 occurs.  The mouse driver will blindly call the  memory 
  553.                 address  that it is programmed to use. What ever  codes 
  554.                 are in memory it will try to execute.
  555.       
  556.                 IN   THE  EVENT  THAT  YOUR  PROGRAM  ENDS   ABNORMALLY  
  557.                 DURING TESTING, BE VERY CAREFUL NOT TO MOVE THE  MOUSE  
  558.                 OR PRESS ANY MOUSE BUTTONS.
  559.        
  560.                 Turbo  Pascal programmers.. Turbo Pascal has  facilities 
  561.                 used  by Turbo ScrEdit that handle disabling the  mouse 
  562.                 when the program ends normally or abnormally.  
  563.       
  564.       Defined for Turbo C as:
  565.       
  566.                 void S_AnalizeMouse(void)
  567.       
  568.       Defined for Turbo Pascal as:
  569.       
  570.                 Procedure S_AnalizeMouse;
  571.       
  572.       Parameter description:
  573.                     None.
  574.       
  575.       
  576.       
  577.       
  578.       
  579.       
  580.       
  581.       
  582.       
  583.       
  584.       
  585.       
  586.       
  587.       
  588.       
  589.       
  590.       
  591.       
  592.       
  593.       
  594.       
  595.                                   Page M-9
  596.       
  597.       
  598.       S_HideMouse
  599.       ----------------------------------------------------------------
  600.       Program example ==18>
  601.       
  602.       Function: Removes the mouse cursor from the screen.
  603.       Remarks:  This  procedure  causes  the  mouse  cursor  to  become 
  604.                 invisible on the screen.  Event though the mouse cursor 
  605.                 is  not visible on the screen it will still  move  when 
  606.                 the  mouse  is  moved, and all buttons  will  still  be 
  607.                 detected  and able to cause the mouse event  to  occur.  
  608.                 See   S_SetMouseEvent  and  S_AnalizeMouse  for    more 
  609.                 details on mouse event processing.
  610.       
  611.                 See S_ShowMouse for details on making the mouse cursor 
  612.                 visible on the screen.
  613.       
  614.       Defined for Turbo C as:
  615.       
  616.                 void S_HideMouse(void)
  617.       
  618.       Defined for Turbo Pascal as:
  619.       
  620.                 Procedure S_HideMouse;
  621.       
  622.       Parameter description:
  623.                 None.
  624.       
  625.       
  626.       
  627.       S_RemoveMouse
  628.       ----------------------------------------------------------------
  629.       Program example - None
  630.       
  631.       Function: Calls  function 2 of the mouse driver and  removes  the    
  632.                 mouse cursor from the screen.
  633.       Remarks:  This  procedure will remove the mouse cursor  from  the 
  634.                 screen.  If  you  use this call it will  be  when  your 
  635.                 program  has  used  your languages  I/O  procedures  to 
  636.                 interact with the user of the program and you are ready 
  637.                 to   resume   using  Turbo  ScrEdit   procedures.   See 
  638.                 S_RestoreMouse for more information.
  639.       
  640.                 You will not normally use this procedure. It is used by 
  641.                 Turbo ScrEdit in the S_GetKey routine. The mouse cursor 
  642.                 is only visible when Turbo ScrEdit is waiting for a key 
  643.                 to  be  pressed. Each time a key is pressed  the  mouse 
  644.                 will blink or disappear while Turbo ScrEdit handles the 
  645.                 key.  This  is  necessary  so  that  the  mouse  cursor 
  646.                 character does not get pulled into Turbo ScrEdit fields 
  647.                 and window backgrounds when video memory is read.
  648.       
  649.       Defined for C as:
  650.                 void S_RemoveMouse(void);
  651.       
  652.       Defined for Pascal as:
  653.                 Procedure S_RemoveMouse;
  654.       
  655.       Parameter description:
  656.                 None.
  657.       
  658.       
  659.       
  660.       
  661.                                   Page M-10
  662.       
  663.       
  664.       S_ResetMouse
  665.       ----------------------------------------------------------------
  666.       Program example - None.         
  667.       
  668.       Function: Calls function 0 of the mouse driver to reset the mouse 
  669.                 driver to its default initialized state. 
  670.       Remarks:  This procedure resets the mouse driver to its  original 
  671.                 initialized state. The mouse cursor is centered in  the 
  672.                 screen,  the event handler is reset, all button  status 
  673.                 flags are reset. 
  674.       
  675.                 Generally you will not need to use this procedure.
  676.       
  677.       
  678.       Defined for C as:
  679.       
  680.                 void S_ResetMouse(void);
  681.       
  682.       Defined for Pascal as:
  683.       
  684.                 Procedure S_ResetMouse;
  685.       
  686.       Parameter description:
  687.                 None.
  688.       
  689.       
  690.       
  691.       
  692.       S_ResetMouseFlags
  693.       ----------------------------------------------------------------
  694.       Program example ==15>
  695.       
  696.       Function: Sets  all  mouse  button status  boolean  variables  to 
  697.                 FALSE.
  698.       Remarks:  Resets S_MsLeftPressed
  699.                        S_MsLeftReleased
  700.                        S_MsRightPressed
  701.                        S_MsRightReleased
  702.                        S_MsMiddlePressed
  703.                        S_MsMiddleReleased
  704.       
  705.       Defined for C as:
  706.       
  707.                void S_ResetMouseFlags(void);
  708.       
  709.       Defined for Pascal as:
  710.       
  711.                Procedure S_ResetMouseFlags;
  712.       
  713.       Parameter description:
  714.       
  715.                None.
  716.       
  717.       
  718.       
  719.       
  720.       
  721.       
  722.       
  723.       
  724.       
  725.       
  726.       
  727.                                   Page M-11
  728.       
  729.       
  730.       S_RestoreMouse
  731.       ----------------------------------------------------------------
  732.       Program example - None.
  733.       
  734.       Function: Calls  function  1 of the mouse driver  and  makes  the    
  735.                 mouse cursor visible on the screen.
  736.       Remarks:  Use this procedure when you wish have the mouse  cursor 
  737.                 visible  while using you language's screen and  keyboard 
  738.                 I/O  procedures (such as readln, writeln,  readkey,  or 
  739.                 printf, scanf, bioskey, ect) to interact with the  user 
  740.                 of  your program. See S_RemoveMouse for  directions  on 
  741.                 removing  the mouse cursor before resuming the  use  of 
  742.                 Turbo ScrEdit procedures.
  743.       
  744.                 Normally You will not use this procedure. It is used by 
  745.                 Turbo ScrEdit in the S_GetKey routine. The mouse cursor 
  746.                 is only visible when Turbo ScrEdit is waiting for a key 
  747.                 to  be  pressed. Each time a key is pressed  the  mouse 
  748.                 will blink or disappear while Turbo ScrEdit handles the 
  749.                 key.  This  is  necessary  so  that  the  mouse  cursor 
  750.                 character  does  not  get pulled in  to  Turbo  ScrEdit 
  751.                 fields and window backgrounds. 
  752.       
  753.       
  754.       Defined for Turbo C as:
  755.       
  756.                     void S_RestoreMouse(void);
  757.       
  758.       Defined for Turbo Pascal as:
  759.       
  760.                     Procedure S_RestoreMouse;
  761.       
  762.       Parameter description:
  763.                     None.
  764.       
  765.       
  766.       
  767.       
  768.       
  769.       
  770.       
  771.       
  772.       
  773.       
  774.       
  775.       
  776.       
  777.       
  778.       
  779.       
  780.       
  781.       
  782.       
  783.       
  784.       
  785.       
  786.       
  787.       
  788.       
  789.       
  790.       
  791.       
  792.       
  793.                                   Page M-12
  794.       
  795.       
  796.       S_SetMouseCursor
  797.       ----------------------------------------------------------------
  798.       Program example ==18>
  799.       Function: Calls  function  10 of the mouse driver  and  sets  the 
  800.                 appearance and attributes  of the mouse cursor.
  801.       Remarks:  This procedure allows you to change the mouse cursor to 
  802.                 suit   your  needs.  When  the  mouse  procedures   are 
  803.                 initialized the mouse cursor is defined as a light gray 
  804.                 arrow (ASCII char 18 hex) on a black background.  Using 
  805.                 this  procedure you may change the cursor to any  ASCII 
  806.                 character   on  any  combination  of   background   and 
  807.                 foreground colors. See examples for more details.
  808.       
  809.       
  810.       Defined for Turbo C as:
  811.       
  812.                void S_SetMouseCursor(unsigned char mask1L,
  813.                                      unsigned char mask1H,
  814.                                      unsigned char mask2L,
  815.                                      unsigned char mask2H)                          
  816.                Additional Example of usage:
  817.                   {set light gray arrow on black background}
  818.                   S_SetMouseCursor(0X00,0X00,0X07,0X18);
  819.                   {set to translucent block cursor}
  820.                   S_SetMouseCursor(0X77,0XFF,0X77,0X00);
  821.       
  822.       Defined for Turbo Pascal as:
  823.       
  824.                Procedure S_SetMouseCursor(Mask1L,
  825.                                           Mask1H,
  826.                                           Mask2L,
  827.                                           Mask2H:Byte);
  828.                Additional Example of usage:
  829.                   {set light gray arrow on black background}
  830.                   S_SetMouseCursor($00,$00,$07,$18);
  831.                   {set to translucent block cursor}
  832.                   S_SetMouseCursor($77,$FF,$77,$00);
  833.       
  834.       Parameter description:
  835.                   
  836.                The  mouse driver uses two software cursor masks,  MASK1 
  837.                the  screen mask, and MASK2 the cursor mask, to  control 
  838.                the appearance of the cursor on the screen. Each mask is 
  839.                divided  into the high and low order bytes, thus  Mask1L 
  840.                and Mask1H, and Mask2L and Mask2H.
  841.       
  842.                For use in text mode, you will usually pass zero  values 
  843.                in mask1 (see examples.)
  844.       
  845.                Mask2 is used to specify the cursor character and color:
  846.                Mask2L - specifies the color of the cursor character in 
  847.                         the format of $BF (Pascal) 0xFB (C):
  848.                         Where 'F' is a foreground color code 0 - 7 
  849.                         and   'B' is a background color code 0 - F
  850.                Mask2H - specifies the ASCII character to be used as the
  851.                         cursor character.
  852.                         Where $18 (0x18) is the up arrow character.
  853.                               $02 (0x02) is an inverse smiley face.
  854.                               $40 (0x40) is an @ sign.        
  855.       
  856.       
  857.       
  858.       
  859.                                   Page M-13
  860.       
  861.       
  862.       S_SetMouseEvent
  863.       ----------------------------------------------------------------
  864.       Program example ==5>
  865.       
  866.       Function: Calls function 12 of the mouse driver and programs  the 
  867.                 event task that the mouse will monitor for. 
  868.       Remarks:  This  procedure is used to tell the mouse  driver  what 
  869.                 mouse  activity you want reported to your program.  The 
  870.                 global  variable  S_MouseEvent  in  pascal,  or   
  871.                 S_Ms->MouseEvent  in C will test TRUE when one  of  the 
  872.                 requested events has occurred. 
  873.       
  874.                 When  S_Ms->MouseEvent tests true, call  the  procedure 
  875.                 S_AnalizeMouse  to  set the global program  flags  that 
  876.                 indicate the action or actions that triggered the mouse 
  877.                 event. 
  878.       
  879.       Defined for Turbo C as:
  880.       
  881.                void S_SetMouseCursor(char *Bits);
  882.       
  883.       Defined for Turbo Pascal as:
  884.       
  885.                Procedure S_RemoveMouse(Bits:S_Str8);
  886.       
  887.       Parameter description:
  888.                   
  889.                This  procedure accepts a string of 8 characters  as  an 
  890.                argument. Each of the 8 characters represents a bit in a 
  891.                mask that is passed to the mouse driver to tell it  what 
  892.                mouse actions are to trigger an event:
  893.       
  894.                Position    1 = Monitor for cursor movement
  895.                            2 = Monitor for LEFT button pressed.
  896.                            3 = Monitor for LEFT button released.
  897.                            4 = Monitor for RIGHT button pressed.
  898.                            5 = Monitor for RIGHT button released.
  899.                            6 = Monitor for MIDDLE button pressed.
  900.                            7 = Monitor for MIDDLE button released.
  901.                            8 = not used.
  902.       
  903.                Coding a '1' in any of the 8 positions of the mask  will 
  904.                set  monitoring for the corresponding mouse action.  Any 
  905.                character  in the mask other than a "1" sets  monitoring 
  906.                for the corresponding function to passive. 
  907.       
  908.                ** VERY IMPORTANT NOTE FOR C USERS ** 
  909.                During initialization the mouse event handler is  passed 
  910.                the  address  of  a procedure  in  the  mouse  interface 
  911.                module.  The mouse driver does not check to see  if  the 
  912.                address  it  has is a valid address or  not,  it  simply 
  913.                performs  a far call to the stored address any time  one 
  914.                of the requested mouse events occur. 
  915.       
  916.                If  your program ends abnormally before you can  perform 
  917.                the  procedure  S_DisableMouse, the  mouse  driver  will 
  918.                continue  to  monitor for an  event.  Consequently  your 
  919.       
  920.       
  921.       
  922.       
  923.       
  924.       
  925.                                       Page M-14
  926.       
  927.       
  928.                computer  can  hang if a mouse event occurs  after  your 
  929.                program  is  terminated and some  other  application  is 
  930.                loaded into memory. 
  931.       
  932.                To avoid this problem, always perform S_DisableMouse  at 
  933.                the  end  of your program. This routine sets  the  mouse 
  934.                event  handler  to monitor for '0000000'  events.  While 
  935.                testing a program you may want to keep a program  around 
  936.                that simply calls S_ActivateMouse followed by a call  to 
  937.                S_DisableMouse.
  938.       
  939.       
  940.       
  941.       S_SetMouseRange
  942.       ----------------------------------------------------------------
  943.       Program example ==7>
  944.       
  945.       Function: Calls function 7 and 8 of the mouse driver and sets the 
  946.                 row and column ranges for mouse cursor movement.
  947.       
  948.       Remarks: Use this procedure to "fence in" the mouse curser.  This 
  949.                procedure establishes a window that the mouse cursor can 
  950.                move  around in. Once established the mouse cursor  will 
  951.                not  move  beyond the borders of the area defined.
  952.       
  953.       Defined for Turbo C as:
  954.       
  955.                void S_SetMouseCursor(unsigned char TopCol,
  956.                                      unsigned char TopRow,
  957.                                      unsigned char BotCol,
  958.                                      unsigned char BotRow)                          
  959.       
  960.       
  961.       Defined for Turbo Pascal as:
  962.       
  963.                Procedure S_RemoveMouse(Top_Col,
  964.                                        Top_Row,
  965.                                        Top_Col,
  966.                                        Top_Row:Byte);
  967.       
  968.       Parameter description:
  969.       
  970.                TopCol -  An integer value in the range of 1 to 80  that 
  971.                          specifies  the top Left Column of the area  of 
  972.                          the  screen that the mouse is to  be  confined 
  973.                          to.
  974.       
  975.                TopRow -  An integer value in the range of 1 to 25  that 
  976.                          specifies the top left row of the area of  the 
  977.                          screen that the mouse is to be confined to. 
  978.       
  979.                BotCol -  An integer value in the range of 1 to 80  that 
  980.                          specifies the bottom right column of the  area 
  981.                          of the screen that the mouse is to be confined 
  982.                          to. 
  983.       
  984.                BotRow -  An integer value in the range of 1 to 25  that 
  985.                          specifies the bottom right row of the area  of 
  986.                          the  screen that the mouse is to  be  confined 
  987.                          to. 
  988.       
  989.       
  990.       
  991.                                      Page M-15
  992.       
  993.       
  994.       S_ShowMouse
  995.       ----------------------------------------------------------------
  996.       Program example ==6>
  997.       
  998.       Function: Moves the mouse cursor to the row and column specified 
  999.                 in  S_MsRow  and S_MsCol, and makes  the  mouse  cursor 
  1000.                 visible on the screen.
  1001.       Remarks:  It  is  important to understand that the  mouse  cursor 
  1002.                 will only be visible on the screen while Turbo  ScrEdit 
  1003.                 is  waiting for a key to be pressed. As soon as  a  key 
  1004.                 stroke  is detected, the mouse cursor is  removed  from 
  1005.                 the screen. 
  1006.                 This procedure has two functions.
  1007.                 1  - It sets the status of the mouse to 'visible' so it     
  1008.                      will   be  displayed  during  the  next  call   to 
  1009.                      S_GetKey. 
  1010.                 2 -  The  mouse cursor is moved to the row  and  column     
  1011.                      coordinates specified by S_MsRow and S_MsCol.
  1012.       
  1013.                 See S_HideMouse for details on how to set the mouse 
  1014.                 status to 'invisible.
  1015.       
  1016.       Defined for Turbo C as:
  1017.       
  1018.                 void S_ShowMouse(void)
  1019.       
  1020.       Defined for Turbo Pascal as:
  1021.       
  1022.                Procedure S_ShowMouse;
  1023.       
  1024.       Parameter description:
  1025.