typedef void (*MoveHandleFunc) (Object* obj,
Handle* handle,
Point* pos,
HandleMoveReason reason,
ModifierKeys modifiers);
Function called to move one of the handles associated with the
object. Its new position is given by pos.
- reason
- gives the reason the handle was moved:
- HANDLE_MOVE_USER
- means the user is dragging the point.
- HANDLE_MOVE_USER_FINAL
- means the user let go of the point.
- HANDLE_MOVE_CONNECTED
- means it was moved because something
it was connected to moved.
- HANDLE_MOVE_CREATE
- means the handle is being dragged as part of
the initial creation of the object.
- HANDLE_MOVE_CREATE_FINAL
- means that the user let got of the
handle as part of the initial creation of the object.
- modifiers
- gives a bitset of modifier keys currently held down:
- MODIFIER_SHIFT
- is either shift key
- MODIFIER_ALT
- is either alt key
- MODIFIER_CONTROL
- is either control key
Each has MODIFIER_LEFT_* and MODIFIER_RIGHT_* variants
In most cases, you would call the move_handle function in the parent followed by update_data. Some objects have special handling of the initial movements, see for example objects/zigzagline.c
-- LarsClausen - 03 Sep 2002