IDocumentRulerController
Supplies the ruler with document geometry and applies changes made by dragging ruler markers.
Definition
Namespace:Telerik.WinControls.RichTextEditor.UI
Assembly:Telerik.WinControls.RichTextEditor.dll
Syntax:
public interface IDocumentRulerController
Methods
Adds a tab stop to the current paragraph.
void AddTabStop(TabStopInfo tabStop)
The alignment and position of the new tab stop.
Moves an existing tab stop in the current paragraph.
void ChangeTabStopPosition(TabStopInfo tabStop, double offset)
The tab stop returned by GetTabStops().
offsetdoubleThe new position of the tab stop.
Gets the text flow direction, using the containing table's direction when the caret is inside a table.
Gets the margin, table-column, or section-column separators for the current editing position.
IEnumerable<SeparatorInfo> GetHorizontalSeparators()
IEnumerable<SeparatorInfo>
The horizontal separators to display.
Gets the current paragraph's indent values and the separators that bound its text area.
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.
Gets the flow direction used to lay out ruler markers for the current paragraph or table.
Gets the current section's bounds in the editor view.
Rect GetPageSizeAndPosition()
The section rectangle, or an empty rectangle when bounds are unavailable.
Gets the editor's horizontal and vertical scale factors for converting document geometry to ruler coordinates.
Size GetScaleFactor()
The scale factors, with horizontal and vertical values in the width and height components.
Gets the tab stops active for the current paragraph, including stops merged from its style.
IEnumerable<TabStopInfo> GetTabStops()
IEnumerable<TabStopInfo>
The tab stops represented by ruler markers.
Gets the margin and, when editing inside a table, row separators for the current editing position.
IEnumerable<SeparatorInfo> GetVerticalSeparators()
IEnumerable<SeparatorInfo>
The vertical separators to display.
Determines whether dragging a section-column separator would leave a valid equal-column spacing.
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.
Removes a tab stop from the current paragraph.
void RemoveTabStop(TabStopInfo tabStop)
The tab stop returned by GetTabStops().
Sets the first-line indent for the current paragraph.
void SetSeparatorFirstLineIndent(double indent)
The first-line indent position shown by the ruler.
Applies the supplied first-line and hanging-indent values to the current paragraph.
void SetSeparatorFirstLineIndentAndHangingIndent(double firstLineIndent, double hangingIndent)
The first-line indent value supplied by the ruler.
hangingIndentdoubleThe hanging-indent value supplied by the ruler.
The built-in controller currently applies
hangingIndentand does not usefirstLineIndent.
Sets the paragraph's left indent while preserving the previous first-line position.
void SetSeparatorHangingIndent(double indent)
The hanging-indent position shown by the ruler.
Applies a dragged separator value to the corresponding page margin, table size, or section-column spacing.
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.
Sets the paragraph's right indent, clamping negative values to zero.
void SetSeparatorRightIndent(double indent)
The right-indent position shown by the ruler.
Events
Occurs when the current section bounds or scale changes and the ruler must update its geometry.
event EventHandler<EventArgs> PageChanged
Occurs when paragraph, table, or section formatting changes the ruler separators or markers.
event EventHandler<EventArgs> SeparatorsChanged