GH_CanvasDropTargetValidator

GH_CanvasValidator
Utility validator for restricting component creation.

Constructors

GH_CanvasDropTargetValidator

#
public GH_CanvasDropTargetValidator()

Properties

Canvas

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

Document

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

DropDelegate

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

DropID

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

DropRegion

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

DropText

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

Methods

AddedToCanvas

#
public override void AddedToCanvas(GH_Canvas canvas)
canvas (GH_Canvas)

AppliesToDocument

#
public override bool AppliesToDocument(Guid id)
id (Guid)

CanAcceptObject

#
public override bool CanAcceptObject(Guid id)
id (Guid)

CanCreateObject

#
public override bool CanCreateObject(Guid id, PointF pt)
id (Guid)
pt (PointF)

CanCreateWire

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

CanDeleteObject

#
public override bool CanDeleteObject(IGH_DocumentObject object)

CanDeleteWire

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

CanDragObject

#
public override bool CanDragObject(IGH_DocumentObject object, PointF dragFromPoint)
object (IGH_DocumentObject)
dragFromPoint (PointF)

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(IGH_DocumentObject object)
inherited fromGH_CanvasValidator
object (IGH_DocumentObject)
CanShowObjectMenu

RemovedFromCanvas

#
public override void RemovedFromCanvas(GH_Canvas canvas)
canvas (GH_Canvas)