Mouse gesture components
JvMouseGesture.pas
Classes | Constants | Enumerations | Functions | Types | Variables
This unit implements mouse gestures. For this purpose actually two classes are available. one is the interpreter and can be used to enhance special components like a grid. In this case the programmer is responsible to fill matching OnMouseDown, OnMouseUp and OnMouseMove events of component. This works fine with MSWINDOWS and Linux The second component installs a hook for a specific application and fires an event after detecting a mouse gesture (Windows only in this version :-( ).

Programmers will get a string with the detected gesture from following matrix:

7 U 9
L * R
1 D 3

The asterix is the startpoint for the first vector. E.g. a gesture string "LU" means, user has first moved mouse to the left side and then up. There's no limit for complexity of a gesture ...

Notes
See demo project for usage ...
Classes
Class Description
TJvMouseGesture This class implements the basic interpreter. It can be used to enhance single components, too. E.g., if you want to enable a grid with gesture feature. For this purpose you have to do 4 steps:

1) Fill the "OnMouseDown" event with code like

TJvMouseGestureHook This class implements a application wide mouse hook for mouse gestures. Programmers get only one event for a detected mouse gesture:

OnJvMouseGestureCustomInterpretation

Constants
Constant Description
JVMG_DOWN The text for this constant has been generated automatically. This means that it is not documented.
JVMG_LEFT  
JVMG_LEFTLOWER The text for this constant has been generated automatically. This means that it is not documented.
JVMG_LEFTUPPER The text for this constant has been generated automatically. This means that it is not documented.
JVMG_RIGHT The text for this constant has been generated automatically. This means that it is not documented.
JVMG_RIGHTLOWER The text for this constant has been generated automatically. This means that it is not documented.
JVMG_RIGHTUPPER The text for this constant has been generated automatically. This means that it is not documented.
JVMG_UP The text for this constant has been generated automatically. This means that it is not documented.
Enumerations
Enumeration Description
TJvActivationMode Defines, whether or not the hook will be activated automatically or not.
TJvMouseGestureButton This type defines a set of available buttons for the hook.
Functions
Function Description
JvMouseGestureHook Hook call back function. DO NOT USE EXTERN!
Types
Type Description
TOnJvMouseGestureCustomInterpretation Defines a complex gesture (two or more letters event)
TOnJvMouseGestureSimple Defines a simple gesture (one letter event
Variables
Variable Description
JvCurrentHook contains the handle of the currently installed hook
JvMouseButtonDown Some global vars to be accessed by call back function ...
JvMouseButtonUp Some global vars to be accessed by call back function ...
JvMouseGestureHookActive Some global vars to be accessed by call back function ...
JvMouseGestureHookAlreadyInstalled Some global vars to be accessed by call back function ...
JvMouseGestureInterpreter Object pointer to interpreter class used by hook
Links
Copyright (c) 2003 by Project JEDI. All rights reserved.