home *** CD-ROM | disk | FTP | other *** search
/ Really Useful CD 1 / ReallyUsefulCD1.iso / extras / progutils / baslib / baslibdoc / mouselib < prev    next >
Encoding:
Text File  |  1989-03-15  |  5.0 KB  |  167 lines

  1. Routine   : PROCmouse_wait(n)      
  2. Library   : MouseLib
  3. Purpose   : Waits for a specific button or group 
  4.             of buttons to be pressed.
  5. Source    : Risc User October 1988 Page 47
  6. Author    : Lee Calcraft
  7. Parameters:
  8.    n        = a real number between 0 and 7
  9. Dependant Routines:
  10.    None
  11. Global Variables: 
  12.    wx       = x coordinate when button(s) were 
  13.               pressed
  14.    wy       = y coordinate when button(s) were 
  15.               pressed
  16.    wz       = button(s) pressed
  17. Notes: 
  18.    If the routine is called with n=0 then the 
  19.    program will pause until the mouse buffer is 
  20.    clear. Buttons are detected by bit value, i.e 
  21.    adjust is 1, menu is 2 and select is 4. 
  22.    Therefore to detect a condition of all three 
  23.    being pressed at the same time the routine 
  24.    call would be PROCmouse_wait(7). Any button can 
  25.    be detected with PROCmouse_wait(TRUE). 
  26. Routine   : PROCmouse_rectangle(l%,b%,w%,h%)
  27. Library   : MouseLib
  28. Purpose   : Constrains the pointer within the 
  29.             specified area of the screen
  30. Source    : Acorn User Sep 88
  31. Author    : Chris Adie
  32. Parameters:
  33.    l%       : min x ordinate of rectangle
  34.    b%       : min y ordinate of rectangle
  35.    w%       : width of rectangle
  36.    h%       : height of rectangle
  37. Dependant Routines:
  38.    None
  39. Global Variables:
  40.    mouseminx%       : =l%
  41.    mouseminy%       : =b%
  42.    mousewidth%      : =w%
  43.    mouseheight%     : =h%
  44. Notes: 
  45.    The global variables allow the resetting of the 
  46.    mouse pointer after calling PROCcreatealert() 
  47.    to the original values. Ordinates are as 
  48.    the MOUSE RECTANGLE command, i.e. bottom left 
  49.    corner x and y plus width and height in graphic 
  50.    units.
  51. Routine   : PROCmouse_loadpointer(mousedata,file$)      
  52. Library   : MouseLib
  53. Purpose   : Loads a new mouse pointer definition 
  54. Source    : Risc User October 1988 Page 14
  55. Author    : Barry Christie
  56. Parameters:
  57.    mousedata   = the address of a 400 byte 
  58.                  parameter block
  59.    file$       = filename of the pointer 
  60.                  definition
  61. Dependant Routines:
  62.    None
  63. Global Variables: 
  64.    None 
  65. Notes: 
  66.    No checks are made to ensure that the pointer 
  67.    file exists. To actually display the new 
  68.    pointer call 
  69.    PROCmouse_switchpointer(mousedata,nr) and then 
  70.    use the command MOUSE ON (nr). It is assumed 
  71.    that the Risc User Pointer Editor has been used 
  72.    to create the file.
  73. Routine   : PROCtest_mouse_loadpointer
  74. Library   : MouseLib
  75. Purpose   : Demonstrates the use of 
  76.             PROCmouse_loadpointer
  77. Source    : Risc User October 1988 Page 14
  78. Author    : Barry Christie
  79. Parameters:
  80.    None 
  81. Dependant Routines:
  82.    PROCmouse_loadpointer(blk%,file$)
  83.    PROCmouse_switchpointer(blk%,nr)
  84. Global Variables: 
  85.    mousedata 
  86. Notes: 
  87.    None
  88. Routine   : PROCmouse_switchpointer
  89. Library   : MouseLib
  90. Purpose   : Changes the pointer shape
  91. Source    : Risc User October 1988 Page 14
  92. Author    : Barry Christie
  93. Parameters:
  94.    None 
  95. Dependant Routines:
  96.    PROCmouse_loadpointer(blk%,file$)
  97. Global Variables: 
  98.    None 
  99. Notes: 
  100.    The parameter block must have been set up using 
  101.    PROCmouse_loadpointer() beforehand. To make the 
  102.    new pointer shape appear MOUSE ON (nr) must be 
  103.    used. Up to 4 different shapes may be resident 
  104.    at any one time, although in this case 4 
  105.    parameter blocks would be required. 
  106.    Alternatively one block could be used and the 
  107.    definitions loaded as required.
  108. Routine   : PROCmouse_dynabox(bx,by,cx,cy)
  109. Library   : MouseLib
  110. Purpose   : Creates a 'dynamic box' on the 
  111.             screen which may be moved and 
  112.             resized using the mouse 
  113. Source    : Risc User October 1988 Page 32
  114. Author    : Barry Christie & Lee Calcraft
  115. Parameters:
  116.    bx     = initial min x coordinate of the box
  117.    by     = initial min y coordinate of the box
  118.    cx     = initial max x coordinate of the box
  119.    cy     = initial max y coordinate of the box 
  120. Dependant Routines:
  121.    PROCmouse_wait(n)
  122.    PROCboxit(mx,my,dx,dy,but1,but2,but3,base)
  123.    PROCmsquare
  124. Global Variables: 
  125.    Not checked!
  126. Notes
  127.    None
  128. Routine   : PROCtest_mouse_dynabox
  129. Library   : MouseLib
  130. Purpose   : Demonstrates the use of 
  131.             PROCmouse_dynabox 
  132. Source    : Risc User October 1988 Page 32
  133. Author    : Barry Christie & Lee Calcraft
  134. Parameters:
  135.    None
  136. Dependant Routines:
  137.    PROCmouse_wait(n)
  138.    PROCmouse_dynabox(bx,by,cx,cy)
  139. Global Variables:
  140.    Not checked! 
  141. Notes: 
  142.    None
  143. Routine   : FNmouse_checkrectangle(mx,my,destx, 
  144.             desty,destw,desth)
  145. Library   : MouseLib
  146. Purpose   : Returns TRUE if the mouse pointer is 
  147.             within the specified rectangle. 
  148. Source    : Risc User October 1988 Page 46
  149. Author    : David Spencer
  150. Parameters:
  151.    mx       = mouse x coordinate
  152.    my       = mouse y coordinate
  153.    destx    = min x of rectangle
  154.    desty    = min y of rectangle
  155.    destw    = width of rectangle
  156.    desth    = height of rectangle
  157. Dependant Routines:
  158.    None
  159. Global Variables:
  160.    None 
  161. Notes: 
  162.    The routine returns TRUE if the mouse ordinates 
  163.    given are within the specified rectangle, else 
  164.    it returns FALSE. This is useful for non-WIMP 
  165.    programs which are imitating icons.
  166.  
  167.