Supplies ruler geometry and applies marker changes to the active RadRichTextBox document.
Definition
Namespace:Telerik.WinControls.RichTextEditor.UI
Assembly:Telerik.WinControls.RichTextEditor.dll
Syntax:
public class RadRichTextBoxRulerController : IDocumentRulerController
Inheritance: objectRadRichTextBoxRulerController
Implements:
Constructors
Initializes a controller that tracks the editor's active paragraph and layout changes.
public RadRichTextBoxRulerController(RadRichTextBox richTextBox)
The editor whose document is reflected by the ruler.
Methods
Adds a tab stop to the current paragraph.
public void AddTabStop(TabStopInfo tabStop)
The alignment and position of the new tab stop.
Implements:
Moves an existing tab stop in the current paragraph.
public void ChangeTabStopPosition(TabStopInfo tabStopInfo, double offset)
The new position of the tab stop.
Implements:
Gets the default tab-stop positions that fall within the specified paragraph width.
Gets the text flow direction, using the containing table's direction when the caret is inside a table.
public FlowDirection GetFlowDirection()
The active text flow direction.
Implements:
Gets the margin, table-column, or section-column separators for the current editing position.
public IEnumerable<SeparatorInfo> GetHorizontalSeparators()
IEnumerable<SeparatorInfo>
The horizontal separators to display.
Implements:
Gets the current paragraph's indent values and the separators that bound its text area.
public void GetIndents(out FlowDirection textFlowDirection, out SeparatorInfo leftSeparator, out SeparatorInfo rightSeparator, out double firstLineIndent, out double hangingIndent, out double rightIndent, out double columnLeftOffset, out double columnRightOffset)
Receives the current paragraph's text direction.
leftSeparatorSeparatorInfoReceives the separator on the paragraph's leading side, or null when no paragraph is active.
rightSeparatorSeparatorInfoReceives the separator on the paragraph's trailing side, or null when no paragraph is active.
firstLineIndentdoubleReceives the first-line indent including the active column offset, or -1 when no paragraph is active.
hangingIndentdoubleReceives the left indent including the active column offset, or -1 when no paragraph is active.
rightIndentdoubleReceives the right indent including the active column offset, or -1 when no paragraph is active.
columnLeftOffsetdoubleReceives the left offset of the active section column, or 0 when not in a section column.
columnRightOffsetdoubleReceives the right offset of the active section column, or 0 when not in a section column.
Implements:
Gets the flow direction used to lay out ruler markers for the current paragraph or table.
public FlowDirection GetMarkersFlowDirection()
The marker flow direction.
Implements:
Gets the current section's bounds in the editor view.
public Rect GetPageSizeAndPosition()
The section rectangle, or an empty rectangle when bounds are unavailable.
Implements:
Gets the editor's horizontal and vertical scale factors for converting document geometry to ruler coordinates.
public Size GetScaleFactor()
The scale factors, with horizontal and vertical values in the width and height components.
Implements:
Gets the tab stops active for the current paragraph, including stops merged from its style.
public IEnumerable<TabStopInfo> GetTabStops()
IEnumerable<TabStopInfo>
The tab stops represented by ruler markers.
Implements:
Gets the margin and, when editing inside a table, row separators for the current editing position.
public IEnumerable<SeparatorInfo> GetVerticalSeparators()
IEnumerable<SeparatorInfo>
The vertical separators to display.
Implements:
Determines whether dragging a section-column separator would leave a valid equal-column spacing.
public bool IsValidColumnSeparatorChange(SeparatorInfo separatorInfo, double currentPosition, double horizontalChange)
The section-column separator being dragged.
currentPositiondoubleThe current separator position in document coordinates.
horizontalChangedoubleThe proposed horizontal movement.
Returns:true when equal-column spacing remains above the minimum and below the calculated maximum; otherwise, false.
Implements:
Raises PageChanged after the ruler's section bounds or scale changes.
protected virtual void OnPageChanged()
Raises SeparatorsChanged when ruler separator or marker data must be refreshed.
protected virtual void OnSeparatorsChanged()
Removes a tab stop from the current paragraph.
public void RemoveTabStop(TabStopInfo tabStop)
The tab stop returned by GetTabStops().
Implements:
Sets the first-line indent for the current paragraph.
public void SetSeparatorFirstLineIndent(double indent)
The first-line indent position shown by the ruler.
Implements:
Applies the supplied first-line and hanging-indent values to the current paragraph.
public void SetSeparatorFirstLineIndentAndHangingIndent(double firstLineIndent, double hangingIndent)
The first-line indent value supplied by the ruler.
hangingIndentdoubleThe hanging-indent value supplied by the ruler.
Implements:
The built-in controller currently applies
hangingIndentand does not usefirstLineIndent.
Sets the paragraph's left indent while preserving the previous first-line position.
public void SetSeparatorHangingIndent(double indent)
The hanging-indent position shown by the ruler.
Implements:
Applies a dragged separator value to the corresponding page margin, table size, or section-column spacing.
public void SetSeparatorOffset(SeparatorInfo separator, double offset)
The separator being moved.
offsetdoubleThe new value interpreted according to Type. For section-column separators, the built-in controller instead reads Offset.
Implements:
Sets the paragraph's right indent, clamping negative values to zero.
public void SetSeparatorRightIndent(double indent)
The right-indent position shown by the ruler.
Implements:
Events
Occurs when the current section bounds or scale changes and the ruler must update its geometry.
public event EventHandler<EventArgs> PageChanged
Implements:
Occurs when paragraph, table, or section formatting changes the ruler separators or markers.
public event EventHandler<EventArgs> SeparatorsChanged
Implements: