Interface IFrameworkDocument
Document used with IFrameworkEditControl. Represents source or target content in a bilingual document.
Inherited Members
Namespace: Sdl.DesktopEditor.EditorApi
Assembly: Sdl.DesktopEditor.EditorApi.dll
Syntax
public interface IFrameworkDocument : IAbstractFrameworkDocument, IDocument, IDisposable
Properties
IsSource
true
if the document is the Source document
in the bilingual document.
Declaration
bool IsSource { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
ParentDocument
The bilingual document this document is part of.
Declaration
IBilingualDocument ParentDocument { get; }
Property Value
Type | Description |
---|---|
IBilingualDocument |
RootContainer
The root container of all content in the document.
Declaration
IDocumentContainerNode RootContainer { get; }
Property Value
Type | Description |
---|---|
IDocumentContainerNode |
Methods
ApplyQuickTagToActiveRange(IQuickTag)
Insert a QuickTag into the document.
Declaration
ContentRange ApplyQuickTagToActiveRange(IQuickTag quickTag)
Parameters
Type | Name | Description |
---|---|---|
IQuickTag | quickTag | The QuickTag definition for the tag to insert. Must not be |
Returns
Type | Description |
---|---|
ContentRange | The range of content the that was wrapped with the QuickTag if it contains a content placeholder. If no content was wrapped but the QuickTag did have a content placeholder the returned range indicates where the corresponding location is in the document.
If the QuickTag does not have a content placeholder this method returns |
Remarks
If the QuickTag contains a content placeholder and the active range is not empty
the range content will be moved into the corresponding location after the QuickTag
has been inserted.
The returned range represents the content that was wrapped by the QuickTag (if any).
The ActiveRange after execution will span all the inserted content.
If the QuickTag does not contain a content placeholder the content of the active range will be overwritten by the content from the QuickTag.
All tags inserted through this operation will have their ID set to the value of the CommandId.
GetParagraph(ParagraphUnitId)
Convenient method for locating a specific paragraph unit in the document.
Declaration
IParagraphUnitContainerNode GetParagraph(ParagraphUnitId id)
Parameters
Type | Name | Description |
---|---|---|
ParagraphUnitId | id | ID of the paragraph unit to locate. |
Returns
Type | Description |
---|---|
IParagraphUnitContainerNode | The node representing the paragraph unit, or |
GetSegment(ParagraphUnitId, SegmentId)
Convenient method for locating a specific segment in the document.
Declaration
ISegmentContainerNode GetSegment(ParagraphUnitId paragraphId, SegmentId segmentId)
Parameters
Type | Name | Description |
---|---|---|
ParagraphUnitId | paragraphId | ID of the paragraph unit the segment belongs to. |
SegmentId | segmentId | ID of the segment in the paragraph unit. |
Returns
Type | Description |
---|---|
ISegmentContainerNode | The node representing the segment, or |
SplitTagsToContainer(IAbstractContainerNode)
Method that splits the tags from the current ActiveRange up to (but not including) the split container. This is used when splitting segments to make sure that all child tags of a segment are split correctly at the split point.
Declaration
void SplitTagsToContainer(IAbstractContainerNode splitContainer)
Parameters
Type | Name | Description |
---|---|---|
IAbstractContainerNode | splitContainer | The container to stop splitting tags at. This must be a parent container of the current selection position. |
Remarks
Note that after performing the operation, the active range will be positioned to cover all the tags that have been split.
If the active range is not empty (i.e. the from position is different to the upto position) then the tags will be split around this range (the range will be cleared from all tags).