Search Results for

    Show / Hide Table of Contents

    Interface IFrameworkDocument

    Document used with IFrameworkEditControl. Represents source or target content in a bilingual document.

    Inherited Members
    IAbstractFrameworkDocument.CreateDocumentFragment()
    IAbstractFrameworkDocument.Copy()
    IAbstractFrameworkDocument.Replace(IDocumentFragment)
    IAbstractFrameworkDocument.InsertSegment(ISegmentPairProperties, ISegmentContainerNode)
    IAbstractFrameworkDocument.GetMarkupDataRanges(ContentRange)
    IAbstractFrameworkDocument.MergeIdenticalNeighboringTags(ContentRange)
    IAbstractFrameworkDocument.GetNearestPosition(IMessageLocation)
    IAbstractFrameworkDocument.RestoreGhostTags()
    IAbstractFrameworkDocument.ItemFactory
    IAbstractFrameworkDocument.PropertiesFactory
    IAbstractFrameworkDocument.DocumentProperties
    IAbstractFrameworkDocument.ContentChanged
    IDocument.MoveActiveRange(ContentRange)
    IDocument.MoveActiveRange(IContentSelection)
    IDocument.Delete()
    IDocument.CopyAsText(Boolean)
    IDocument.ActiveRange
    IDocument.IsDirty
    IDocument.UndoBuffer
    IDocument.AfterEditOperationAborted
    IDocument.EditOperationCompleting
    IDocument.EditOperationStarting
    System.IDisposable.Dispose()
    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 null.

    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 null. (Note that a null return value still means the operation was successful. If the operation fails an exception is thrown.)

    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 null if no paragraph unit with this ID exists in the document content.

    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 null if no segment with the specified ID exists in the the paragraph unit with the specified ID or if no such paragraph unit exists in the document content.

    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).

    Extension Methods

    WindowsControlUtils.ForWindowFromFrameworkElement(Object, Action<Window>)

    On this page

    • Properties
      • IsSource
      • ParentDocument
      • RootContainer
    • Methods
      • ApplyQuickTagToActiveRange(IQuickTag)
      • GetParagraph(ParagraphUnitId)
      • GetSegment(ParagraphUnitId, SegmentId)
      • SplitTagsToContainer(IAbstractContainerNode)
    • Extension Methods
    Back to top Generated by DocFX