mouse gestures
Malte Brill
revolution at derbrill.de
Thu May 28 18:18:56 EDT 2009
Hey,
as sitting in hotels in the middle of nowhere is boring, I took a
couple of hours to write a little lib to implement mouse gestures in
Rev. You can find it either in the new revOnline or type in the
messagebox:
go stack URL "http://www.derbrill.de/fun/libMouseGestures.rev"
This lib enables you to implement mouse gestures in your own stacks.
Just start using the stack by issuing:
start using stack "libMouseGestures"
To tell a control or card to listen to gestures you need to set a
custom property of that control or card to true:
set the libGest["listenToGestures"] of this card to true
Now the card is listening to gestures. A gesture is performed by
rightclicking and dragging (or control clicking and dragging for those
with a one button mouse) To react to a gesture trap the libGestDone
message generated by the lib. The drag directions are send as a
parameter in form of a semicolon delimited list e.g.
up;left;downright
The stack has 3 cards with example script to react to gestures.
This one was hammered together quickly. Much room for improvement.
Hope you like it. If anyone feels like improving on it I´d like to see
the changes.
Best,
Malte
More information about the use-livecode
mailing list