DocumentStack

References
public sealed class DocumentStack
A stack of nested documents. A DocumentBag contains a collection of DocumentStack objects. Each stack contains a root document which is (ideally) associated with a *.ghz file. Then when nested documents are opened, they are pushed onto the stack. When editing a cluster, inside a cluster inside the root document, the stack will contain three documents, the innermost one being at the head.

Constructors

DocumentStack

#
public DocumentStack(Document root)
root (Document)

Properties

ContainsUnsaved

#
public bool ContainsUnsaved { get; }
Gets whether any of the documents in this stack currently have unsaved state.

Count

#
public int Count { get; }
Gets the number of documents in this stack.

Documents

#
public IEnumerable<Document> Documents { get; }
Enumerate over all documentsm starting with the head.

Root

#
public Document Root { get; }
Gets the root document of this stack. This never changes.

Methods

RegisterAcceptHandler

#
public bool RegisterAcceptHandler(Document doc, Action<Document> callback)
Add a callback to a specific document for acceptance handling.
doc (Document)
callback (Action<Document>)

RegisterRejectHandler

#
public bool RegisterRejectHandler(Document doc, Action<Document> callback)
Add a callback to a specific document for rejection handling.
doc (Document)
callback (Action<Document>)