home *** CD-ROM | disk | FTP | other *** search
/ PC World 2002 June / PCWorld_2002-06_cd.bin / Software / Komercni / xbase / express / exd17208.r04 / exp17 / Include / Dcmouse.ch < prev    next >
Text File  |  2002-01-30  |  5KB  |  138 lines

  1. /*
  2.  ╓───────────────────────────────────────────────────╖
  3.  ║  Program..: DCMOUSE.CH                            ║
  4.  ║  Author...: Roger J. Donnay                       ║
  5.  ║  Notice...: (c) DONNAY Software Designs 1987-2000 ║
  6.  ║  Date.....: Feb 17, 2000                          ║
  7.  ║  Notes....: eXPress++ mouse translations          ║
  8.  ╙───────────────────────────────────────────────────╜
  9.  
  10. Note: don't forget to call DC_MOUINITIALIZE() at the beginning of your
  11.       application when using the dCLIP mouse system.  This is only
  12.       necessary with Clipper 5.01, not 5.2.
  13.  
  14. */
  15.  
  16. #define MOUSE_NEWGET           99
  17. #define MOUSE_CLICK            98
  18. #define MOUSE_PICK             96
  19. #define MOUSE_MEMO             95
  20. #define MOUSE_LEFT_DOWN      -101
  21. #define MOUSE_RIGHT_DOWN     -102
  22. #define MOUSE_DOUBLE_CLICK   -104
  23. #define MOUSE_RIGHT_UP       -104
  24. #define MOUSE_PICKUP         -110
  25. #define MOUSE_PICKDOWN       -111
  26.  
  27. #ifndef MOUSE_ENTER
  28.   #define MOUSE_ENTER          97
  29. #endif
  30.  
  31.  
  32. // - Make AT..PROMPT / MENU TO mousable
  33. #translate @ <r>,<c> PROMPT <p> [MESSAGE <m>] => DC_AT_PROMPT( <r>,<c>,<p>,<m> )
  34. #translate MENU TO <v> => <v> := DC_MENU_TO( <v> )
  35.  
  36. // - Make MEMOEDIT() mousable
  37. #define Memoedit  DC_MEMOEDIT
  38. #define MEMOEDIT  DC_MEMOEDIT
  39. #define MemoEdit  DC_MEMOEDIT
  40. #define memoedit  DC_MEMOEDIT
  41.  
  42. // - Make ACHOICE() mousable
  43. #define Achoice  DC_ACHOICE
  44. #define achoice  DC_ACHOICE
  45. #define ACHOICE  DC_ACHOICE
  46.  
  47. // - Make READMODAL() mousable
  48. #define READMODAL    DC_READMODAL
  49. #define ReadModal    DC_READMODAL
  50. #define readmodal    DC_READMODAL
  51.  
  52. /*
  53. // - Make INKEY() mousable
  54. #define INKEY        DC_INKEY
  55. #define Inkey        DC_INKEY
  56. #define inkey        DC_INKEY
  57. */
  58.  
  59. //-----------------------------------------------------------------------------
  60. //
  61. //  MOUSEY 'MODE' interface commands and defines
  62. //
  63. //  MOUSEY now contains a function named _dcmou_mode(). This function is
  64. //  used to customize the operation of the mouse. It is used
  65. //  primarily to turn certain mouse features (such as double clicks, or
  66. //  stuffing the keyboard) on and off.
  67. //
  68.  
  69. //  There are five variables which _dcmou_mode controls:
  70. //
  71. //  DOUBLECLICKS      On=Dbl Clicks are reported to the user
  72. //                    Off=Dbl Clicks are not reported to the user
  73. //  INVISIBLE         On=Mouse clicks are reported even if mouse cursor is off
  74. //                    Off=Mouse clicks are reported only when mouse cursor is on
  75. //  DRAGGING          On=Holding the mouse down and moving it is reported
  76. //                    Off=Only the mouse press and release are reported
  77. //  STUFFKEY          On=A -29 is stuffed into the keyboard board when a mouse
  78. //                    event occurs
  79. //                    Off=The keyboard buffer is uneffected by mouse events.
  80. //  DBL DELAY         Numeric value incdicating tenths of a second to wait for
  81. //                    a double click  (i.e. DBL DELAY of 5 is half a second)
  82. //
  83.  
  84. //  _dcmou_mode() accepts 5 parameters, one for each variable. You can
  85. //  set all 5 options at the same time or just set one or two. If NIL is
  86. //  passed to _dcmou_mode() then that variable is not changed. For example:
  87. //
  88. //  _dcmou_mode( .t, , , , 5)
  89. //
  90. //  This example sets DOUBLE CLICKS on (.t.) and changes DBL DELAY to 5.
  91. //
  92.  
  93. //  You can also use one of the MOUSEY UDC's:
  94. //
  95. //  SET MOUSEY MODE TO <parameters,..>
  96. //  SET MOUSEY DOUBLE CLICKS <ON|OFF>
  97. //  SET MOUSEY INVISIBLE <ON|OFF>
  98. //  SET MOUSEY DRAGGING <ON|OFF>
  99. //  SET MOUSEY STUFFKEY <ON|OFF>
  100. //  SET MOUSEY DBL DELAY <half_secs>
  101. //
  102.  
  103. //  The SET MOUSEY MODE command resets all 5 variables at once.
  104. //  The remaining UDC's effect only one individual variable.
  105. //
  106.  
  107.  
  108. /*======================  MOUSEY MODE COMMANDS  =========================*/
  109.  
  110.  
  111.  
  112. #command SET MOUSEY MODE TO [<dbl:DOUBLECLICKS>]                              ;
  113.                             [<invis:INVISIBLE>]                               ;
  114.                             [<drag:DRAGGING>]                                 ;
  115.                             [<key:STUFFKEY>]                                  ;
  116.                             [DBL DELAY OF <dbldelay>] =>                      ;
  117.                                                                               ;
  118.          _dcmou_mode( <.dbl.>, <.invis.>, <.drag.>, <.key.>, <dbldelay>)
  119.  
  120. #command SET MOUSEY MODE TO DEFAULT =>                                        ;
  121.          _dcmou_mode( .f., .f., .f., .t., 8)
  122.  
  123. #command SET MOUSEY DOUBLECLICKS  <x:ON,OFF,&> => _dcmou_mode( <(x)>,,,,)
  124. #command SET MOUSEY DOUBLECLICKS  <x>          => _dcmou_mode( <x>,,,,)
  125.  
  126. #command SET MOUSEY INVISIBLE     <x:ON,OFF,&> => _dcmou_mode( ,<(x)>,,,)
  127. #command SET MOUSEY INVISIBLE     <x>          => _dcmou_mode( ,<x>,,,)
  128.  
  129. #command SET MOUSEY DRAGGING      <x:ON,OFF,&> => _dcmou_mode( ,,<(x)>,,)
  130. #command SET MOUSEY DRAGGING      <x>          => _dcmou_mode( ,,<x>,,)
  131.  
  132. #command SET MOUSEY STUFFKEY      <x:ON,OFF,&> => _dcmou_mode( ,,,<(x)>,)
  133. #command SET MOUSEY STUFFKEY      <x>          => _dcmou_mode( ,,,<x>,)
  134.  
  135. #command SET MOUSEY DBL DELAY     <x:ON,OFF,&> => _dcmou_mode( ,,,,<(x)>)
  136. #command SET MOUSEY DBL DELAY     <x>          => _dcmou_mode( ,,,,<x>)
  137.  
  138.