diff options
author | emmauss <emmausssss@gmail.com> | 2020-02-06 11:25:47 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-06 11:25:47 +0000 |
commit | f2b9a9c2b0a3d7af3b56df9ae09db8a3b2d8506c (patch) | |
tree | 7c4a0019c1c904397927567a0ad0685299cce1eb /Ryujinx.Debugger/UI/DebuggerWidget.cs | |
parent | db9f8f999f2c9a50e25685424271735ed3538539 (diff) |
Render Profiler in GUI (#854)
* move profiler output to gui
* addressed commits, rebased
* removed whitespaces
Diffstat (limited to 'Ryujinx.Debugger/UI/DebuggerWidget.cs')
-rw-r--r-- | Ryujinx.Debugger/UI/DebuggerWidget.cs | 42 |
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); + } + } +} |