1.102 class move_gesture

A move_gesture defines the behaviour necessary to allow the user dragging a graphical object with the mouse over it's graphical device.

While dragging, the cursor is changed to a fleur

By default, the move_gesture is associated with the middle mouse-button.

1.102.1 Instance variables

move_gesture <- offset: point
While active, the distance between the top-left corner of the graphical moved and the cursor. Set by move_gesture->initiate.

1.102.2 Send methods

move_gesture ->drag: event
Moves the graphical using the move_gesture->do_set behaviour so that the distance between the cursor and the top-left remains the same as when the gesture was initiated.
move_gesture ->initialise: button=[button_name], modifier=[modifier]
Create a move_gesture, associated with a button with modifiers. Both the button and the modifiers are determined by their class-variables. One should avoid to use explicit binding of a move gesture to some button.

Defaults: button Resource defined (middle) modifiers Resource defined (none)

move_gesture ->initiate: event
Fills move_gesture<-offset with the distance of the mouse-down event to the top-left corner of the graphical on which the move is initiated. Sets the cursor to move_gesture.cursor.
move_gesture ->terminate: event
Equivalent to move_gesture->drag.
move_gesture ->verify: event
Succeeds if the receiving graphical object has move_gesture<->device not equal to @nil.