1.103 class move_outline_gesture

A move_outline gesture is very similar to a move_gesture object, except that it drags a dotted box instead of the object itself and only moves the object when the user releases the button.

The move-outline gesture is to be preferred if the graphical has constraints or connections because the move_gesture will force recomputing these constraints and connections on each drag-event, while the move_outline_gesture will do so only when the user releases the button.

Bugs:

The outline is a box that is actually (temporary) displayed on the same device as the graphical to be moved. The current implementation of PCE's repaint algorithm requires significant repaint operations to be performed each time the outline-box is moved. A dedicated implementation of the outline (using XOR'ing or copying) would improve efficiency.

1.103.1 Instance variables

move_outline_gesture <- outline: box
Box used to paint the outline moved. The attributes graphical->texture, graphical->pen, etc, may be changed.

1.103.2 Send methods

move_outline_gesture ->drag: event
Delegates the event to the move_outline_gesture<-outline using event->post, thus moving the move_outline_gesture<-outline rather than the object.
move_outline_gesture ->initiate: event
Displays the move_outline_gesture<-outline on the same device as the graphical moved. Than uses event->post to initiate the normal move_gesture object associated with the move_outline_gesture<-outline.
move_outline_gesture ->terminate: event
First invoke move_outline_gesture->drag. Next it invokes move_outline_gesture->set with the x, y, w and h of the area of the move_outline_gesture<-outline to event<-receiver. Finally it invokes graphical->device to the move_outline_gesture<-outline to remove it from the device.