From 1591c312cc70c2ad64723c0ebcbecbe4c92283af Mon Sep 17 00:00:00 2001 From: Souryo Date: Wed, 5 Aug 2015 20:40:24 -0400 Subject: [PATCH] Debugger - Added missing file --- .../BaseScrollableTextboxUserControl.cs | 61 +++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 GUI.NET/Debugger/Controls/BaseScrollableTextboxUserControl.cs diff --git a/GUI.NET/Debugger/Controls/BaseScrollableTextboxUserControl.cs b/GUI.NET/Debugger/Controls/BaseScrollableTextboxUserControl.cs new file mode 100644 index 00000000..2402f126 --- /dev/null +++ b/GUI.NET/Debugger/Controls/BaseScrollableTextboxUserControl.cs @@ -0,0 +1,61 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Mesen.GUI.Debugger.Controls +{ + public abstract class BaseScrollableTextboxUserControl : UserControl + { + protected abstract ctrlScrollableTextbox ScrollableTextbox + { + get; + } + + [DefaultValue(13F)] + public float FontSize + { + get { return this.ScrollableTextbox.FontSize; } + set { this.ScrollableTextbox.FontSize = value; } + } + + public void OpenSearchBox() + { + this.ScrollableTextbox.OpenSearchBox(); + } + + public void FindNext() + { + this.ScrollableTextbox.FindNext(); + } + + public void FindPrevious() + { + this.ScrollableTextbox.FindPrevious(); + } + + public void GoToAddress() + { + this.ScrollableTextbox.GoToAddress(); + } + + public int GetCurrentLine() + { + return this.ScrollableTextbox.CurrentLine; + } + + public void ScrollToTop() + { + this.ScrollableTextbox.ScrollToLineNumber(0); + } + + public string GetWordUnderLocation(Point position) + { + return this.ScrollableTextbox.GetWordUnderLocation(position); + } + } +}