IGH_CanvasValidator

References
public interface IGH_CanvasValidator
'Interface used for limiting a collection of typical actions on the canvas. Do not implement this interface directly if you can help it, instead inherit from GH_CanvasValidator.

Methods

AddedToCanvas

#
void AddedToCanvas(GH_Canvas canvas)
This method will be called by the Canvas when this validator is added to it.
canvas (GH_Canvas)Canvas which just added this validator.

AppliesToDocument

#
bool AppliesToDocument(Guid id)
Test whether this validator applies to a specific document.
id (Guid)Document id or Guid.Empty if no document is available.

CanAcceptObject

#
bool CanAcceptObject(Guid id)
Validates whether a specific component can be accepted by the canvas at all.
id (Guid)

CanCreateObject

#
bool CanCreateObject(Guid id, PointF pt)
Validates whether a specific component may be inserted at a specific point.
id (Guid)
pt (PointF)

CanCreateWire

#
bool CanCreateWire(IGH_Param source, IGH_Param target)
Validates whether a wire-operation can commence.
source (IGH_Param)
target (IGH_Param)

CanDeleteObject

#
bool CanDeleteObject(IGH_DocumentObject object)
Validates whether a specific object can be deleted.
object (IGH_DocumentObject)

CanDeleteWire

#
bool CanDeleteWire(IGH_Param source, IGH_Param target)
Validates whether a wire can be deleted.
source (IGH_Param)
target (IGH_Param)

CanDragObject

#
bool CanDragObject(IGH_DocumentObject object, PointF dragFromPoint)
Validates whether some components can be dragged.
object (IGH_DocumentObject)
dragFromPoint (PointF)

CanNavigateCanvas

#
bool CanNavigateCanvas()
Validates whether the canvas can be navigated (panning, zooming etc)

CanShowCanvasMenu

#
bool CanShowCanvasMenu(PointF pt)
Validates whether the canvas menus (both the radial and the old-fashioned one) are allowed to pop up at a specific point.
pt (PointF)

CanShowComponentSearchBox

#
bool CanShowComponentSearchBox(PointF pt)
Validates whether the double-click-component-search-window is allowed to pop up at a specific point.
pt (PointF)

CanShowObjectMenu

#
bool CanShowObjectMenu(IGH_DocumentObject object)
Validates whether the object menu can be shown.
object (IGH_DocumentObject)

RemovedFromCanvas

#
void RemovedFromCanvas(GH_Canvas canvas)
This method will be called by the Canvas when this validator is removed from it.
canvas (GH_Canvas)Canvas which just removed this validator.