New to Telerik UI for WinForms? Start a free 30-day trial

Defines the view, caret, selection, and scrolling operations required by a document presenter.

The print presenter also implements this interface for rendering, but does not provide interactive caret, scroll-offset, or hit-testing behavior.

Definition

Namespace:Telerik.WinForms.RichTextEditor

Assembly:Telerik.WinControls.RichTextEditor.dll

Syntax:

C#
public interface IDocumentEditorPresenter : IDisposable

Inherited Members IDisposable.Dispose()

Properties

Gets or sets the horizontal alignment of the presenter in its host.

C#
HorizontalAlignment HorizontalAlignment { get; set; }

Gets the current horizontal scroll offset in document coordinates.

C#
double HorizontalOffset { get; }

Gets whether the presenter currently has keyboard focus.

C#
bool IsFocused { get; }

Gets or sets the RadRichTextBox whose document is displayed by this presenter.

C#
RadRichTextBox Owner { get; set; }

Gets the height of the presenter's scrollable document content.

C#
double ScrollableHeight { get; }

Gets the width of the presenter's scrollable document content.

C#
double ScrollableWidth { get; }

Gets the current vertical scroll offset in document coordinates.

C#
double VerticalOffset { get; }

Gets the height of the visible presenter viewport.

C#
double ViewportHeight { get; }

Gets the width of the visible presenter viewport.

C#
double ViewportWidth { get; }

Methods

Reinitializes presenter state and document-position handlers after the owner's document changes.

C#
void DoOnDocumentChanged()

Detaches presenter state and document-position handlers before the owner's document changes.

C#
void DoOnDocumentChanging()

Gives keyboard focus to the insertion caret.

C#
void FocusCaret()

Gets the bounds of the section containing the caret in presenter coordinates.

C#
Rect GetCurrentSectionBoundsInView()
Returns:

Rect

Converts a point in the presenter viewport to document coordinates, accounting for scrolling and scaling.

C#
Point GetDocumentPointFromViewPoint(Point viewPoint)
Parameters:viewPointPoint

A point relative to the presenter's viewport.

Returns:

Point

The corresponding point in document coordinates.

Exceptions: NotImplementedException

The presenter is rendering the print view.

Converts a point in the presenter viewport to the corresponding document position.

C#
DocumentPosition GetDocumentPositionFromViewPoint(Point viewPoint)
Parameters:viewPointPoint

A point relative to the presenter's viewport.

Returns:

DocumentPosition

The document position under the point.

Exceptions: NotImplementedException

The presenter is rendering the print view.

Converts a document position to a point in the presenter's viewport.

C#
Point GetViewPointFromDocumentPosition(DocumentPosition position)
Parameters:positionDocumentPosition

The document position to convert.

Returns:

Point

The viewport point corresponding to the position.

Moves the caret down by approximately one viewport page.

C#
void HandlePageDown()

Moves the caret up by approximately one viewport page.

C#
void HandlePageUp()

Hides the insertion caret.

C#
void HideCaret()

Hides the drag-and-drop insertion marker.

C#
void HideDropMarker()

Invalidates the presenter's arrangement so its children are repositioned.

C#
void InvalidatePresenterArrange()

Invalidates the presenter's measurement so its desired size is recalculated.

C#
void InvalidatePresenterMeasure()

Moves the drag-and-drop insertion marker to another document position.

C#
void MoveDropMarker(DocumentPosition position)
Parameters:positionDocumentPosition

The new insertion position.

Rebuilds the presenter's visual elements for its current owner document.

C#
void RecreateUI()

Scrolls the presenter to the specified horizontal content offset.

C#
void ScrollToHorizontalOffset(double offset)
Parameters:offsetdouble

The horizontal offset to apply.

Exceptions: ArgumentOutOfRangeException

The offset is NaN.

NotSupportedException

The presenter is rendering a print view.

Scrolls the viewport until the specified note is visible.

C#
void ScrollToNote(Note note)
Parameters:noteNote

The note to bring into view.

Scrolls the presenter to the specified vertical content offset.

C#
void ScrollToVerticalOffset(double offset)
Parameters:offsetdouble

The vertical offset to apply.

Exceptions: ArgumentOutOfRangeException

The offset is NaN.

NotSupportedException

The presenter is rendering a print view.

Makes the insertion caret visible.

C#
void ShowCaret()

Displays the drag-and-drop insertion marker at a document position.

C#
void ShowDropMarker(DocumentPosition position)
Parameters:positionDocumentPosition

The position where content would be inserted.

Refreshes caret-specific visual and input settings from the owner.

C#
void UpdateCaretProperties()

Recalculates the caret's dimensions for the current document position and zoom.

C#
void UpdateCaretSize()

Immediately processes pending layout changes for the presenter.

C#
void UpdateLayout()

Refreshes the presenter's proofing text-decorations layer.

C#
void UpdateProofingTextDecoration()

Updates the scroll position to bring a document position into view.

C#
void UpdateScrollOffsetFromDocumentPosition(DocumentPosition documentPosition)
Parameters:documentPositionDocumentPosition

The document position to reveal.