Table of Contents

Interface ICadEntityOwner

Namespace
OpenCAD2D
Assembly
OpenCAD2D.Core.dll

Something outside the presenter that owns some of a drawing's entities and is asked before they change: a model drawing owns the lines, dimensions and marks it wrote. An entity is owned when its extended data carries a CadOwnerTag naming the owner; owners are found through a CadOwnerRegistry.

public interface ICadEntityOwner

Remarks

The presenter knows owners only through this contract. A line of a view answers ReadOnly, a mark MoveOnly and a dimension Edit; an edit the rule lets through goes to TryApply(CadDocument, CadEdit), which records it and writes the owner's entities again.

Properties

Name

Gets the owner's name, as the Owner of its entities gives it: "ModelDrawing" for a model drawing. Names are compared character by character, case and all.

Methods

GetEditRule(DxfEntity)

Says what the presenter may do to one of the owner's entities.

TryApply(CadDocument, CadEdit)

Takes an edit of one of the owner's entities: the owner records it and changes or writes its entities again in the document; or refuses it, and the document stays as it was.