public abstract class ActiveObject : DocumentObject
Abstract implementation of the IDocumentObject interface for objects that wish to participate in solutions.

Constructors

ActiveObject

#
protected ActiveObject(
reader
)

ActiveObject

#
Base class constructor.
protected ActiveObject(
nomen
Object description.
)

Properties

Activity

Gets or sets the active state of this object. Note that this property is meaningless for certain types of object.
public ObjectActivity Activity { get; set; }
inherited fromDocumentObject
Activity

Attributes

Gets or sets the attributes for this object.
public IAttributes Attributes { get; }
inherited fromDocumentObject
Attributes

ChildrenObjects

Gets all immediate child objects that belong to the current object. It is possible that an object does not have any children, and it is possible that a child object has children of its own.
public virtual IEnumerable<IDocumentObject> ChildrenObjects { get; }
inherited fromDocumentObject
ChildrenObjects

Connectivity

Gets the topological connectivity of this object. The topology is not updated automatically, so be sure to get a fresh instance every time you need it.
public abstract IObjectConnectivity Connectivity { get; }
inherited fromDocumentObject
Connectivity

CustomValues

Gets a collection of keyed values which can be used to store custom data which will survive (de)serialisation.
public KeyedValues CustomValues { get; }
inherited fromDocumentObject
CustomValues

Display

Gets or sets the display state of this object. Note that this property is meaningless for certain types of object.
public ObjectDisplay Display { get; set; }
inherited fromDocumentObject
Display

DisplayCache

#
Gets or sets the DisplayCache to use while displaying this object.
public DisplayCache DisplayCache { get; }

DisplayCapable

Gets whether this object makes allowance for 3D viewport displays.
public virtual bool DisplayCapable { get; }
inherited fromDocumentObject
DisplayCapable

DisplayName

Gets the display name of this object. Often the DisplayName is identical to the UserName, but there could be more complicated algorithms involved.
public virtual string DisplayName { get; }
inherited fromDocumentObject
DisplayName

DisplayStyle

Gets or sets the display style to use for the geometric data inside this object. Note that this property is meaningless for certain types of object.
public ObjectDisplayStyle DisplayStyle { get; set; }
inherited fromDocumentObject
DisplayStyle

Document

Gets or sets the document this object belongs to. It is possible an object does not belong to any document, however it can never belong to more than one document simultaneously.
public Document Document { get; set; }
inherited fromDocumentObject
Document

EntireFamily

Enumerates over all objects in the hierarchy this object is part of. This enumeration starts at the root object and then continues over all children and grandchildren in a breadth-first fashion.
public IEnumerable<IDocumentObject> EntireFamily { get; }
inherited fromDocumentObject
EntireFamily

FoundingObject

Gets the root or founding object in the object hierarchy. If the current object does not have a parent, it is a founding object.
public IDocumentObject FoundingObject { get; }
inherited fromDocumentObject
FoundingObject

Icon

Gets the icon associated with this object.
public IIcon Icon { get; }
inherited fromDocumentObject
Icon

IconInternal

Override this method to provide an icon for this object. If the icon is an embedded resource in this assembly with the same name as the class, it will automatically be loaded. The DocumentObject.Icon property calls this property and caches the result.
protected virtual IIcon IconInternal { get; }
inherited fromDocumentObject

InstanceId

Gets or sets the instance Id for this object. The instance Id should be different for every instance of every type. Do *not* assign this Id unless you know exactly what you are doing.
public Guid InstanceId { get; set; }
inherited fromDocumentObject
InstanceId

Nomen

Gets the user friendly description of this object.
public Nomen Nomen { get; }
inherited fromDocumentObject
Nomen

Obsolete

Gets whether this object is considered obsolete.
public bool Obsolete { get; }
inherited fromDocumentObject
Obsolete

ParentObject

Gets or sets the parent object that owns this object. Top-level objects do not have parents. Do not assign or remove parents unless you know exactly what you are doing.
public IDocumentObject ParentObject { get; set; }
inherited fromDocumentObject
ParentObject

Phase

Gets the current solution phase of this object.
public virtual Phase Phase { get; }
inherited fromDocumentObject
Phase

ProgressPercentage

Gets the progress as a percentage. If this object is currently not calculating a new solution, this number is not meaningful.
public int ProgressPercentage { get; }
inherited fromDocumentObject
ProgressPercentage

Relevance

Gets or sets the auxiliary state of this object. Auxiliary objects are drawn in an inconspicuous way as they are considered in-between logic. Note that this property is meaningless for certain types of object.
public ObjectRelevance Relevance { get; set; }
inherited fromDocumentObject
Relevance

Selected

Gets the main yes/no state from the SelectionState.
public bool Selected { get; }
inherited fromDocumentObject
Selected

Selection

Gets or sets the selected state of this object. Note that the selected setting of secondary objects is inherited from the parent.
public ObjectSelection Selection { get; set; }
inherited fromDocumentObject
Selection

SiblingObjects

Gets all sibling objects in the object family tree.
public IEnumerable<IDocumentObject> SiblingObjects { get; }
inherited fromDocumentObject
SiblingObjects

State

#
Gets the current state of this object. This is always the most recently completed state.
public override ObjectSolutionState State { get; }

UserName

Gets the user specified name of this object.
public string UserName { get; set; }
inherited fromDocumentObject
UserName

Methods

AddUndoRecord

Add a custom undo record for this object.
public void AddUndoRecord(
Record
record
Undo record to add.
)
inherited fromDocumentObject
Id of undo record.
AddUndoRecord

AddUndoRecord

Add a single action undo record for this object.
public void AddUndoRecord(
name,
Name of undo record.
action
Specific action to undo.
)
inherited fromDocumentObject
Id of undo record.
AddUndoRecord

AppendBakeInput

Append the baking input panel.
protected void AppendBakeInput()
inherited fromDocumentObject

AppendStateInput

Append the 'Enabled' and 'Display' states to this input panel.
protected void AppendStateInput(
panel,
Panel to append to.
enabledState,
If true, the Enabled state button will be modifiable.
displayState
If true, the Display state button will be modifiable.
)
inherited fromDocumentObject

AppendToInputPanel

Override this method to populate the popover panel. The base implementation does not add any panel inputs, however the DocumentObject class does provide a slew of protected utility methods for adding standard inputs.
public virtual void AppendToInputPanel()
inherited fromDocumentObject
AppendToInputPanel

AppendUserNameInput

Append the user name text box within a category labelled 'Attributes'.
protected void AppendUserNameInput()
inherited fromDocumentObject

ChangeInstanceIds

public void ChangeInstanceIds()
inherited fromDocumentObject

Compute

#
Compute a new solution for this object, or return a completed solution if one is available.
public sealed override SolutionData Compute(
solution,
stack
)
Result of computation.

ComputeInternal

#
Compute and populate a new solution object.
protected abstract SolutionData ComputeInternal(
solution,
stack
)
A fully populated solution object.

CreateAttributes

Create default attributes for this object. If attributes already exist, this method will not replace them.
protected abstract IAttributes CreateAttributes()
inherited fromDocumentObject

DisplayBounds

#
public override BoundingBox DisplayBounds()

DisplayFaces

#
public override void DisplayFaces(
pipeline,
guises,
extents
)

DisplayWires

#
public override void DisplayWires(
pipeline,
guises,
extents
)

Expire

#
Expire this object and all objects that depend on it. This will request-cancel any running solutions inside whatever document contains this object.
public sealed override void Expire()

ExpireAllRecipients

#
Expire all the recipients of this object. The default implementation relies on the Connectivity map provided by the derived class. Override this method to make it more efficient.
protected virtual void ExpireAllRecipients()

ExpireDisplay

Expire the attributes and raise the DisplayChanged event.
protected void ExpireDisplay()
inherited fromDocumentObject

GetCreationInfo

Gets information about who created this component and when.
public bool GetCreationInfo(
out string
name,
Name of creator.
time
Time of creation in UTC coordinates.
)
inherited fromDocumentObject
True if the creation data was available.
GetCreationInfo

GetModificationInfo

Gets information about who last modified this component and when.
public bool GetModificationInfo(
out string
name,
Name of modifier.
time
Time of modification in UTC coordinates.
)
inherited fromDocumentObject
True if the modification data was available.

InvalidateExistingLayout

Invalidate the attribute layout, but only if the attributes already exist.
protected void InvalidateExistingLayout()
inherited fromDocumentObject

ModifyIcon

Override the icon for this object. Use this judiciously.
public void ModifyIcon(
newIcon,
New icon to assign, or null to revert to the default icon.
overrideExtrinsicIcon = true
If true, the permanent extrinsic icon will be overwritten. If false, the temporary intrinsic icon will be overwritten.
)
inherited fromDocumentObject
ModifyIcon

ModifyNameAndInfo

Programmatically modify the nickname, name and/or info strings on the Nomen.
public void ModifyNameAndInfo(
name = null,
New name if not null.
info = null
New info if not null.
)
inherited fromDocumentObject
ModifyNameAndInfo

OnDisplayChanged

public void OnDisplayChanged()
inherited fromDocumentObject
OnDisplayChanged

OnExpired

Raise the Expired event.
protected internal void OnExpired()
inherited fromDocumentObject

OnLayoutChanged

public void OnLayoutChanged()
inherited fromDocumentObject
OnLayoutChanged

OverrideAttributes

Assign new attributes to this object. Not all attributes may be accepted, it depends on the implementation.
public bool OverrideAttributes(
attributes
New attributes to assign. Assigning null will revert to default attributes.
)
inherited fromDocumentObject
True if attributes were accepted.
OverrideAttributes

PopulateDisplay

#
Override this method to populate a display bag from a computed result. The DisplayCapable property will return true if this method has been overridden.
protected virtual void PopulateDisplay(
result,
Solution result.
bag,
Bag to populate.
token
Cancellation token.
)

RequestAutoSave

Request an autosave.
public AutoSaveResult RequestAutoSave(
reason,
Autosave reason.
autosaveId
Autosave Id. Consecutive requests with identical Ids are ignored.
)
inherited fromDocumentObject
RequestAutoSave

RequestAutoSave

Request an autosave using the instance ID of this object as a filter. This means hat subsequent autosave requests coming from the same object will be ignored.
public AutoSaveResult RequestAutoSave(
reason
Autosave reason.
)
inherited fromDocumentObject
RequestAutoSave

SetCreationInfo

Set the CreatedBy and CreatedAt fields if they haven't been set already.
public void SetCreationInfo()
inherited fromDocumentObject
SetCreationInfo

SetModificationInfo

Set the ModifiedBy and ModifiedAt fields.
public void SetModificationInfo()
inherited fromDocumentObject

SetProgressPercentage

Set the DocumentObject.ProgressPercentage field directly. The percentage is automatically limited to the [0, 100] interval.
public void SetProgressPercentage(
percentage
)
inherited fromDocumentObject

SetProgressPercentage

Set the DocumentObject.ProgressPercentage field based on a step count. This method always limits the percentage to the [1, 99] range, as 0% and 100% are oftentimes indicative of unstarted or completed processes, which probably gives the wrong impression.
public void SetProgressPercentage(
partial,
Current step.
total
Total steps.
)
inherited fromDocumentObject

Store

Serialise this object.
public virtual void Store(
writer
)
inherited fromDocumentObject
Store

UpdateDisplay

#
public override void UpdateDisplay()

Events

ActivityChanged

Raised whenever the Enabled state of this object changes.
public event EventHandler<ObjectEventArgs> ActivityChanged
inherited fromDocumentObject
ActivityChanged

AutosaveRequested

Raised whenever this object requests an autosave.
public event EventHandler<ObjectAutoSaveEventArgs> AutosaveRequested
inherited fromDocumentObject
AutosaveRequested

DisplayChanged

Raised whenever the display state of this object changes.
public event EventHandler<ObjectEventArgs> DisplayChanged
inherited fromDocumentObject
DisplayChanged

DocumentChanged

Raised whenever this object becomes part of a different document.
public event EventHandler<ObjectDocumentEventArgs> DocumentChanged
inherited fromDocumentObject
DocumentChanged

Expired

Raised whenever the solution currently held by this object is expired.
public event EventHandler<ObjectEventArgs> Expired
inherited fromDocumentObject
Expired

InstanceIdChanged

Raised whenever the InstanceId of this object changes.
public event EventHandler<ObjectGuidEventArgs> InstanceIdChanged
inherited fromDocumentObject
InstanceIdChanged

LayoutChanged

Raised whenever the layout of this object changes. Layout invalidation triggers a canvas redraw.
public event EventHandler<ObjectEventArgs> LayoutChanged
inherited fromDocumentObject
LayoutChanged

NameChanged

Raised whenever the UserName of this object changes. This typically infers that the DisplayName also changes.
public event EventHandler<ObjectNameEventArgs> NameChanged
inherited fromDocumentObject
NameChanged

RelevanceChanged

Raised whenever the Auxiliary state of this object changes.
public event EventHandler<ObjectEventArgs> RelevanceChanged
inherited fromDocumentObject
RelevanceChanged

SelectedChanged

Raised whenever the Selected state of this object changes.
public event EventHandler<ObjectEventArgs> SelectedChanged
inherited fromDocumentObject
SelectedChanged