Table of Contents

Class CornerResizer

Namespace
PluginUI
Assembly
PluginUI.dll

Resize grip for the bottom-right corner of a resizable editor (iPlug2 ICornerResizerControl). Dragging asks the container for a new pixel size through RequestResize(int, int); the DAW (or the standalone window) decides and calls back SetPixelSize(int, int). Hidden when the host is not resizable. Double-click restores the preferred size.

public class CornerResizer : Control
Inheritance
CornerResizer
Inherited Members

Remarks

Place it last in a Canvas (or align it bottom-right in any panel) so that it stays on top. The drag works in screen pixels, so it stays stable while the content rescales under the pointer.

Constructors

CornerResizer()

Creates a grip aligned to the bottom-right corner of its slot.

public CornerResizer()

Properties

DefaultSize

Natural size used when no explicit size is given.

protected override Size DefaultSize { get; }

Property Value

Size

GripColor

Grip color (null = theme dim text).

public Color? GripColor { get; set; }

Property Value

Color?

Methods

GetToolTipText()

Tooltip actually shown: ToolTip by default. Override to supply a computed or localized text (for example from Strings) when ToolTip is not set.

protected override string? GetToolTipText()

Returns

string

The text to show, or null / empty for no tooltip.

Remarks

Without an explicit ToolTip, shows the localized DragToResize.

HitTest(Point)

Returns true if the point hits this element (children excluded). Default: inside Bounds.

public override bool HitTest(Point point)

Parameters

point Point

Returns

bool

OnCaptureLost()

The mouse capture was lost without a button release.

protected override void OnCaptureLost()

OnMouseDown(MouseEventArgs)

Mouse button pressed over the element (or captured).

protected override void OnMouseDown(MouseEventArgs e)

Parameters

e MouseEventArgs

OnMouseMove(MouseEventArgs)

Mouse moved over the element (or captured).

protected override void OnMouseMove(MouseEventArgs e)

Parameters

e MouseEventArgs

OnMouseUp(MouseEventArgs)

Mouse button released.

protected override void OnMouseUp(MouseEventArgs e)

Parameters

e MouseEventArgs

RenderVector(DrawingContext, Rect, VectorStyle)

Vector rendering of the widget area.

protected override void RenderVector(DrawingContext dc, Rect widget, VectorStyle style)

Parameters

dc DrawingContext
widget Rect
style VectorStyle