// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt) // This code is distributed under the GNU LGPL (for details please see \doc\license.txt) using System; using System.Collections.Generic; using System.Windows; using System.Windows.Input; using System.Windows.Media; namespace ICSharpCode.AvalonEdit.Rendering { /// /// The control that contains the text. /// /// This control is used to allow other UIElements to be placed inside the TextView but /// behind the text. /// The text rendering process (VisualLine creation) is controlled by the TextView, this /// class simply displays the created Visual Lines. /// /// /// This class does not contain any input handling and is invisible to hit testing. Input /// is handled by the TextView. /// This allows UIElements that are displayed behind the text, but still can react to mouse input. /// sealed class TextLayer : Layer { /// /// the index of the text layer in the layers collection /// internal int index; public TextLayer(TextView textView) : base(textView, KnownLayer.Text) { } protected override void OnRender(DrawingContext drawingContext) { base.OnRender(drawingContext); textView.RenderTextLayer(drawingContext); } } }