GH_CanvasDropTargetValidator

GH_CanvasValidator
Utility validator for restricting component creation.

Constructors

GH_CanvasDropTargetValidator

#
public GH_CanvasDropTargetValidator()

Properties

Canvas

Gets the canvas this validator is associated with.
protected GH_Canvas Canvas { get; }
inherited fromGH_CanvasValidator

Document

Gets the document (if it exists) that is currently loaded in the canvas.
protected GH_Document Document { get; }
inherited fromGH_CanvasValidator

DropDelegate

#
Gets or sets the delegate to be invoked when a component is dropped inside the dropregion.
public Action DropDelegate { get; set; }

DropID

#
Gets or sets the ID for the allowed component.
public Guid DropID { get; set; }

DropRegion

#
Gets or sets the dropregion for this validator. Regions are cloned so you can dispose of the original immedately after assignment.
public RectangleF DropRegion { get; set; }

DropText

#
Gets or sets the text to display.
public string DropText { get; set; }

Methods

AddedToCanvas

#
public override void AddedToCanvas(
canvas
)

AppliesToDocument

#
public override bool AppliesToDocument(
id
)

CanAcceptObject

#
public override bool CanAcceptObject(
id
)

CanCreateObject

#
public override bool CanCreateObject(
id,
PointF
pt
)

CanCreateWire

public virtual bool CanCreateWire(
source,
target
)
inherited fromGH_CanvasValidator
CanCreateWire

CanDeleteObject

#
public override bool CanDeleteObject()

CanDeleteWire

public virtual bool CanDeleteWire(
source,
target
)
inherited fromGH_CanvasValidator
CanDeleteWire

CanDragObject

#
public override bool CanDragObject(
PointF
dragFromPoint
)

CanNavigateCanvas

public virtual bool CanNavigateCanvas()
inherited fromGH_CanvasValidator
CanNavigateCanvas

CanShowCanvasMenu

#
public override bool CanShowCanvasMenu(
PointF
pt
)

CanShowComponentSearchBox

#
public override bool CanShowComponentSearchBox(
PointF
pt
)

CanShowObjectMenu

public virtual bool CanShowObjectMenu()
inherited fromGH_CanvasValidator
CanShowObjectMenu

RemovedFromCanvas

#
public override void RemovedFromCanvas(
canvas
)