home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / pascal / library / dos / tvision / gtmous / gtmouse.doc < prev    next >
Encoding:
Text File  |  1993-09-30  |  6.9 KB  |  222 lines

  1. Introduction.
  2.  
  3. GTMOUSE is a Borland 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. News in version 1.4.
  19.  
  20. - External Sleeper unit is included.
  21.  
  22. File List.
  23.  
  24. This package contains the following files.
  25.  
  26. GTMOUSE6.TPU  - TP 6.0 unit (rename to GTMOUSE.TPU)
  27. GTMOUSE.TPU   - TP 7.0 unit
  28. GTMOUSE.TPP   - BP 7.0 protected mode unit
  29. GTMOUSE.DOC   - this file
  30. GTMOUSE.TXT   - interface section of GTMouse.TPU
  31. GTMOUSE.REG   - registration File.
  32. DARK.PAS      - sleepre unit source
  33.  
  34. TVBDEMO.PAS   - simple Turbo Vision sample program with
  35. TVBDEMO.EXE     GTMouse included.  Slow modification of Borland's
  36.                 TVGUID14.PAS.
  37.  
  38. OPDEMO.PAS    - Object Professional Mouse sample with GTMouse included
  39. OPDEMO.EXE
  40.  
  41. 1. Usage of GTMouse.
  42.  
  43. Simply copy GTMOUSE.TPU file in your TPU direction and include
  44. GTMouse in use clause of your program
  45.  
  46.    uses GTMouse,...{any others TPUs};
  47.  
  48. ATTENTION. The GTMouse must be the FIRST used TPU of program.
  49. More accuratly it must precede any TP mouse driver (such as
  50. Drivers of Turbo Vision package).
  51.  
  52. Now recompile and run your program. You will see the arrow-like
  53. mouse cursor  which is smoothly moving over the screen and
  54. changing with pushing of any mouse button.  Besides this the
  55. behavior of your program doesn't have to change.
  56.  
  57. You can use GTMouse  without any additional calls, but they can
  58. improve your program.
  59.  
  60. 1.1 Mouse Cursor Form Changing.
  61.  
  62. GTMouse contains some predefined mouse cursor images.There are
  63. two procedures to select mouse cursor image
  64.  
  65.    SelectNotPressedImage(nmImage:ImageNames);
  66.    SelectPressedImage(nmImage:ImageNames);
  67.  
  68. for notpressed and pressed mouse button respectevly.  Moreover
  69. you can make your own image and connect it with any ImageName by
  70. procedure
  71.  
  72.    LinkUserImageWith(nmImage:ImageNames,MyArrow:ImageArray);
  73.  
  74. where ImageArray = array[0..15] of byte.  Example of Cursor
  75. Image:
  76.  
  77. Byte      BitMap        MyArrow
  78.   0      00000000         $00
  79.   1      01000000         $40
  80.   2      01100000         $60
  81.   3      01110000         $70
  82.   4      01111000         $78
  83.   5      01111100         $7c
  84.   6      01111110         $7e
  85.   7      01111000         $78
  86.   8      01101100         $6c
  87.   9      01001100         $4c
  88.  10      00001100         $0c
  89.  11      00001100         $0c
  90.  12      00000000         $00
  91.  13      00000000         $00
  92.  14      00000000         $00
  93.  15      00000000         $00
  94.  
  95.  
  96. 1.2 Activate and deactivate GTMouse.
  97.  
  98. There are two procedures
  99.  
  100.        DoneGTMouse;
  101.        InitGTMouse;
  102.  
  103. to deactivate and reactivate GTMouse respectively.
  104.  
  105. If your program use COMMAND.COM to start other programs or run
  106. DOS shell you must deactivate GTMouse before this and reactivate
  107. it after
  108.  
  109.    . . . .
  110.    DoneGTMouse; {Deactivate GTMouse}
  111.    SwapVectors;
  112.    Exec(GetEnv('COMSPEC'),...);
  113.    SwapVectors;
  114.    InitGTMouse; {Reactivate GTMouse}
  115.    . . . .
  116. At the program begining GTMouse activates automatically.
  117.  
  118. 1.3 Reserved symbols.
  119.  
  120. If you are using GTMouse there are eight symbols (from 256
  121. possible) which cann't be used to screen output. These symbols
  122. reserved by GTMouse to dynamically redefine their views to form
  123. graphics mouse cursor. By default they are (#01, #02, #03, #04,
  124. #208, #209, #215, #216). To replace them with any others use
  125.  
  126.       ChangeCursorArray(var mArray);
  127.  
  128. where parameter is array[1..8] of chars. Last four characters
  129. must be in pseudo graphics range ($c0..$df), first four must not
  130. be in this range. Last demand connected with VGA peculiarities
  131. in text mode.
  132.  
  133. 1.4 External Sleeper.
  134.  
  135. Include Dark.TPU in use clause of your program
  136.  
  137.    uses GTMouse, Dark, ...{any others TPUs};
  138.  
  139. Sleeper activates automatically with default params. You can
  140. reactivate it at any moment with
  141.  
  142.    InitSleeper(SlepType,nWaitTime,xUpLeft,yUpLeft,xDnRight,yDnRigth);
  143.  
  144. where
  145.    SleepType - 0..4 type of sleeping screen.
  146.    nWaitTime is a no-event waiting time to sleep (in seconds),
  147.    other params - screen region in which the occurance of mouse
  148.    cursor cause the "sleeping" of program.
  149. The default is
  150.  
  151.       InitSleeper(4,30,80,1,80,1);
  152.  
  153. You must include procedure call
  154.  
  155.       Sleeper;
  156.  
  157. in any event waiting cycle of your program.
  158.  
  159. To deactivate sleeper simply set variable SleepOn to FALSE.
  160.  
  161.  
  162. 2. About samples.
  163.  
  164. TVBDEMO.EXE is not a special GTMouse sample, it is slightly
  165. modified Turbo Vision Guide example TVGUID14.PAS.  Besides
  166. GTMouse we include only the possibility to change mouse cursor
  167. form (with Alt-H key or from status line).  You can look also
  168. the modified windows and buttons views, to compare compile and
  169. run TVBDEMO.PAS with your compiler and Turbo Vision TPU's. This
  170. TVBDEMO.EXE has been compiled with our own version of
  171. TurboVision TPU's,  all registered users of GTMouse can obtain
  172. them on special request.
  173.  
  174. Others samples illustrate the technique of GTMouse usage with
  175. Object Professional and MouseLib packages. The main advise is to
  176. avoid any screen SCROLLs and screen SAVING/RESTORING with active
  177. mouse cursor, so your code must be something about
  178.  
  179.    . . . . .
  180.    HideMouse; {call to hide mouse in your mouse driver}
  181.    {Any screen changing code}
  182.    ShowMouse;
  183.    . . . .
  184.  
  185. 3. Some recomendations.
  186.  
  187. - deactivate GTMouse when use internal debugger of Turbo Pascal IDE;
  188.  
  189. - deactivate GTMouse before any videomode change. GTMouse works
  190. with various screen text modes, simply reactivate it after mode
  191. changing.
  192.  
  193. Important. Deactivate GTMouse in graphics modes.
  194.  
  195. 4. Registration.
  196.  
  197. The Graphic mouse cursor in Text mode unit (GTMouse) is provided
  198. on 'as is' basis without warranty of any kind, expessed or
  199. implied. The person using the software bears all risk as to the
  200. quality and performance of the software.
  201.  
  202. We will try to extend our support to unregistrered users during
  203. their evaluation period, however we reserve the right to limit
  204. our support for unregistered users if their requests become
  205. taxing for us. For registered users the support is unlimited.
  206. Questions and any comments on this unit and source code can be
  207. sended to us via E-Mail addresses:
  208.  
  209. evsikov@lcta5.jinr.dubna.su or
  210. sychov@jinr.dubna.su
  211.  
  212. or via usual mail to
  213.  
  214. Igor Evsikov
  215. LCTA, Joint Institute for Nuclear Research, (Dubna)
  216. PO Box 79, Head Post Office
  217. 101000 Moscow  Russia
  218.  
  219. Look GTMOUSE.REG for registration details.
  220.  
  221. Russia, Dubna, June 30, 1993.
  222.