home *** CD-ROM | disk | FTP | other *** search
- /*
- ╓───────────────────────────────────────────────────╖
- ║ Program..: DCMOUSE.CH ║
- ║ Author...: Roger J. Donnay ║
- ║ Notice...: (c) DONNAY Software Designs 1987-2000 ║
- ║ Date.....: Feb 17, 2000 ║
- ║ Notes....: eXPress++ mouse translations ║
- ╙───────────────────────────────────────────────────╜
-
- Note: don't forget to call DC_MOUINITIALIZE() at the beginning of your
- application when using the dCLIP mouse system. This is only
- necessary with Clipper 5.01, not 5.2.
-
- */
-
- #define MOUSE_NEWGET 99
- #define MOUSE_CLICK 98
- #define MOUSE_PICK 96
- #define MOUSE_MEMO 95
- #define MOUSE_LEFT_DOWN -101
- #define MOUSE_RIGHT_DOWN -102
- #define MOUSE_DOUBLE_CLICK -104
- #define MOUSE_RIGHT_UP -104
- #define MOUSE_PICKUP -110
- #define MOUSE_PICKDOWN -111
-
- #ifndef MOUSE_ENTER
- #define MOUSE_ENTER 97
- #endif
-
-
- // - Make AT..PROMPT / MENU TO mousable
- #translate @ <r>,<c> PROMPT <p> [MESSAGE <m>] => DC_AT_PROMPT( <r>,<c>,<p>,<m> )
- #translate MENU TO <v> => <v> := DC_MENU_TO( <v> )
-
- // - Make MEMOEDIT() mousable
- #define Memoedit DC_MEMOEDIT
- #define MEMOEDIT DC_MEMOEDIT
- #define MemoEdit DC_MEMOEDIT
- #define memoedit DC_MEMOEDIT
-
- // - Make ACHOICE() mousable
- #define Achoice DC_ACHOICE
- #define achoice DC_ACHOICE
- #define ACHOICE DC_ACHOICE
-
- // - Make READMODAL() mousable
- #define READMODAL DC_READMODAL
- #define ReadModal DC_READMODAL
- #define readmodal DC_READMODAL
-
- /*
- // - Make INKEY() mousable
- #define INKEY DC_INKEY
- #define Inkey DC_INKEY
- #define inkey DC_INKEY
- */
-
- //-----------------------------------------------------------------------------
- //
- // MOUSEY 'MODE' interface commands and defines
- //
- // MOUSEY now contains a function named _dcmou_mode(). This function is
- // used to customize the operation of the mouse. It is used
- // primarily to turn certain mouse features (such as double clicks, or
- // stuffing the keyboard) on and off.
- //
-
- // There are five variables which _dcmou_mode controls:
- //
- // DOUBLECLICKS On=Dbl Clicks are reported to the user
- // Off=Dbl Clicks are not reported to the user
- // INVISIBLE On=Mouse clicks are reported even if mouse cursor is off
- // Off=Mouse clicks are reported only when mouse cursor is on
- // DRAGGING On=Holding the mouse down and moving it is reported
- // Off=Only the mouse press and release are reported
- // STUFFKEY On=A -29 is stuffed into the keyboard board when a mouse
- // event occurs
- // Off=The keyboard buffer is uneffected by mouse events.
- // DBL DELAY Numeric value incdicating tenths of a second to wait for
- // a double click (i.e. DBL DELAY of 5 is half a second)
- //
-
- // _dcmou_mode() accepts 5 parameters, one for each variable. You can
- // set all 5 options at the same time or just set one or two. If NIL is
- // passed to _dcmou_mode() then that variable is not changed. For example:
- //
- // _dcmou_mode( .t, , , , 5)
- //
- // This example sets DOUBLE CLICKS on (.t.) and changes DBL DELAY to 5.
- //
-
- // You can also use one of the MOUSEY UDC's:
- //
- // SET MOUSEY MODE TO <parameters,..>
- // SET MOUSEY DOUBLE CLICKS <ON|OFF>
- // SET MOUSEY INVISIBLE <ON|OFF>
- // SET MOUSEY DRAGGING <ON|OFF>
- // SET MOUSEY STUFFKEY <ON|OFF>
- // SET MOUSEY DBL DELAY <half_secs>
- //
-
- // The SET MOUSEY MODE command resets all 5 variables at once.
- // The remaining UDC's effect only one individual variable.
- //
-
-
- /*====================== MOUSEY MODE COMMANDS =========================*/
-
-
-
- #command SET MOUSEY MODE TO [<dbl:DOUBLECLICKS>] ;
- [<invis:INVISIBLE>] ;
- [<drag:DRAGGING>] ;
- [<key:STUFFKEY>] ;
- [DBL DELAY OF <dbldelay>] => ;
- ;
- _dcmou_mode( <.dbl.>, <.invis.>, <.drag.>, <.key.>, <dbldelay>)
-
- #command SET MOUSEY MODE TO DEFAULT => ;
- _dcmou_mode( .f., .f., .f., .t., 8)
-
- #command SET MOUSEY DOUBLECLICKS <x:ON,OFF,&> => _dcmou_mode( <(x)>,,,,)
- #command SET MOUSEY DOUBLECLICKS <x> => _dcmou_mode( <x>,,,,)
-
- #command SET MOUSEY INVISIBLE <x:ON,OFF,&> => _dcmou_mode( ,<(x)>,,,)
- #command SET MOUSEY INVISIBLE <x> => _dcmou_mode( ,<x>,,,)
-
- #command SET MOUSEY DRAGGING <x:ON,OFF,&> => _dcmou_mode( ,,<(x)>,,)
- #command SET MOUSEY DRAGGING <x> => _dcmou_mode( ,,<x>,,)
-
- #command SET MOUSEY STUFFKEY <x:ON,OFF,&> => _dcmou_mode( ,,,<(x)>,)
- #command SET MOUSEY STUFFKEY <x> => _dcmou_mode( ,,,<x>,)
-
- #command SET MOUSEY DBL DELAY <x:ON,OFF,&> => _dcmou_mode( ,,,,<(x)>)
- #command SET MOUSEY DBL DELAY <x> => _dcmou_mode( ,,,,<x>)
-
-