Interface IDocumentFragment
A "disconnected" piece of document content that can be manipulated as a standalone unit without affecting the actual document content.
Inherited Members
Namespace: SdlSdl.DesktopEditorEditorApi
Assembly: Sdl.DesktopEditor.EditorApi.dll
Syntax
public interface IDocumentFragment : IChangeableContainerNode, IChangeableNode, ITreeNode<IChangeableNode, IChangeableContainerNode>, IList<IChangeableNode>, ICollection<IChangeableNode>, IEnumerable<IChangeableNode>, IEnumerable, IDisposable
Remarks
Any operations that modify document content in the edit controls should do so through
operations such as
CopySelection() and ReplaceSelection(IDocumentFragment),
which use IDocumentFragment
instances to represent the content being manipulated.
This ensures that these operations generate entries in the IUndoBuffer.
The document fragment provides a factory that can be used to create filter framework specific nodes that can be inserted into the document fragment.
The document fragment implements IDisposable
to facilitate quicker clean-up of large
chunks of content. To conserve memory we recommend disposing of a document fragment as soon as it has
filled its purpose, in particular if it contains a lot of content or has been used
to create many nodes.
Properties
DocProperties
If a fragment represents a part of a document this property stores the document's properties. This may be used for validating operations like 'Paste' where it is important to know whether the document fragment received belongs to the same document.
Declaration
IDocumentProperties DocProperties { get; set; }
Property Value
Type | Description |
---|---|
IDocumentProperties |
FileProperties
If a fragment represents a part of an XLIFF document this property stores the file properties of the fragment. This may be used for validating operations like 'Paste' where it is important to know whether the document fragment received belongs to the same document.
This assumes that a document fragment does not span content from multiple native files.
Declaration
IFileProperties FileProperties { get; set; }
Property Value
Type | Description |
---|---|
IFileProperties |
NodeFactory
Factory that can be used to create new nodes for inserting into the document fragment.
Declaration
INodeFactory NodeFactory { get; }
Property Value
Type | Description |
---|---|
INodeFactory |