Skip to main content
Box

PlainTextBox.Accept(LayoutVisitor) Method

Dispatches to the Visit method that is specific to the current LayoutType.

Namespace: DevExpress.XtraRichEdit.API.Layout

Assembly: DevExpress.RichEdit.v23.2.Core.dll

NuGet Packages: DevExpress.RichEdit.Core, DevExpress.Win.Navigation

Declaration

public override void Accept(
    LayoutVisitor visitor
)

Parameters

Name Type Description
visitor LayoutVisitor

A LayoutVisitor implementation that is the instance of the visitor class defined in the Visitor pattern.

Remarks

The Accept method calls a specific Visit method of the visitor; the PlainTextBox passes itself as an argument to the Visit method being called.

To illustrate the approach, consider the situation in which the LayoutElement.Type property of the current PlainTextBox object is the LayoutType.SpaceBox. The Accept method dispatches the call to the VisitSpaceBox method of the visitor instance. The visitor instance is the parameter passed to the Accept method.

The VisitSpaceBox method is a virtual protected method of the LayoutVisitor class. Implement it by overriding the VisitSpaceBox method in the LayoutVisitor descendant (the visitor). In this situation, it will process the SpaceBox layout elements.

See Also