Interface IAbstractFrameworkEditControl
Base interface for filter framework specific edit controls such as the IFrameworkEditControl and the ISegmentEditControl.
Inherited Members
Namespace: SdlSdl.DesktopEditorEditorApi
Assembly: Sdl.DesktopEditor.EditorApi.dll
Syntax
public interface IAbstractFrameworkEditControl : IEditControl, IControl, IDisposable
Properties
Document
The document containing the data shown in the edit control. Setting this property completely re-formats the edit control.
Declaration
IAbstractFrameworkDocument Document { get; set; }
Property Value
Type | Description |
---|---|
IAbstractFrameworkDocument |
EditControlDisplaySettings
The display settings that will be used when rendering the document in the edit control, mostly involving display colors and formatting. These settings are mainly intended for use when adjusting settings for users with disabilities.
Declaration
EditControlDisplaySettings EditControlDisplaySettings { get; }
Property Value
Type | Description |
---|---|
EditControlDisplaySettings |
Font
The default font that will be used by the edit control to display text. IMPORTANT: Setting this property to another value will result in a memory leak unless the font is managed externally and disposed of correctly when it is no longer required - the edit control does NOT take memory ownership of fonts set here.
Declaration
Font Font { get; set; }
Property Value
Type | Description |
---|---|
Font |
HideHideableTags
When true
any tags with CanHide
set to true
will not be shown in the editor.
Declaration
bool HideHideableTags { get; set; }
Property Value
Type | Description |
---|---|
bool |
Remarks
Hidden tags can still be manipulated through normal editing operations in the surrounding text, so they may get accidentally deleted!
SuppressFormatting
When true
all semi-WYSIWYG formatting information will be ignored
and all text in the control will be formatted using the default font and
foreground color of the Control.
Declaration
bool SuppressFormatting { get; set; }
Property Value
Type | Description |
---|---|
bool |
Remarks
NOTE: It is important to set the HideHideableTags to true
if this setting is enabled, otherwise there will be no visual indication
to the presence of hidden tags, as the surrounding text will all have the
same formatting.
This setting is off by default.
Note that font fallback will still be in effect, which may cause a different font to be used for characters that cannot be displayed using the default font.
Note that font adaptation settings will still take affect, causing the default font to be adjusted according to the settings.
TagDisplayMode
The tag display mode used for this entire edit control. This setting is used to determine the text that should be displayed on tags in the control.
Declaration
TagDisplayMode TagDisplayMode { get; set; }
Property Value
Type | Description |
---|---|
TagDisplayMode |
Remarks
In a side-by-side edit control the TagDisplayMode changes tag display for both source and target controls, while this property can be used to set different modes for source and target.
ToolTipContentDelegate
The delegate that will be used to get the content for Match Repair tooltips
Declaration
Func<IAbstractContentNode, string> ToolTipContentDelegate { get; set; }
Property Value
Type | Description |
---|---|
FuncIAbstractContentNodestring |
Methods
CopySelection()
Filter framework specific version of CopySelection() that returns a filter framework specific document fragment.
Declaration
IDocumentFragment CopySelection()
Returns
Type | Description |
---|---|
IDocumentFragment | A document fragment containing a changeable copy of the current selection. |
Remarks
May throw Sdl.DesktopEditor.EditorApi.EditExeption
if the selection cannot be copied (e.g. if it contains
non-framework nodes or non-cloneable nodes such as Paragraph Units or Files).
CopySelectionInternal(bool)
Returns the document selection, allowing pre-extending it to include the revision marker.
Declaration
IDocumentFragment CopySelectionInternal(bool extendToIncludeRevision)
Parameters
Type | Name | Description |
---|---|---|
bool | extendToIncludeRevision |
Returns
Type | Description |
---|---|
IDocumentFragment |
FindCustomColumnAtPoint(Point)
Finds the custom column located at the provided device point. Returns null
if there is no custom column
at that point.
Declaration
ICustomColumn FindCustomColumnAtPoint(Point screenPoint)
Parameters
Type | Name | Description |
---|---|---|
Point | screenPoint | The device point to search for a custom column. |
Returns
Type | Description |
---|---|
ICustomColumn | The custom column at that point or |
HideRows(IList<int>)
Removes the rows matching the provided row numbers from the layout and hides them in the edit control. This method will refresh the edit control and cause a fill layout to be performed in order to remove the rows properly.
Declaration
void HideRows(IList<int> rowNumbers)
Parameters
Type | Name | Description |
---|---|---|
IListint | rowNumbers | The list of row numbers that should be hidden. |
Remarks
This method should only be used when specific rows in this edit control need to be hidden, no other edit control will be updated with these changes (for example, it will produce strange results in the SideBySideEditor). In most situations SetRowsVisibility(Predicate<IRowInfo>) should be used instead.
IsRedoCommandSource()
Used in SideBySide editor to determine which control to use
Declaration
bool IsRedoCommandSource()
Returns
Type | Description |
---|---|
bool | True if the redo is to be performed in a source segment |
IsUndoCommandSource()
Used in SideBySide editor to determine which control to use
Declaration
bool IsUndoCommandSource()
Returns
Type | Description |
---|---|
bool | True if the undo is to be performed in a source segment |
ReplaceSelection(IDocumentFragment)
Replace the current selection with the content of a filter framework specific document fragment.
Declaration
void ReplaceSelection(IDocumentFragment newContent)
Parameters
Type | Name | Description |
---|---|---|
IDocumentFragment | newContent | The document fragment containing the content that will be used to replace the current selection. This document fragment can be obtained from multiple locations, including: CopySelection() and CreateDocumentFragment(). |
RestoreGhostTagsInSelection()
Restores any ghost tags in the current selection to normal tags.
Declaration
void RestoreGhostTagsInSelection()
ShowRows(IList<int>)
Adds the rows matching the provided row numbers to the layout and displays them in the edit control. This method will refresh the edit control and cause a full layout to be performed in order to display the rows properly.
Declaration
void ShowRows(IList<int> rowNumbers)
Parameters
Type | Name | Description |
---|---|---|
IListint | rowNumbers | The list of row numbers that should be shown. |
Remarks
This method should only be used when specific rows in this edit control need to be displayed, no other edit control will be updated with these changes (for example, it will produce strange results in the SideBySideEditor). In most situations SetRowsVisibility(Predicate<IRowInfo>) should be used instead.