Interface IFrameworkEditControl
Source or target language edit control in the ISideBySideEditor control.
Inherited Members
Namespace: Sdl.DesktopEditor.EditorApi
Assembly: Sdl.DesktopEditor.EditorApi.dll
Syntax
public interface IFrameworkEditControl : IAbstractFrameworkEditControl, IEditControl, IControl, IDisposable, ISynchronizableLayout
Properties
CanAlwaysEditSource
Set to true
if the source can always be edited (TM edit), false if it editing is only
on demand (document edit)
Declaration
bool CanAlwaysEditSource { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Document
The source or target language document of the IBilingualDocument for the ISideBySideEditor control.
Declaration
IFrameworkDocument Document { get; set; }
Property Value
Type | Description |
---|---|
IFrameworkDocument |
Editor
The side-by-side editor this control is part of.
Declaration
ISideBySideEditor Editor { get; }
Property Value
Type | Description |
---|---|
ISideBySideEditor |
EnableBackgroundLayout
When true the edit control will use a background thread to process the layout, increasing performance for large documents (especially on a multi-core CPU). This may be an unrequired overhead for some controls so may be explicitly set to false (for example, if the control will never display large amounts of content). NOTE: this is enabled by default.
Declaration
bool EnableBackgroundLayout { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Remarks
When using this control as part of the ISideBySideEditor control and
setting this value to false
, it is advisable to set the value as part of the handler
for AfterEditControlsCreated. This ensures that the layout
will be disabled at the earliest possible point after the controls have been created (and
before the layout has started) every time the control is created.
IsSource
Set to true
if the control is the source language control in the side-by-side editor.
Declaration
bool IsSource { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
MayHaveVScrollBar
Indicates whether the control can have a vertical scroll bar.
This property will typically be false for the source control when
synchronized scrolling for source and target is enabled.
Declaration
bool MayHaveVScrollBar { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
ShadeRows
When true
alternate rows will appear shaded.
(Default is true
.)
Declaration
bool ShadeRows { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
ShowParagraphBoundaries
When true
paragraph boundaries are drawn in the edit control.
(Default is false
.)
Declaration
bool ShowParagraphBoundaries { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
ShowRowBoundaries
when true
row boundaries are drawn in the edit control.
(Default is false
.)
Declaration
bool ShowRowBoundaries { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
TQAMode
When true
the edit control will track user TQA edits to the document
as Feedback additions and deletions instead of actually inserting or deleting content.
Default is false
Declaration
bool TQAMode { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
TrackChanges
When true
the edit control will track user edits to the document
as revisions instead of actually inserting or deleting content.
Default is false
.
Declaration
bool TrackChanges { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
ApplyAllDocumentRevisions()
Applies the content of all revision markers in the document.
Content will be applied according to the revision properties associated with the marker: content marked with Insert will be added to the document and the revision markers removed while content marked with Delete will be removed from the document along with the revision markers.
Declaration
void ApplyAllDocumentRevisions()
ApplyQuickTagToSelection(IQuickTag)
Insert a QuickTag into the document at the current selection.
If the QuickTag contains a content placeholder and the selection is not empty the selected content will be moved into the corresponding location after the QuickTag has been inserted. If the selection is empty the cursor will be placed at the location instead.
If the QuickTag does not contain a content placeholder any current selection will be overwritten by the content from the QuickTag.
Declaration
void ApplyQuickTagToSelection(IQuickTag quickTag)
Parameters
Type | Name | Description |
---|---|---|
IQuickTag | quickTag | The QuickTag definition for the tag to insert. Must not be |
ApplyRevisionsAtSelection()
Apply the content of a revision marker to the current selection.
Content will be applied according to the revision properties associated with the marker: content marked with Insert will be added to the document and the revision markers removed while content marked with Delete will be removed from the document along with the revision markers.
Declaration
void ApplyRevisionsAtSelection()
Remarks
If the selection is considered empty (the start and end are at the same location) then the first parent container that is an IRevisionMarker will be taken as the revision to apply.
If the selection is not empty then any revision content within the range of the selection will be applied to the document. If the selection range spans only part of a revision marker then only that part of the selection range will be applied - the rest of the revision marker content will remain.
ChangeParagraphTextDirection(IParagraph, Direction)
Allows manual override of the text direction of the paragraph. These changes will be stored in the undo buffer so can be reversed by undo commands.
Declaration
void ChangeParagraphTextDirection(IParagraph paragraph, Direction textDirection)
Parameters
Type | Name | Description |
---|---|---|
IParagraph | paragraph | The paragraph to change the text direction of. |
Direction | textDirection | The text direction to apply to the paragraph. |
CleanHiddenTags(ContentRange)
Cleans the range by removing any tags that can be hidden and do not contain anything between the start and end tags.
Declaration
void CleanHiddenTags(ContentRange range)
Parameters
Type | Name | Description |
---|---|---|
ContentRange | range |
DeleteToEndOfRow()
Deletes the content of the row from the active end of the selection to the end of the row.
Declaration
void DeleteToEndOfRow()
DeleteToNextTag()
Deletes the content of the row from the active end of the selection to the next tag. This could be a start or end tag, a hidden formatting tag, a placeholder tag, or the end of the row.
Declaration
void DeleteToNextTag()
ExtendSelectionToNextRow()
Extends the current selection to include the content of the next row. If there currently is no selection or there is no previous row visible then the selection will not be changed.
Declaration
void ExtendSelectionToNextRow()
ExtendSelectionToPreviousRow()
Extends the current selection to include the content of the previous row. If there currently is no selection or there is no previous row visible then the selection will not be changed.
Declaration
void ExtendSelectionToPreviousRow()
IsLockedRange(ContentRange)
Tests whether the range can be safely edited or whether doing so would affect locked content.
Declaration
bool IsLockedRange(ContentRange range)
Parameters
Type | Name | Description |
---|---|---|
ContentRange | range | The range to test. |
Returns
Type | Description |
---|---|
System.Boolean |
|
IsLockProtectionEnforced()
Returns true
if lock protection should be enforced on this edit control.
Can be false when intentionally removing locked content.
Declaration
bool IsLockProtectionEnforced()
Returns
Type | Description |
---|---|
System.Boolean |
IsRevisionProtectionEnforced()
Returns true
if revision protection should be enforced on this edit control.
Can be false when intentionally removing revision content.
Declaration
bool IsRevisionProtectionEnforced()
Returns
Type | Description |
---|---|
System.Boolean |
LockSelection()
Locks content of the current selection (disables it from localized editing).
Declaration
void LockSelection()
Exceptions
Type | Condition |
---|---|
EditException | Thrown when the content of the selection cannot be locked. |
MergeIdenticalNeighboringTags(ContentRange)
Merges neighboring tags that are identical to each other.
Declaration
void MergeIdenticalNeighboringTags(ContentRange range)
Parameters
Type | Name | Description |
---|---|---|
ContentRange | range |
MoveEmptySelectionToSpanSurroundingWord()
Extends an empty selection in both directions so that it covers the full word the selection was originally in the middle of.
Declaration
bool MoveEmptySelectionToSpanSurroundingWord()
Returns
Type | Description |
---|---|
System.Boolean |
|
RebuildRowStructure()
Force rebuild internal row stucture now instead of waiting for first redraw.
Declaration
void RebuildRowStructure()
RejectAllDocumentRevisions()
Rejects the content of all revision markers in the document.
Content will be rejected according to the revision properties associated with the marker: content marked with Insert will be removed from the document and the revision markers removed while content marked with Delete will be restored to the document and the revision markers removed.
Declaration
void RejectAllDocumentRevisions()
RejectRevisionsAtSelection()
Reject the content of a revision marker in the current selection.
Content will be rejected according to the revision properties associated with the marker: content marked with Insert will be removed from the document and the revision markers removed while content marked with Delete will be restored to the document and the revision markers removed.
Declaration
void RejectRevisionsAtSelection()
Remarks
If the selection is considered empty (the start and end are at the same location) then the first parent container that is an IRevisionMarker will be taken as the revision to remove.
If the selection is not empty then any revision content within the range of the selection will be rejected from the document. If the selection range spans only part of a revision marker then only that part of the selection range will be rejected - the rest of the revision marker content will remain.
RemoveFormattingFromSelection()
Removes all tag pairs from within the selected range and splits any tag pairs surrounding the selection so that the selected range is no longer a part of any internal tag pair.
Declaration
void RemoveFormattingFromSelection()
Remarks
If the selection is empty then the tag pairs will be split around the empty selection, with the cursor moving to the center of the insertion.
SetDelayedSegmentActivation(Boolean)
Turns on/off delayed segment activation at user click. Default is on.
Declaration
void SetDelayedSegmentActivation(bool on)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | on |
SetRevisionProtectionEnforced(Boolean)
Sets whether revision protection should be enforced in the edit control. Note: This should be set with caution and may be changed by the editor if required for certain functions.
Declaration
void SetRevisionProtectionEnforced(bool isEnforced)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | isEnforced | When |
TrimSelectionEnd()
Trims any space from the end of the current selection if the selection spans text.
Declaration
void TrimSelectionEnd()
Remarks
This method will not move the selection under the following circumstances:
when the selection is empty, when it is reversed and when it only spans whitespace.
In other cases the Selection.UpTo
will be moved backwards to the end of the
last character position.
This is most commonly used when applying formatting or other tags to a user selection and trying to emulate MS Word behavior (that is, the selection spans a word and trailing whitespace but the formatting is only applied to the word itself).
UnlockSelection()
Unlocks the content of the current selection (enables it for localized editing).
Declaration
void UnlockSelection()
Exceptions
Type | Condition |
---|---|
EditException | Thrown when the content of the selection cannot be unlocked. |
Events
RowStructureRebuilt
Fired whenever the row structure is rebuilt. This is used by the ISideBySideEditor to re-determine which rows should be visible.
Declaration
event EventHandler<RowsChangedEventArgs> RowStructureRebuilt
Event Type
Type | Description |
---|---|
System.EventHandler<RowsChangedEventArgs> |