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

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

AppliesToDocument

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

CanAcceptObject

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

CanCreateObject

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

CanCreateWire

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

CanDeleteObject

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

CanDeleteWire

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

CanDragObject

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

CanNavigateCanvas

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

CanShowCanvasMenu

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

CanShowComponentSearchBox

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

CanShowObjectMenu

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

RemovedFromCanvas

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