aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Debugger/UI/DebuggerWidget.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx.Debugger/UI/DebuggerWidget.cs')
-rw-r--r--Ryujinx.Debugger/UI/DebuggerWidget.cs42
1 files changed, 42 insertions, 0 deletions
diff --git a/Ryujinx.Debugger/UI/DebuggerWidget.cs b/Ryujinx.Debugger/UI/DebuggerWidget.cs
new file mode 100644
index 00000000..b2d8458d
--- /dev/null
+++ b/Ryujinx.Debugger/UI/DebuggerWidget.cs
@@ -0,0 +1,42 @@
+using Gtk;
+using System;
+using GUI = Gtk.Builder.ObjectAttribute;
+
+namespace Ryujinx.Debugger.UI
+{
+ public class DebuggerWidget : Box
+ {
+ public event EventHandler DebuggerEnabled;
+ public event EventHandler DebuggerDisabled;
+
+ [GUI] Notebook _widgetNotebook;
+
+ public DebuggerWidget() : this(new Builder("Ryujinx.Debugger.UI.DebuggerWidget.glade")) { }
+
+ public DebuggerWidget(Builder builder) : base(builder.GetObject("_debuggerBox").Handle)
+ {
+ builder.Autoconnect(this);
+
+ LoadProfiler();
+ }
+
+ public void LoadProfiler()
+ {
+ ProfilerWidget widget = new ProfilerWidget();
+
+ widget.RegisterParentDebugger(this);
+
+ _widgetNotebook.AppendPage(widget, new Label("Profiler"));
+ }
+
+ public void Enable()
+ {
+ DebuggerEnabled.Invoke(this, null);
+ }
+
+ public void Disable()
+ {
+ DebuggerDisabled.Invoke(this, null);
+ }
+ }
+}