Interface IInteractivePreviewComponent
A control representing the native type of a document with methods to allow scrolling, searching and replacement of text within the native document.
Namespace: Sdl.FileTypeSupport.Framework.IntegrationApi
Assembly: Sdl.FileTypeSupport.Framework.Core.dll
Syntax
public interface IInteractivePreviewComponent
Methods
Close()
Closes the document in whatever way is necessary, and cleans up any left-over resources.
Declaration
void Close()
CreateScratchDocument(SegmentReference)
Creates a scratch document containing just the specified segment and returns the file name.
Declaration
string CreateScratchDocument(SegmentReference segment)
Parameters
Type | Name | Description |
---|---|---|
SegmentReference | segment |
Returns
Type | Description |
---|---|
System.String |
Generate(IFileTypeManager, BilingualParserFactory)
Generates the native preview using the filter manager and bilingual parser provided. Populates the control with the resulting document.
Declaration
void Generate(IFileTypeManager filterManager, BilingualParserFactory bilingualParserFactory)
Parameters
Type | Name | Description |
---|---|---|
IFileTypeManager | filterManager | |
BilingualParserFactory | bilingualParserFactory |
Remarks
If you call this method before GetControl, it will fail silently. This method is intended to be thread- safe, and will refuse to create any UI controls.
GetControl()
Declaration
Control GetControl()
Returns
Type | Description |
---|---|
System.Windows.Forms.Control |
GetSelectedSegment()
Returns an identifier for the currently selected segment in the preview document
Declaration
SegmentReference GetSelectedSegment()
Returns
Type | Description |
---|---|
SegmentReference |
ScrollToSegment(SegmentReference)
Scrolls the native document window so that the segment becomes visible.
Declaration
void ScrollToSegment(SegmentReference segment)
Parameters
Type | Name | Description |
---|---|---|
SegmentReference | segment |
UpdateSegment(SegmentReference, String)
Updates the text in the native document to match the new text of the specified segment.
Declaration
void UpdateSegment(SegmentReference segment, string filename)
Parameters
Type | Name | Description |
---|---|---|
SegmentReference | segment | The segment to update |
System.String | filename | The filename of the native document to update |
Events
WindowSelectionChanged
Notifies listeners that the selection is now different
Declaration
event PreviewControlHandler WindowSelectionChanged
Event Type
Type | Description |
---|---|
PreviewControlHandler |