1.136 class resize_gesture

A resize_gesture allows for resizing objects by dragging the corners or sides (for constrained resize) of the objects. While dragging, the direction/constraints are indicated by showing an appropriate cursor.

The resize_gesture only responds to events the happen close the the edges/corners of the graphical. The class-variables resize_gesture.margin_fraction and resize_gesture.margin_width determine these areas: the gesture responds if the down event occurs between the edge and 1/margin_fraction of the size or margin_width (whoever is the least).

Bugs: Does not deal properly with negative areas.

See also
class resize_outline_gesture

1.136.1 Instance variables

resize_gesture <-> h_mode: {left,keep,right}
How the graphical is resized horizontally. Values are:
leftDrag the left edge
keepChange neither edge
rightDrag the right edge

This value is set by resize_gesture->verify and used by resize_gesture->initiate and resize_gesture->drag.

See also
resize_gesture->verify
resize_gesture <-> max_size: size*
Size that defines the maximum size the graphical may have. If it depends on the circumstances, it may be set in resize_gesture->verify or resize_gesture->initiate.

If @nil, there is no maximum size.

Defaults: @nil

resize_gesture <-> min_size: size*
Size that defines the minimal size the graphical should have. If it depends on the circumstances, it may be set in resize_gesture->verify or resize_gesture->initiate.

If @nil, there is no minimum size.

Defaults: Resource defined.

See also
resize_gesture->verify
resize_gesture <-> v_mode: {top,keep,bottom}
How the graphical is resized vertically. Values are:
topDrag the top edge
keepChange neither edge
bottomDrag the bottom edge

This value is set by resize_gesture->verify and used by resize_gesture->initiate and resize_gesture->drag.

See also
resize_gesture->verify

1.136.2 Send methods

resize_gesture ->drag: event
Resize the graphical according the resize_gesture<-v_mode and the resize_gesture<-h_mode determined upon starting the gesture.
resize_gesture ->initiate: event
Set the cursor to indicate which edges are going to be changed and moves the pointer to be precisely on those sides.
resize_gesture ->terminate: event
Equivalent to resize_gesture->drag.
resize_gesture ->verify: event
The resize_gesture->verify method determines the resize_gesture<->v_mode and resize_gesture<->h_mode attributes. The gesture changes those sides where the caret is closer that the maximum of
{Width/Height} / margin_factor AND margin_width

Both resize_gesture.margin_factor and resize_gesture.margin_width are Defauls. resize_gesture->verify succeeds if at least one of resize_gesture<->v_mode and resize_gesture<->h_mode is not set to keep.

See also
- resize_gesture-min_size
- resize_gesture-v_mode
- resize_gesture-h_mode