diff options
Diffstat (limited to 'Software/Visual_Studio/Scripting/Tango.Scripting.Editors/Rendering/Layer.cs')
| -rw-r--r-- | Software/Visual_Studio/Scripting/Tango.Scripting.Editors/Rendering/Layer.cs | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/Software/Visual_Studio/Scripting/Tango.Scripting.Editors/Rendering/Layer.cs b/Software/Visual_Studio/Scripting/Tango.Scripting.Editors/Rendering/Layer.cs new file mode 100644 index 000000000..0d4777813 --- /dev/null +++ b/Software/Visual_Studio/Scripting/Tango.Scripting.Editors/Rendering/Layer.cs @@ -0,0 +1,43 @@ +// 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.Diagnostics; +using System.Windows; +using System.Windows.Media; + +namespace Tango.Scripting.Editors.Rendering +{ + /// <summary> + /// Base class for known layers. + /// </summary> + class Layer : UIElement + { + protected readonly TextView textView; + protected readonly KnownLayer knownLayer; + + public Layer(TextView textView, KnownLayer knownLayer) + { + Debug.Assert(textView != null); + this.textView = textView; + this.knownLayer = knownLayer; + this.Focusable = false; + } + + protected override GeometryHitTestResult HitTestCore(GeometryHitTestParameters hitTestParameters) + { + return null; + } + + protected override HitTestResult HitTestCore(PointHitTestParameters hitTestParameters) + { + return null; + } + + protected override void OnRender(DrawingContext drawingContext) + { + base.OnRender(drawingContext); + textView.RenderBackground(drawingContext, knownLayer); + } + } +} |
