2020-02-06 12:25:47 +01:00
|
|
|
|
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;
|
|
|
|
|
|
2020-04-20 23:59:59 +02:00
|
|
|
|
#pragma warning disable CS0649
|
2020-02-06 12:25:47 +01:00
|
|
|
|
[GUI] Notebook _widgetNotebook;
|
2020-04-20 23:59:59 +02:00
|
|
|
|
#pragma warning restore CS0649
|
2020-02-06 12:25:47 +01:00
|
|
|
|
|
|
|
|
|
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);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|