UILayerUpdateContext
Supplies the presenter, viewport, and section information used to update a document UI layer.
Definition
Namespace:Telerik.WinForms.Documents.UI.Layers
Assembly:Telerik.WinControls.RichTextEditor.dll
Syntax:
public class UILayerUpdateContext
Inheritance: objectUILayerUpdateContext
Constructors
Initializes a context for querying layout boxes and updating a layer.
public UILayerUpdateContext(PointF? viewOffset, RectangleF viewPort, IUILayerContainer presenter, SectionLayoutBox currentSection)
The offset used to position layout elements in the view, or null to use the viewport location.
viewPortRectangleFThe viewport rectangle used to find visible layout content.
presenterIUILayerContainerThe presenter that owns the document layout.
currentSectionSectionLayoutBoxThe section used to collect floating blocks when viewport filtering is disabled.
Properties
Gets the section used when collecting floating blocks without viewport filtering.
public SectionLayoutBox CurrentSectionBox { get; }
Gets or sets whether GetVisibleFloatingBlocks() filters floating blocks to the viewport instead of collecting all blocks in CurrentSectionBox.
public bool FilterFloatingBlocksWithViewPort { get; set; }
Visible cloned floating blocks are collected in either mode. The result is cached on this context, so set this property before the first call to GetVisibleFloatingBlocks().
Gets the presenter whose document layout is queried for this update.
public IUILayerContainer Presenter { get; }
Gets the offset subtracted from layout coordinates when positioning layer elements in the view.
public PointF ViewOffset { get; }
Gets the viewport rectangle used to determine which layout boxes intersect the visible area.
public RectangleF ViewPort { get; }
Methods
Gets floating-block layout boxes using the filtering mode selected by FilterFloatingBlocksWithViewPort.
public IEnumerable<FloatingBlockLayoutBox> GetVisibleFloatingBlocks()
IEnumerable<FloatingBlockLayoutBox>
The floating blocks selected for this context; the result is cached.
Gets visible layout boxes of the specified type.
public IEnumerable<T> GetVisibleLayoutBoxes<T>() where T : LayoutBox
IEnumerable<T>
The visible boxes that are instances of T.
Gets visible layout boxes of the specified type that satisfy a filter.
public IEnumerable<T> GetVisibleLayoutBoxes<T>(Predicate<T> filter) where T : LayoutBox
A predicate applied to boxes of type T.
IEnumerable<T>
The visible boxes that satisfy filter.
Gets visible text boxes, excluding Enter, line-break, vertical-tab, and page-break formatting symbols.
public IEnumerable<SpanLayoutBox> GetVisibleTextLayoutBoxes()
IEnumerable<SpanLayoutBox>
The visible text layout boxes used for text-level layer updates.