InlineLayoutBox
Base class for non-container layout boxes that represent inline content and its positions within a paragraph.
Definition
Namespace:Telerik.WinForms.Documents.Layout
Assembly:Telerik.WinControls.RichTextEditor.dll
Syntax:
public abstract class InlineLayoutBox : LayoutBox, IDisposable, INotifyPropertyChanged, ICustomTypeDescriptor
Inheritance: objectDisposableObjectRadObjectLayoutElementLayoutBoxInlineLayoutBox...
Derived Classes:
Implements:
Inherited Members
Constructors
Initializes an inline layout box for a document element and specifies whether it is a fragment.
public InlineLayoutBox(DocumentElement associatedDocumentElement, DocumentStructureCollection collection, bool isFragment)
The inline document element represented by the box.
collectionDocumentStructureCollectionThe document structure collection that owns the box.
isFragmentbooltrue when the box is a fragment of the document element.
Initializes a non-fragment inline layout box for a document element.
public InlineLayoutBox(DocumentElement associatedDocumentElement, DocumentStructureCollection collection)
The inline document element represented by the box.
collectionDocumentStructureCollectionThe document structure collection that owns the box.
Initializes a non-fragment inline layout box and creates a document structure collection when none is supplied.
public InlineLayoutBox(DocumentElement associatedDocumentElement)
The inline document element represented by the box.
Properties
Gets the document inline represented by this box.
public Inline AssociatedInline { get; }
Gets the distance from the top of the box to its text baseline.
public abstract float BaselineOffset { get; }
Gets whether this box's width must be included when calculating the visible width from the end of a line. Trailing boxes without this flag can be excluded from that line-width calculation.
public abstract bool HasWidthAtTheEndOfLine { get; }
Gets whether this inline box is a leaf in the layout tree.
public override bool IsContainerBox { get; }
Overrides:
Gets whether the represented content is read-only, as formatting symbols are.
public abstract bool IsReadonly { get; }
Gets whether the associated span flows right-to-left, excluding decimal-number boxes and end-of-line symbols.
public bool IsRtl { get; }
Gets whether the box can be divided into separate layout fragments.
public abstract bool IsSplittable { get; }
Gets whether this box is the first inline box in its line segment.
public bool IsStartOfLineSegment { get; }
Gets the paragraph line information assigned to this box during layout.
public ParagraphLineInfo LineInfo { get; }
Gets the line-segment information assigned to this box during layout.
public ParagraphLineSegmentInfo LineSegmentInfo { get; }
Gets the number of logical text positions represented by this box.
public abstract int PositionsCountInBox { get; }
Methods
Creates a fragment for the specified available width. The base implementation does not provide fragment creation; concrete inline boxes must override this method.
public virtual LayoutBox CreateNewFragment(float availableWidth, bool isFirstBoxInLine)
The available width passed to the concrete box's fragment-creation logic.
isFirstBoxInLinebooltrue when this box is the first in its line.
Returns:A new layout fragment when the concrete box can be split.
Exceptions: InvalidOperationExceptionThe base implementation does not support fragment creation.
Creates a position handler for navigating the positions represented by this inline box.
public override PositionHandler GetPositionHandler()
An inline-box position handler.
Overrides:
The base inline box does not support merging.
public override void MergeWithNext(LayoutBox nextSpanBox)
The following box; the base implementation does not use it.
Exceptions: InvalidOperationExceptionThe base implementation does not support merging inline boxes.
Overrides:
Removes this box from its paragraph and invalidates layout; fragments also invalidate long-word fragmentation.
public void Remove()