Class DocumentStructureInfoColumn
Custom editor column showing context information for paragraph units.
Inheritance
DocumentStructureInfoColumn
Assembly: Sdl.DesktopEditor.EditorApi.dll
Syntax
public class DocumentStructureInfoColumn : AbstractCustomColumn, IInteractiveCustomColumn, ICustomColumn
Remarks
Constructors
DocumentStructureInfoColumn()
Declaration
public DocumentStructureInfoColumn()
Properties
EventFlags
Implementation handles all left mouse click events plus mouse entering and leaving a cell.
Declaration
public virtual InteractiveEventFlags EventFlags { get; }
Property Value
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
Returns
Overrides
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
Overrides
Remarks
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
GetContext(IRowInfo)
Helper function to locate the contexts associated with a row.
Declaration
protected IContextProperties GetContext(IRowInfo row)
Parameters
Returns
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
Returns
GetMainContext(IRowInfo)
The (most significant) context to be shown in the column.
Declaration
protected IContextInfo GetMainContext(IRowInfo row)
Parameters
Returns
GetMainContext(IContextProperties)
Declaration
protected IContextInfo GetMainContext(IContextProperties context)
Parameters
Returns
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
Returns
Overrides
GetText(IRowInfo)
The text to be shown in the column.
Declaration
protected virtual string GetText(IRowInfo row)
Parameters
Returns
IsFirstParagraphRow(IRowInfo)
Helper to determine if the row is the first row shown for a paragraph.
Declaration
public static bool IsFirstParagraphRow(IRowInfo row)
Parameters
Returns
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
Returns
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
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
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
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
Declaration
public virtual void OnCellMouseMove(IRowInfo row, Rectangle cellBounds, MouseEventArgs e)
Parameters
Declaration
public virtual void OnCellMouseRightDown(IRowInfo row, Rectangle cellBounds, MouseEventArgs e)
Parameters
Declaration
public virtual void OnCellMouseRightUp(IRowInfo row, Rectangle cellBounds, MouseEventArgs e)
Parameters
Performs the "click on" functionality - i.e. show details about the contexts.
Declaration
public virtual void OnCellMouseUp(IRowInfo row, Rectangle cellBounds, MouseEventArgs e)
Parameters
OnContentChanged(object, CustomColumnContentChangedEventArgs)
Fire the ContentChanged event.
Declaration
public virtual void OnContentChanged(object sender, CustomColumnContentChangedEventArgs args)
Parameters
Declaration
protected void ShowCellToolTip(IRowInfo row)
Parameters
Events
ContentChanged
Currently not used by this column.
Declaration
public event EventHandler<CustomColumnContentChangedEventArgs> ContentChanged
Event Type
Implements
Extension Methods