Class DocumentStructureInfoColumn
Custom editor column showing context information for paragraph units.
Inherited Members
Namespace: Sdl.DesktopEditor.EditorApi.Implementation
Assembly: Sdl.DesktopEditor.EditorApi.dll
Syntax
public class DocumentStructureInfoColumn : AbstractCustomColumn, IInteractiveCustomColumn, ICustomColumn
Remarks
Contexts are clickable, and the mouse cursor changes to a hand when the user moves the mouse over a cell that has context. Clicking in the column shows extended context information to the user.
The column shows the context code and uses a background color defined for the most significant context. If several contexts are available a + is appended to the context code to indicate this fact to the user.
The column also shows a tooltip with the descriptive name of the main context when the user hovers the mouse over a cell with context.
Cell boundaries are drawn as for paragraphs, i.e. top and bottom borders are only drawn for the first and last row of a paragraph, respectively.
Constructors
DocumentStructureInfoColumn()
Default constructor.
Declaration
public DocumentStructureInfoColumn()
Remarks
Contexts are clickable, and the mouse cursor changes to a hand when the user moves the mouse over a cell that has context. Clicking in the column shows extended context information to the user.
The column shows the context code and uses a background color defined for the most significant context. If several contexts are available a + is appended to the context code to indicate this fact to the user.
The column also shows a tooltip with the descriptive name of the main context when the user hovers the mouse over a cell with context.
Cell boundaries are drawn as for paragraphs, i.e. top and bottom borders are only drawn for the first and last row of a paragraph, respectively.
Properties
EventFlags
Implementation handles all left mouse click events plus mouse entering and leaving a cell.
Declaration
public virtual InteractiveEventFlags EventFlags { get; }
Property Value
Type | Description |
---|---|
InteractiveEventFlags |
Remarks
Contexts are clickable, and the mouse cursor changes to a hand when the user moves the mouse over a cell that has context. Clicking in the column shows extended context information to the user.
The column shows the context code and uses a background color defined for the most significant context. If several contexts are available a + is appended to the context code to indicate this fact to the user.
The column also shows a tooltip with the descriptive name of the main context when the user hovers the mouse over a cell with context.
Cell boundaries are drawn as for paragraphs, i.e. top and bottom borders are only drawn for the first and last row of a paragraph, respectively.
Methods
CalculateCellContentHeight(Graphics, IRowInfo)
Returns the height of the text to be displayed for this row.
Declaration
public override int CalculateCellContentHeight(Graphics g, IRowInfo row)
Parameters
Type | Name | Description |
---|---|---|
Graphics | g | |
IRowInfo | row |
Returns
Type | Description |
---|---|
Int32 |
Overrides
Remarks
Contexts are clickable, and the mouse cursor changes to a hand when the user moves the mouse over a cell that has context. Clicking in the column shows extended context information to the user.
The column shows the context code and uses a background color defined for the most significant context. If several contexts are available a + is appended to the context code to indicate this fact to the user.
The column also shows a tooltip with the descriptive name of the main context when the user hovers the mouse over a cell with context.
Cell boundaries are drawn as for paragraphs, i.e. top and bottom borders are only drawn for the first and last row of a paragraph, respectively.
DrawCell(Graphics, IRowInfo, Rectangle, Pen, Pen, Pen, Pen)
Draw the content of the cell, based on context information associated with the row.
Declaration
public override void DrawCell(Graphics g, IRowInfo row, Rectangle cellBounds, Pen leftBorderPen, Pen rightBorderPen, Pen topBorderPen, Pen bottomBorderPen)
Parameters
Type | Name | Description |
---|---|---|
Graphics | g | |
IRowInfo | row | |
Rectangle | cellBounds | |
Pen | leftBorderPen | |
Pen | rightBorderPen | |
Pen | topBorderPen | |
Pen | bottomBorderPen |
Overrides
Remarks
The most significant context is used for background and context code.
If there is no context for this row the default background and the paragraph boundaries are drawn.
DrawCellBoundaries(IRowInfo, Graphics, Rectangle, Pen, Pen, Pen, Pen)
Draw cell borders in a way that ensures paragraph boundaries are intact.
Declaration
protected void DrawCellBoundaries(IRowInfo row, Graphics g, Rectangle cellBounds, Pen leftBorderPen, Pen rightBorderPen, Pen topBorderPen, Pen bottomBorderPen)
Parameters
Type | Name | Description |
---|---|---|
IRowInfo | row | |
Graphics | g | |
Rectangle | cellBounds | |
Pen | leftBorderPen | |
Pen | rightBorderPen | |
Pen | topBorderPen | |
Pen | bottomBorderPen |
Remarks
Contexts are clickable, and the mouse cursor changes to a hand when the user moves the mouse over a cell that has context. Clicking in the column shows extended context information to the user.
The column shows the context code and uses a background color defined for the most significant context. If several contexts are available a + is appended to the context code to indicate this fact to the user.
The column also shows a tooltip with the descriptive name of the main context when the user hovers the mouse over a cell with context.
Cell boundaries are drawn as for paragraphs, i.e. top and bottom borders are only drawn for the first and last row of a paragraph, respectively.
GetContext(IRowInfo)
Helper function to locate the contexts associated with a row.
Declaration
protected IContextProperties GetContext(IRowInfo row)
Parameters
Type | Name | Description |
---|---|---|
IRowInfo | row |
Returns
Type | Description |
---|---|
IContextProperties |
|
Remarks
Contexts are clickable, and the mouse cursor changes to a hand when the user moves the mouse over a cell that has context. Clicking in the column shows extended context information to the user.
The column shows the context code and uses a background color defined for the most significant context. If several contexts are available a + is appended to the context code to indicate this fact to the user.
The column also shows a tooltip with the descriptive name of the main context when the user hovers the mouse over a cell with context.
Cell boundaries are drawn as for paragraphs, i.e. top and bottom borders are only drawn for the first and last row of a paragraph, respectively.
GetContextToolTip(IRowInfo)
Gets the tooltip to display for the current cell by finding the main context. This can be overridden to return a different tooltip.
Declaration
protected virtual string GetContextToolTip(IRowInfo row)
Parameters
Type | Name | Description |
---|---|---|
IRowInfo | row |
Returns
Type | Description |
---|---|
String |
Remarks
Contexts are clickable, and the mouse cursor changes to a hand when the user moves the mouse over a cell that has context. Clicking in the column shows extended context information to the user.
The column shows the context code and uses a background color defined for the most significant context. If several contexts are available a + is appended to the context code to indicate this fact to the user.
The column also shows a tooltip with the descriptive name of the main context when the user hovers the mouse over a cell with context.
Cell boundaries are drawn as for paragraphs, i.e. top and bottom borders are only drawn for the first and last row of a paragraph, respectively.
GetMainContext(IRowInfo)
The (most significant) context to be shown in the column.
Declaration
protected IContextInfo GetMainContext(IRowInfo row)
Parameters
Type | Name | Description |
---|---|---|
IRowInfo | row |
Returns
Type | Description |
---|---|
IContextInfo |
Remarks
Contexts are clickable, and the mouse cursor changes to a hand when the user moves the mouse over a cell that has context. Clicking in the column shows extended context information to the user.
The column shows the context code and uses a background color defined for the most significant context. If several contexts are available a + is appended to the context code to indicate this fact to the user.
The column also shows a tooltip with the descriptive name of the main context when the user hovers the mouse over a cell with context.
Cell boundaries are drawn as for paragraphs, i.e. top and bottom borders are only drawn for the first and last row of a paragraph, respectively.
GetMainContext(IContextProperties)
Custom editor column showing context information for paragraph units.
Declaration
protected IContextInfo GetMainContext(IContextProperties context)
Parameters
Type | Name | Description |
---|---|---|
IContextProperties | context |
Returns
Type | Description |
---|---|
IContextInfo |
Remarks
Contexts are clickable, and the mouse cursor changes to a hand when the user moves the mouse over a cell that has context. Clicking in the column shows extended context information to the user.
The column shows the context code and uses a background color defined for the most significant context. If several contexts are available a + is appended to the context code to indicate this fact to the user.
The column also shows a tooltip with the descriptive name of the main context when the user hovers the mouse over a cell with context.
Cell boundaries are drawn as for paragraphs, i.e. top and bottom borders are only drawn for the first and last row of a paragraph, respectively.
GetOptimalWidth(Graphics)
Returns the expected maximum width of the content in this column, by default the size of 2 wide capital letters and a plus sign.
Declaration
public override int GetOptimalWidth(Graphics g)
Parameters
Type | Name | Description |
---|---|---|
Graphics | g |
Returns
Type | Description |
---|---|
Int32 |
Overrides
Remarks
Contexts are clickable, and the mouse cursor changes to a hand when the user moves the mouse over a cell that has context. Clicking in the column shows extended context information to the user.
The column shows the context code and uses a background color defined for the most significant context. If several contexts are available a + is appended to the context code to indicate this fact to the user.
The column also shows a tooltip with the descriptive name of the main context when the user hovers the mouse over a cell with context.
Cell boundaries are drawn as for paragraphs, i.e. top and bottom borders are only drawn for the first and last row of a paragraph, respectively.
GetText(IRowInfo)
The text to be shown in the column.
Declaration
protected virtual string GetText(IRowInfo row)
Parameters
Type | Name | Description |
---|---|---|
IRowInfo | row |
Returns
Type | Description |
---|---|
String |
Remarks
Contexts are clickable, and the mouse cursor changes to a hand when the user moves the mouse over a cell that has context. Clicking in the column shows extended context information to the user.
The column shows the context code and uses a background color defined for the most significant context. If several contexts are available a + is appended to the context code to indicate this fact to the user.
The column also shows a tooltip with the descriptive name of the main context when the user hovers the mouse over a cell with context.
Cell boundaries are drawn as for paragraphs, i.e. top and bottom borders are only drawn for the first and last row of a paragraph, respectively.
IsFirstParagraphRow(IRowInfo)
Helper to determine if the row is the first row shown for a paragraph.
Declaration
public static bool IsFirstParagraphRow(IRowInfo row)
Parameters
Type | Name | Description |
---|---|---|
IRowInfo | row |
Returns
Type | Description |
---|---|
Boolean |
Remarks
Contexts are clickable, and the mouse cursor changes to a hand when the user moves the mouse over a cell that has context. Clicking in the column shows extended context information to the user.
The column shows the context code and uses a background color defined for the most significant context. If several contexts are available a + is appended to the context code to indicate this fact to the user.
The column also shows a tooltip with the descriptive name of the main context when the user hovers the mouse over a cell with context.
Cell boundaries are drawn as for paragraphs, i.e. top and bottom borders are only drawn for the first and last row of a paragraph, respectively.
IsLastParagraphRow(IRowInfo)
Helper function to determine if the row is the last row to be shown for a paragraph.
Declaration
public static bool IsLastParagraphRow(IRowInfo row)
Parameters
Type | Name | Description |
---|---|---|
IRowInfo | row |
Returns
Type | Description |
---|---|
Boolean |
Remarks
Contexts are clickable, and the mouse cursor changes to a hand when the user moves the mouse over a cell that has context. Clicking in the column shows extended context information to the user.
The column shows the context code and uses a background color defined for the most significant context. If several contexts are available a + is appended to the context code to indicate this fact to the user.
The column also shows a tooltip with the descriptive name of the main context when the user hovers the mouse over a cell with context.
Cell boundaries are drawn as for paragraphs, i.e. top and bottom borders are only drawn for the first and last row of a paragraph, respectively.
OnCellMouseDoubleClick(IRowInfo, Rectangle, MouseEventArgs)
Handled to avoid this being unintentionally processed by the edit control. The implementation does nothing.
Declaration
public virtual void OnCellMouseDoubleClick(IRowInfo row, Rectangle cellBounds, MouseEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
IRowInfo | row | |
Rectangle | cellBounds | |
MouseEventArgs | e |
Remarks
Contexts are clickable, and the mouse cursor changes to a hand when the user moves the mouse over a cell that has context. Clicking in the column shows extended context information to the user.
The column shows the context code and uses a background color defined for the most significant context. If several contexts are available a + is appended to the context code to indicate this fact to the user.
The column also shows a tooltip with the descriptive name of the main context when the user hovers the mouse over a cell with context.
Cell boundaries are drawn as for paragraphs, i.e. top and bottom borders are only drawn for the first and last row of a paragraph, respectively.
OnCellMouseDown(IRowInfo, Rectangle, MouseEventArgs)
Handled to avoid this being unintentionally processed by the edit control. The implementation does nothing.
Declaration
public virtual void OnCellMouseDown(IRowInfo row, Rectangle cellBounds, MouseEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
IRowInfo | row | |
Rectangle | cellBounds | |
MouseEventArgs | e |
Remarks
Contexts are clickable, and the mouse cursor changes to a hand when the user moves the mouse over a cell that has context. Clicking in the column shows extended context information to the user.
The column shows the context code and uses a background color defined for the most significant context. If several contexts are available a + is appended to the context code to indicate this fact to the user.
The column also shows a tooltip with the descriptive name of the main context when the user hovers the mouse over a cell with context.
Cell boundaries are drawn as for paragraphs, i.e. top and bottom borders are only drawn for the first and last row of a paragraph, respectively.
OnCellMouseEntering(IRowInfo, Rectangle, IRowInfo, Rectangle)
When the mouse enters a cell with context information the cursor is set to a hand and the tooltip is activated with the display name for the main context.
Declaration
public void OnCellMouseEntering(IRowInfo row, Rectangle cellBounds, IRowInfo leavingRow, Rectangle leavingCellBounds)
Parameters
Type | Name | Description |
---|---|---|
IRowInfo | row | |
Rectangle | cellBounds | |
IRowInfo | leavingRow | |
Rectangle | leavingCellBounds |
Remarks
Contexts are clickable, and the mouse cursor changes to a hand when the user moves the mouse over a cell that has context. Clicking in the column shows extended context information to the user.
The column shows the context code and uses a background color defined for the most significant context. If several contexts are available a + is appended to the context code to indicate this fact to the user.
The column also shows a tooltip with the descriptive name of the main context when the user hovers the mouse over a cell with context.
Cell boundaries are drawn as for paragraphs, i.e. top and bottom borders are only drawn for the first and last row of a paragraph, respectively.
OnCellMouseLeaving(IRowInfo, Rectangle, IRowInfo, Rectangle)
When the mouse leaves a cell the mouse cursor is restored and the tool tip is hidden.
Declaration
public void OnCellMouseLeaving(IRowInfo row, Rectangle cellBounds, IRowInfo enteringRow, Rectangle enteringCellBounds)
Parameters
Type | Name | Description |
---|---|---|
IRowInfo | row | |
Rectangle | cellBounds | |
IRowInfo | enteringRow | |
Rectangle | enteringCellBounds |
Remarks
Contexts are clickable, and the mouse cursor changes to a hand when the user moves the mouse over a cell that has context. Clicking in the column shows extended context information to the user.
The column shows the context code and uses a background color defined for the most significant context. If several contexts are available a + is appended to the context code to indicate this fact to the user.
The column also shows a tooltip with the descriptive name of the main context when the user hovers the mouse over a cell with context.
Cell boundaries are drawn as for paragraphs, i.e. top and bottom borders are only drawn for the first and last row of a paragraph, respectively.
OnCellMouseMove(IRowInfo, Rectangle, MouseEventArgs)
Not used.
Declaration
public virtual void OnCellMouseMove(IRowInfo row, Rectangle cellBounds, MouseEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
IRowInfo | row | |
Rectangle | cellBounds | |
MouseEventArgs | e |
Remarks
Contexts are clickable, and the mouse cursor changes to a hand when the user moves the mouse over a cell that has context. Clicking in the column shows extended context information to the user.
The column shows the context code and uses a background color defined for the most significant context. If several contexts are available a + is appended to the context code to indicate this fact to the user.
The column also shows a tooltip with the descriptive name of the main context when the user hovers the mouse over a cell with context.
Cell boundaries are drawn as for paragraphs, i.e. top and bottom borders are only drawn for the first and last row of a paragraph, respectively.
OnCellMouseRightDown(IRowInfo, Rectangle, MouseEventArgs)
Not used.
Declaration
public virtual void OnCellMouseRightDown(IRowInfo row, Rectangle cellBounds, MouseEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
IRowInfo | row | |
Rectangle | cellBounds | |
MouseEventArgs | e |
Remarks
Contexts are clickable, and the mouse cursor changes to a hand when the user moves the mouse over a cell that has context. Clicking in the column shows extended context information to the user.
The column shows the context code and uses a background color defined for the most significant context. If several contexts are available a + is appended to the context code to indicate this fact to the user.
The column also shows a tooltip with the descriptive name of the main context when the user hovers the mouse over a cell with context.
Cell boundaries are drawn as for paragraphs, i.e. top and bottom borders are only drawn for the first and last row of a paragraph, respectively.
OnCellMouseRightUp(IRowInfo, Rectangle, MouseEventArgs)
Not used.
Declaration
public virtual void OnCellMouseRightUp(IRowInfo row, Rectangle cellBounds, MouseEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
IRowInfo | row | |
Rectangle | cellBounds | |
MouseEventArgs | e |
Remarks
Contexts are clickable, and the mouse cursor changes to a hand when the user moves the mouse over a cell that has context. Clicking in the column shows extended context information to the user.
The column shows the context code and uses a background color defined for the most significant context. If several contexts are available a + is appended to the context code to indicate this fact to the user.
The column also shows a tooltip with the descriptive name of the main context when the user hovers the mouse over a cell with context.
Cell boundaries are drawn as for paragraphs, i.e. top and bottom borders are only drawn for the first and last row of a paragraph, respectively.
OnCellMouseUp(IRowInfo, Rectangle, MouseEventArgs)
Performs the "click on" functionality - i.e. show details about the contexts.
Declaration
public virtual void OnCellMouseUp(IRowInfo row, Rectangle cellBounds, MouseEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
IRowInfo | row | |
Rectangle | cellBounds | |
MouseEventArgs | e |
Remarks
Contexts are clickable, and the mouse cursor changes to a hand when the user moves the mouse over a cell that has context. Clicking in the column shows extended context information to the user.
The column shows the context code and uses a background color defined for the most significant context. If several contexts are available a + is appended to the context code to indicate this fact to the user.
The column also shows a tooltip with the descriptive name of the main context when the user hovers the mouse over a cell with context.
Cell boundaries are drawn as for paragraphs, i.e. top and bottom borders are only drawn for the first and last row of a paragraph, respectively.
OnContentChanged(Object, CustomColumnContentChangedEventArgs)
Fire the ContentChanged event.
Declaration
public virtual void OnContentChanged(object sender, CustomColumnContentChangedEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
Object | sender | |
CustomColumnContentChangedEventArgs | args |
Remarks
Contexts are clickable, and the mouse cursor changes to a hand when the user moves the mouse over a cell that has context. Clicking in the column shows extended context information to the user.
The column shows the context code and uses a background color defined for the most significant context. If several contexts are available a + is appended to the context code to indicate this fact to the user.
The column also shows a tooltip with the descriptive name of the main context when the user hovers the mouse over a cell with context.
Cell boundaries are drawn as for paragraphs, i.e. top and bottom borders are only drawn for the first and last row of a paragraph, respectively.
ShowCellToolTip(IRowInfo)
Displays the tooltip for the cell using GetContextToolTip(IRowInfo).
Declaration
protected void ShowCellToolTip(IRowInfo row)
Parameters
Type | Name | Description |
---|---|---|
IRowInfo | row |
Remarks
Contexts are clickable, and the mouse cursor changes to a hand when the user moves the mouse over a cell that has context. Clicking in the column shows extended context information to the user.
The column shows the context code and uses a background color defined for the most significant context. If several contexts are available a + is appended to the context code to indicate this fact to the user.
The column also shows a tooltip with the descriptive name of the main context when the user hovers the mouse over a cell with context.
Cell boundaries are drawn as for paragraphs, i.e. top and bottom borders are only drawn for the first and last row of a paragraph, respectively.
Events
ContentChanged
Currently not used by this column.
Declaration
public event EventHandler<CustomColumnContentChangedEventArgs> ContentChanged
Event Type
Type | Description |
---|---|
EventHandler<CustomColumnContentChangedEventArgs> |
Remarks
Contexts are clickable, and the mouse cursor changes to a hand when the user moves the mouse over a cell that has context. Clicking in the column shows extended context information to the user.
The column shows the context code and uses a background color defined for the most significant context. If several contexts are available a + is appended to the context code to indicate this fact to the user.
The column also shows a tooltip with the descriptive name of the main context when the user hovers the mouse over a cell with context.
Cell boundaries are drawn as for paragraphs, i.e. top and bottom borders are only drawn for the first and last row of a paragraph, respectively.