home *** CD-ROM | disk | FTP | other *** search
/ Point Programming 1 / PPROG1.ISO / pascal / gtmouse / gtmouse.doc < prev    next >
Encoding:
Text File  |  1993-02-27  |  7.4 KB  |  241 lines

  1. Introduction.
  2.  
  3. GTMOUSE.TPU is a TURBO Pascal 6.0 & 7.0 Unit for mouse handling.
  4. GTMouse is not a mouse driver, it works over any standard mouse
  5. driver.  If included it converts standard block mouse cursor in
  6. smoothly moving across the screen arrow-like mouse cursor in
  7. TEXT MODE of video adapter. This is similar to Norton Utilities
  8. 6.0, PCTools 7.0 and some others programs.  GTMouse will make
  9. your application program much more attractive and professionally
  10. looking. This is possible only for EGA or VGA adapters, it don't
  11. do anything on others adapters.
  12.  
  13. Initially developed for Borland's Turbo Vision package, it may
  14. be used with various TP mouse drivers, such as TurboPower
  15. Software's Object Professional, IdSoft D&M's MouseLib and
  16. others.
  17.  
  18. File List.
  19.  
  20. This package contains the following files.
  21.  
  22. GTMOUSE.TPU   - TP 6.0 unit
  23. GTMOUSE7.TPU  - TP 7.0 unit
  24. GTMOUSE.DOC   - This file
  25. GTMOUSE.WRI   - the same as GTMOUSE.DOC but in Windows 3.1 Write format
  26. GTMOUSE.TXT   - Interface section of GTMouse.TPU
  27. GTMOUSE.REG   - Registration File.
  28.  
  29. TVBDEMO.PAS   - Simple Turbo Vision sample program with
  30. TVBDEMO.EXE     GTMouse included.  Slow modification of Borland's
  31.                 TVGUID14.PAS.
  32.  
  33. LIBDEMO.PAS   - MouseLib 6.0 sample with GTMouse included
  34. LIBDEMO.EXE
  35.  
  36. OPDEMO.PAS    - Object Professional Mouse sample with GTMouse included
  37. OPDEMO.EXE
  38.  
  39. 1. Usage of GTMouse.
  40.  
  41. Simply copy GTMOUSE.TPU file in your TPU direction and include
  42. GTMouse in use clause of your program
  43.  
  44.    uses GTMouse,...{any others TPUs};
  45.  
  46. ATTENTION. The GTMouse must be the FIRST used TPU of program.
  47. More accuratly it must precede any TP mouse driver (such as
  48. Drivers of Turbo Vision package).
  49.  
  50. Now recompile and run your program. You will see the arrow-like
  51. mouse cursor  which is smoothly moving over the screen and
  52. changing with pushing of any mouse button.  Besides this the
  53. behavior of your program doesn't have to change.
  54.  
  55. You can use GTMouse  without any additional calls, but they can
  56. improve your program.
  57.  
  58. 1.1 'Smoothness' improving.
  59.  
  60. With mouse movements GTMouse dynamicaly changes the form of four
  61. adjacent to mouse position symbols applying the arrow cursor
  62. image to them.  This takes place at any timer tick (aproximatly
  63. 18 times per second). To make the cursor movement more smooth
  64. include
  65.  
  66.      DrawArrow;
  67.  
  68. in any event waiting cycle of your program.
  69.  
  70. With TURBO VISION.
  71.  
  72. There are various possible points in Turbo Vision program. Two
  73. of them:
  74.  
  75. - use Idle method
  76.  
  77.    program MyProgram;
  78.    uses GTMouse, Drivers, Views, ...
  79.    .....
  80.    procedure TMyApp.Idle;
  81.    begin
  82.       TApplication.Idle;
  83.       DrawArrow;
  84.    end;
  85.    .....
  86.  
  87. - include it in Event handler
  88.  
  89.    program MyProgram;
  90.    uses GTMouse, Drivers, Views, ...
  91.    .....
  92.    procedure TMyApplication.HandleEvent(var Event: TEvent);
  93.    begin
  94.      TApplication.HandleEvent(Event);
  95.      if Event.What=evCommand then
  96.      begin
  97.        .....
  98.      end;
  99.      DrawArrow;
  100.    end;
  101.  
  102. 1.2 Mouse Cursor Form Changing.
  103.  
  104. GTMouse contains some predefined mouse cursor images.There are
  105. two procedures to select mouse cursor image
  106.  
  107.    SelectNotPressedImage(nmImage:ImageNames);
  108.    SelectPressedImage(nmImage:ImageNames);
  109.  
  110. for notpressed and pressed mouse button respectevly.  Moreover
  111. you can make your own image and connect it with any ImageName by
  112. procedure
  113.  
  114.    LinkUserImageWith(nmImage:ImageNames,MyArrow:ImageArray);
  115.  
  116. where ImageArray = array[0..15] of byte.  Example of Cursor 
  117. Image:
  118.  
  119. Byte      BitMap        MyArrow
  120.   0      00000000         $00
  121.   1      01000000         $40
  122.   2      01100000         $60
  123.   3      01110000         $70
  124.   4      01111000         $78
  125.   5      01111100         $7c
  126.   6      01111110         $7e
  127.   7      01111000         $78
  128.   8      01101100         $6c
  129.   9      01001100         $4c
  130.  10      00001100         $0c
  131.  11      00001100         $0c
  132.  12      00000000         $00
  133.  13      00000000         $00
  134.  14      00000000         $00
  135.  15      00000000         $00
  136.  
  137.  
  138. 1.3 Activate and deactivate GTMouse.
  139.  
  140. There are two procedures
  141.  
  142.        DoneGTMouse;
  143.        InitGTMouse;
  144.  
  145. to deactivate and reactivate GTMouse respectively.
  146.  
  147. If your program use COMMAND.COM to start other programs or run
  148. DOS shell you must deactivate GTMouse before this and reactivate
  149. it after
  150.  
  151.    . . . .
  152.    DoneGTMouse; {Deactivate GTMouse}
  153.    SwapVectors;
  154.    Exec(GetEnv('COMSPEC'),...);
  155.    SwapVectors;
  156.    InitGTMouse; {Reactivate GTMouse}
  157.    . . . .
  158. At the program begining GTMouse activates automatically.
  159.  
  160. 1.4 Reserved symbols.
  161.  
  162. If you are using GTMouse there are eight symbols (from 256
  163. possible) which cann't be used to screen output. These symbols
  164. reserved by GTMouse to dynamically redefine their views to form
  165. graphics mouse cursor. By default they are (#01, #02, #03, #04,
  166. #208, #209, #215, #216). To replace them with any others use
  167.  
  168.       ChangeCursorArray(var mArray);
  169.  
  170. where parameter is array[1..8] of chars. Last four charaters
  171. must be in pseudo graphics range ($c0..$df), first four must not
  172. be in this range. Last demand connected with VGA peculiarities
  173. in text mode.
  174.  
  175. 2. About samples.
  176.  
  177. TVBDEMO.EXE is not a special GTMouse sample, it is slightly
  178. modified Turbo Vision Guide example TVGUID14.PAS.  Besides
  179. GTMouse we include only the possibility to change mouse cursor
  180. form (with Alt-H key or from status line).  You can look also
  181. the modified windows and buttons views, to compare compile and
  182. run TVBDEMO.PAS with your compiler and Turbo Vision TPU's. This
  183. TVBDEMO.EXE has been compiled with our own version of
  184. TurboVision TPU's,  all registered users of GTMouse can obtain
  185. them on special request.
  186.  
  187. Others samples illustrate the technique of GTMouse usage with
  188. Object Professional and MouseLib packages. The main advise is to
  189. avoid any screen changes with active mouse cursor, so your code
  190. must be something about
  191.  
  192.    . . . . .
  193.    HideMouse; {call to hide mouse in your mouse driver}
  194.    {Any screen changing code}
  195.    ShowMouse;
  196.    . . . .
  197.  
  198. 3. Some recomendations.
  199.  
  200. - deactivate GTMouse when use internal debugger of Turbo Pascal IDE;
  201.  
  202. - deactivate GTMouse before any videomode change. GTMouse works
  203. with various screen text modes, simply reactivate it after mode
  204. changing.
  205. Important. Deactivate GTMouse in graphics modes.
  206.  
  207. 4. Registration.
  208.  
  209. The Graphic mouse cursor in Text mode unit (GTMouse) is provided
  210. on 'as is' basis without warranty of any kind, expessed or
  211. implied. The person using the software bears all risk as to the
  212. quality and performance of the software.
  213.  
  214. We will try to extend our support to unregistrered users during
  215. their evaluation period, however we reserve the right to limit
  216. our support for unregistered users if their requests become
  217. taxing for us. For registered users the support is unlimited.
  218. Questions and any comments on this unit can be sended to us via
  219. E-Mail addresses
  220.  
  221. evsikov@lcta5.jinr.dubna.su or
  222. sychov@jinr.dubna.su
  223.  
  224. If you like this unit and continue to use it  - registrate it. A
  225. registration fee is only US$10.0 for non-profit usage and
  226. US$30.0 otherwise.  Registered users can obtain source code and
  227. modified TurboVision TPU's on request.
  228.  
  229. Please mail your registration form (see GTMOUSE.REG) and enclose
  230. CASH (we have problems with any other payment forms in Russia)
  231. to
  232.  
  233. Igor Evsikov
  234. LCTA, Joint Institute for Nuclear Research, (Dubna)
  235. PO Box 79, Head Post Office
  236. 101000 Moscow  Russia
  237.  
  238. Please send E-mail message when you mail your registration form !!
  239.  
  240. Dubna, March 1 1993.
  241.