diff --git a/NitroDebugger/DataStructure.cs b/NitroDebugger/DataStructure.cs new file mode 100644 index 0000000..59fed42 --- /dev/null +++ b/NitroDebugger/DataStructure.cs @@ -0,0 +1,45 @@ +// +// DataStructure.cs +// +// Author: +// Benito Palacios Sánchez +// +// Copyright (c) 2015 Benito Palacios Sánchez +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +using System; + +namespace NitroDebugger +{ + public abstract class DataStructure + { + public abstract void Read(); + public abstract void Write(); + } + + [AttributeUsage(AttributeTargets.Property, AllowMultiple = false)] + public class DataDescription : Attribute + { + public DataDescription(string description) + { + Description = description; + } + + public string Description { + get; + private set; + } + } +} + diff --git a/NitroDebugger/NitroDebugger.csproj b/NitroDebugger/NitroDebugger.csproj index e2575e1..3d2da9a 100644 --- a/NitroDebugger/NitroDebugger.csproj +++ b/NitroDebugger/NitroDebugger.csproj @@ -39,6 +39,10 @@ ..\libgame\libs\mono-addins\bin\Mono.Addins.dll + + + + @@ -69,6 +73,9 @@ + + + diff --git a/NitroDebugger/StructPanel.cs b/NitroDebugger/StructPanel.cs new file mode 100644 index 0000000..97ff0ae --- /dev/null +++ b/NitroDebugger/StructPanel.cs @@ -0,0 +1,53 @@ +// +// StructPanel.cs +// +// Author: +// Benito Palacios Sánchez +// +// Copyright (c) 2015 Benito Palacios Sánchez +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +using System; +using System.Linq; +using System.Reflection; +using Gtk; +using Mono.Addins; + +namespace NitroDebugger +{ + [TypeExtensionPoint] + public abstract class StructPanel : VisualPlugin + where T : DataStructure, new() + { + VBox container; + + protected StructPanel() + { + container = new VBox(); + Data = new T(); + + Data.Read(); + } + + public override Container MainContainer { + get { return container; } + } + + public T Data { + get; + private set; + } + } +} + diff --git a/NitroDebugger/VisualPlugin.cs b/NitroDebugger/VisualPlugin.cs new file mode 100644 index 0000000..4fbe26b --- /dev/null +++ b/NitroDebugger/VisualPlugin.cs @@ -0,0 +1,35 @@ +// +// VisualPlugin.cs +// +// Author: +// Benito Palacios Sánchez +// +// Copyright (c) 2015 Benito Palacios Sánchez +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +using System; +using Gtk; +using Mono.Addins; + +namespace NitroDebugger +{ + [TypeExtensionPoint] + public abstract class VisualPlugin : Plugin + { + public abstract Container MainContainer { + get; + } + } +} +