From 5849c30f2e29560ab7ddfd91e84c477d9b4d5641 Mon Sep 17 00:00:00 2001 From: Justin Aquadro Date: Sun, 4 Nov 2012 23:18:25 -0500 Subject: [PATCH] Mac UI --- NBTExplorer.csproj | 25 +- NBTExplorer.sln | 84 +- NBTExplorerMac/Info.plist | 14 +- NBTExplorerMac/Mac/AppDelegate.cs | 7 +- NBTExplorerMac/Mac/AppDelegate.designer.cs | 27 +- NBTExplorerMac/Mac/EditValue.cs | 123 + NBTExplorerMac/Mac/EditValue.designer.cs | 31 +- NBTExplorerMac/Mac/EditValue.xib | 333 +- NBTExplorerMac/Mac/IconRegistry.cs | 20 + NBTExplorerMac/Mac/ImageAndTextCell.cs | 200 +- NBTExplorerMac/Mac/MainMenu.xib | 3952 ++----------------- NBTExplorerMac/Mac/MainWindow.cs | 283 ++ NBTExplorerMac/Mac/MainWindow.designer.cs | 73 +- NBTExplorerMac/Mac/MainWindow.xib | 725 +++- NBTExplorerMac/Mac/Scratch.cs | 171 +- NBTExplorerMac/Mac/TreeDataNode.cs | 47 +- NBTExplorerMac/Mac/TreeDataSource.cs | 51 +- NBTExplorerMac/MainForm.cs | 2 +- NBTExplorerMac/Model/FileTypeRegistry.cs | 2 +- NBTExplorerMac/NBTExplorerMac.csproj | 202 +- NBTExplorerMac/Program.cs | 20 +- Test/AppDelegate.cs | 24 - Test/AppDelegate.designer.cs | 10 - Test/Info.plist | 18 - Test/Main.cs | 18 - Test/MainMenu.xib | 4074 -------------------- Test/MainWindow.cs | 35 - Test/MainWindow.designer.cs | 17 - Test/MainWindow.xib | 189 - Test/MainWindowController.cs | 48 - Test/Resources/scissors.png | Bin 690 -> 0 bytes Test/Test.csproj | 88 - 32 files changed, 2645 insertions(+), 8268 deletions(-) delete mode 100644 Test/AppDelegate.cs delete mode 100644 Test/AppDelegate.designer.cs delete mode 100644 Test/Info.plist delete mode 100644 Test/Main.cs delete mode 100644 Test/MainMenu.xib delete mode 100644 Test/MainWindow.cs delete mode 100644 Test/MainWindow.designer.cs delete mode 100644 Test/MainWindow.xib delete mode 100644 Test/MainWindowController.cs delete mode 100644 Test/Resources/scissors.png delete mode 100644 Test/Test.csproj diff --git a/NBTExplorer.csproj b/NBTExplorer.csproj index 3b17f28..60c630e 100644 --- a/NBTExplorer.csproj +++ b/NBTExplorer.csproj @@ -11,15 +11,13 @@ NBTExplorer NBTExplorer v2.0 - - 512 x86 - true + True full - false + False bin\Debug\ DEBUG;TRACE prompt @@ -28,7 +26,7 @@ x86 pdbonly - true + True bin\Release\ TRACE prompt @@ -38,7 +36,7 @@ dead_bush.ico - true + True bin\Debug\ DEBUG;TRACE full @@ -52,13 +50,14 @@ false ;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules false + 4 + False bin\Release\ TRACE - true + True pdbonly - AnyCPU bin\Release\NBTExplorer.exe.CodeAnalysisLog.xml true GlobalSuppressions.cs @@ -67,17 +66,17 @@ ;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets false ;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules + 4 - - False - ..\Substrate\SubstrateCS\bin\Release\NET2\Substrate.dll - + + ..\Substrate\SubstrateCS\bin\Release\NET2\Substrate.dll + @@ -170,7 +169,6 @@ Settings.settings - Component @@ -235,6 +233,7 @@ Designer + diff --git a/NBTExplorer.sln b/NBTExplorer.sln index 3d38610..94d5d77 100644 --- a/NBTExplorer.sln +++ b/NBTExplorer.sln @@ -1,32 +1,52 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NBTExplorer", "NBTExplorer.csproj", "{8A458245-8176-4599-95CD-3CA39F2435CE}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Debug|Mixed Platforms = Debug|Mixed Platforms - Debug|x86 = Debug|x86 - Release|Any CPU = Release|Any CPU - Release|Mixed Platforms = Release|Mixed Platforms - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {8A458245-8176-4599-95CD-3CA39F2435CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8A458245-8176-4599-95CD-3CA39F2435CE}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8A458245-8176-4599-95CD-3CA39F2435CE}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 - {8A458245-8176-4599-95CD-3CA39F2435CE}.Debug|Mixed Platforms.Build.0 = Debug|x86 - {8A458245-8176-4599-95CD-3CA39F2435CE}.Debug|x86.ActiveCfg = Debug|x86 - {8A458245-8176-4599-95CD-3CA39F2435CE}.Debug|x86.Build.0 = Debug|x86 - {8A458245-8176-4599-95CD-3CA39F2435CE}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8A458245-8176-4599-95CD-3CA39F2435CE}.Release|Any CPU.Build.0 = Release|Any CPU - {8A458245-8176-4599-95CD-3CA39F2435CE}.Release|Mixed Platforms.ActiveCfg = Release|x86 - {8A458245-8176-4599-95CD-3CA39F2435CE}.Release|Mixed Platforms.Build.0 = Release|x86 - {8A458245-8176-4599-95CD-3CA39F2435CE}.Release|x86.ActiveCfg = Release|x86 - {8A458245-8176-4599-95CD-3CA39F2435CE}.Release|x86.Build.0 = Release|x86 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NBTExplorer", "NBTExplorer.csproj", "{8A458245-8176-4599-95CD-3CA39F2435CE}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NBTExplorerMac", "NBTExplorerMac\NBTExplorerMac.csproj", "{01F9A296-C477-4CBF-A0D0-41E697048257}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|Mixed Platforms = Debug|Mixed Platforms + Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|Mixed Platforms = Release|Mixed Platforms + Release|x86 = Release|x86 + AppStore|Any CPU = AppStore|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {01F9A296-C477-4CBF-A0D0-41E697048257}.AppStore|Any CPU.ActiveCfg = AppStore|Any CPU + {01F9A296-C477-4CBF-A0D0-41E697048257}.AppStore|Any CPU.Build.0 = AppStore|Any CPU + {01F9A296-C477-4CBF-A0D0-41E697048257}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {01F9A296-C477-4CBF-A0D0-41E697048257}.Debug|Any CPU.Build.0 = Debug|Any CPU + {01F9A296-C477-4CBF-A0D0-41E697048257}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {01F9A296-C477-4CBF-A0D0-41E697048257}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {01F9A296-C477-4CBF-A0D0-41E697048257}.Debug|x86.ActiveCfg = Debug|Any CPU + {01F9A296-C477-4CBF-A0D0-41E697048257}.Debug|x86.Build.0 = Debug|Any CPU + {01F9A296-C477-4CBF-A0D0-41E697048257}.Release|Any CPU.ActiveCfg = Release|Any CPU + {01F9A296-C477-4CBF-A0D0-41E697048257}.Release|Any CPU.Build.0 = Release|Any CPU + {01F9A296-C477-4CBF-A0D0-41E697048257}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {01F9A296-C477-4CBF-A0D0-41E697048257}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {01F9A296-C477-4CBF-A0D0-41E697048257}.Release|x86.ActiveCfg = Release|Any CPU + {01F9A296-C477-4CBF-A0D0-41E697048257}.Release|x86.Build.0 = Release|Any CPU + {8A458245-8176-4599-95CD-3CA39F2435CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8A458245-8176-4599-95CD-3CA39F2435CE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8A458245-8176-4599-95CD-3CA39F2435CE}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {8A458245-8176-4599-95CD-3CA39F2435CE}.Debug|Mixed Platforms.Build.0 = Debug|x86 + {8A458245-8176-4599-95CD-3CA39F2435CE}.Debug|x86.ActiveCfg = Debug|x86 + {8A458245-8176-4599-95CD-3CA39F2435CE}.Debug|x86.Build.0 = Debug|x86 + {8A458245-8176-4599-95CD-3CA39F2435CE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8A458245-8176-4599-95CD-3CA39F2435CE}.Release|Any CPU.Build.0 = Release|Any CPU + {8A458245-8176-4599-95CD-3CA39F2435CE}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {8A458245-8176-4599-95CD-3CA39F2435CE}.Release|Mixed Platforms.Build.0 = Release|x86 + {8A458245-8176-4599-95CD-3CA39F2435CE}.Release|x86.ActiveCfg = Release|x86 + {8A458245-8176-4599-95CD-3CA39F2435CE}.Release|x86.Build.0 = Release|x86 + EndGlobalSection + GlobalSection(MonoDevelopProperties) = preSolution + StartupItem = NBTExplorerMac\NBTExplorerMac.csproj + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/NBTExplorerMac/Info.plist b/NBTExplorerMac/Info.plist index b123471..03e6795 100644 --- a/NBTExplorerMac/Info.plist +++ b/NBTExplorerMac/Info.plist @@ -2,12 +2,22 @@ + CFBundleDocumentTypes + + CFBundleIconFiles + + dead_bush.icns + CFBundleIdentifier - com.yourcompany.NBTExplorerMac + jaquadro.NBTExplorer CFBundleName - NBTExplorerMac + NBTExplorer + CFBundleShortVersionString + 2.0.3 CFBundleVersion 1 + LSApplicationCategoryType + public.app-category.utilities LSMinimumSystemVersion 10.6 NSMainNibFile diff --git a/NBTExplorerMac/Mac/AppDelegate.cs b/NBTExplorerMac/Mac/AppDelegate.cs index 32579a8..bf5b294 100644 --- a/NBTExplorerMac/Mac/AppDelegate.cs +++ b/NBTExplorerMac/Mac/AppDelegate.cs @@ -4,7 +4,7 @@ using MonoMac.Foundation; using MonoMac.AppKit; using MonoMac.ObjCRuntime; -namespace Test +namespace NBTExplorer { public partial class AppDelegate : NSApplicationDelegate { @@ -19,6 +19,11 @@ namespace Test mainWindowController = new MainWindowController (); mainWindowController.Window.MakeKeyAndOrderFront (this); } + + partial void ActionRename (NSObject sender) + { + mainWindowController.Window.ActionEditValue(); + } } } diff --git a/NBTExplorerMac/Mac/AppDelegate.designer.cs b/NBTExplorerMac/Mac/AppDelegate.designer.cs index e0d6166..79392b8 100644 --- a/NBTExplorerMac/Mac/AppDelegate.designer.cs +++ b/NBTExplorerMac/Mac/AppDelegate.designer.cs @@ -1,10 +1,27 @@ +// WARNING +// +// This file has been generated automatically by MonoDevelop to store outlets and +// actions made in the Xcode designer. If it is removed, they will be lost. +// Manual changes to this file may not be handled correctly. +// +using MonoMac.Foundation; -namespace Test +namespace NBTExplorer { - // Should subclass MonoMac.AppKit.NSResponder - [MonoMac.Foundation.Register("AppDelegate")] - public partial class AppDelegate + [Register ("AppDelegate")] + partial class AppDelegate { + [Action ("ActionRename:")] + partial void ActionRename (MonoMac.Foundation.NSObject sender); + + [Action ("ActionEditValue:")] + partial void ActionEditValue (MonoMac.Foundation.NSObject sender); + + [Action ("ActionDelete:")] + partial void ActionDelete (MonoMac.Foundation.NSObject sender); + + void ReleaseDesignerOutlets () + { + } } } - diff --git a/NBTExplorerMac/Mac/EditValue.cs b/NBTExplorerMac/Mac/EditValue.cs index b5d18a8..7bb94d6 100644 --- a/NBTExplorerMac/Mac/EditValue.cs +++ b/NBTExplorerMac/Mac/EditValue.cs @@ -4,11 +4,21 @@ using System.Collections.Generic; using System.Linq; using MonoMac.Foundation; using MonoMac.AppKit; +using Substrate.Nbt; namespace NBTExplorer.Mac { public partial class EditValue : MonoMac.AppKit.NSWindow { + public enum DialogResult + { + OK, + Cancel, + } + + private TagNode _tag; + private DialogResult _result; + #region Constructors // Called when created from unmanaged code @@ -23,6 +33,21 @@ namespace NBTExplorer.Mac { Initialize (); } + + public EditValue (TagNode tag) + { + Initialize (); + + _tag = tag; + + if (tag == null) { + _result = DialogResult.Cancel; + Close(); + return; + } + + _valueField.StringValue = _tag.ToString(); + } // Shared initialization code void Initialize () @@ -30,6 +55,104 @@ namespace NBTExplorer.Mac } #endregion + + public TagNode NodeTag + { + get { return _tag; } + } + + public DialogResult Result + { + get { return _result; } + } + + /*private TagNode _tag; + + public EditValue (TagNode tag) + { + InitializeComponent(); + + _tag = tag; + + if (tag == null) { + DialogResult = DialogResult.Abort; + Close(); + return; + } + + textBox1.Text = _tag.ToString(); + } + + public TagNode NodeTag + { + get { return _tag; } + } + + private void Apply () + { + if (ValidateInput()) { + DialogResult = DialogResult.OK; + Close(); + } + } + + private bool ValidateInput () + { + return ValidateValueInput(); + } + + private bool ValidateValueInput () + { + try { + switch (_tag.GetTagType()) { + case TagType.TAG_BYTE: + _tag.ToTagByte().Data = unchecked((byte)sbyte.Parse(textBox1.Text)); + break; + + case TagType.TAG_SHORT: + _tag.ToTagShort().Data = short.Parse(textBox1.Text); + break; + + case TagType.TAG_INT: + _tag.ToTagInt().Data = int.Parse(textBox1.Text); + break; + + case TagType.TAG_LONG: + _tag.ToTagLong().Data = long.Parse(textBox1.Text); + break; + + case TagType.TAG_FLOAT: + _tag.ToTagFloat().Data = float.Parse(textBox1.Text); + break; + + case TagType.TAG_DOUBLE: + _tag.ToTagDouble().Data = double.Parse(textBox1.Text); + break; + + case TagType.TAG_STRING: + _tag.ToTagString().Data = textBox1.Text; + break; + } + } + catch (FormatException) { + MessageBox.Show("The value is formatted incorrectly for the given type."); + return false; + } + catch (OverflowException) { + MessageBox.Show("The value is outside the acceptable range for the given type."); + return false; + } + catch { + return false; + } + + return true; + } + + private void _buttonOK_Click (object sender, EventArgs e) + { + Apply(); + }*/ } } diff --git a/NBTExplorerMac/Mac/EditValue.designer.cs b/NBTExplorerMac/Mac/EditValue.designer.cs index e01d07f..1644bfa 100644 --- a/NBTExplorerMac/Mac/EditValue.designer.cs +++ b/NBTExplorerMac/Mac/EditValue.designer.cs @@ -1,12 +1,31 @@ +// WARNING +// +// This file has been generated automatically by MonoDevelop to store outlets and +// actions made in the Xcode designer. If it is removed, they will be lost. +// Manual changes to this file may not be handled correctly. +// +using MonoMac.Foundation; namespace NBTExplorer.Mac { - - // Should subclass MonoMac.AppKit.NSWindow - [MonoMac.Foundation.Register("EditValue")] - public partial class EditValue + [Register ("EditValue")] + partial class EditValue { + [Outlet] + MonoMac.AppKit.NSTextField _valueField { get; set; } + + [Action ("ActionOK:")] + partial void ActionOK (MonoMac.Foundation.NSObject sender); + + [Action ("ActionCancel:")] + partial void ActionCancel (MonoMac.Foundation.NSObject sender); + + void ReleaseDesignerOutlets () + { + if (_valueField != null) { + _valueField.Dispose (); + _valueField = null; + } + } } } - - diff --git a/NBTExplorerMac/Mac/EditValue.xib b/NBTExplorerMac/Mac/EditValue.xib index 7f6e694..76a7cc7 100644 --- a/NBTExplorerMac/Mac/EditValue.xib +++ b/NBTExplorerMac/Mac/EditValue.xib @@ -1,31 +1,32 @@ - 1060 - 10D573 - 762 - 1038.29 - 460.00 + 1080 + 12B2080 + 2844 + 1187 + 624.00 com.apple.InterfaceBuilder.CocoaPlugin - 762 + 2844 - + YES - + NSButton + NSButtonCell + NSCustomObject + NSTextField + NSTextFieldCell + NSView + NSWindowTemplate YES com.apple.InterfaceBuilder.CocoaPlugin - YES - - YES - - - YES - + PluginDependencyRecalculationVersion + YES @@ -39,68 +40,236 @@ NSApplication - 15 + 3 2 - {{131, 86}, {602, 342}} + {{131, 86}, {262, 91}} 611844096 - Window + Edit Value... EditValue - - {1.79769e+308, 1.79769e+308} + + - + 256 - {602, 342} - + + YES + + + 266 + {{20, 49}, {222, 22}} + + + _NS:9 + YES + + -1804599231 + 272630848 + + + LucidaGrande + 13 + 1044 + + _NS:9 + + YES + + 6 + System + textBackgroundColor + + 3 + MQA + + + + 6 + System + textColor + + 3 + MAA + + + + NO + + + + 268 + {{166, 13}, {82, 32}} + + + _NS:9 + YES + + 67108864 + 134217728 + OK + + _NS:9 + + -2038284288 + 129 + + DQ + 200 + 25 + + NO + + + + 268 + {{84, 13}, {82, 32}} + + + _NS:9 + YES + + 67108864 + 134217728 + Cancel + + _NS:9 + + -2038284288 + 129 + + Gw + 200 + 25 + + NO + + + {262, 91} + + - {{0, 0}, {1280, 778}} - {1.79769e+308, 1.79769e+308} + {{0, 0}, {1600, 1178}} + {10000000000000, 10000000000000} + YES YES + + + _valueField + + + + 9 + + + + ActionOK: + + + + 10 + + + + ActionCancel: + + + + 11 + YES 0 - - - + + YES + + + -2 - - + + File's Owner -1 - - + + First Responder -3 - - + + Application 1 - + YES - + - + 2 - - + + + YES + + + + + + + + 3 + + + YES + + + + + + 4 + + + + + 5 + + + YES + + + + + + 6 + + + + + 7 + + + YES + + + + + + 8 + + @@ -111,41 +280,47 @@ -1.IBPluginDependency -2.IBPluginDependency -3.IBPluginDependency - 1.IBEditorWindowLastContentRect 1.IBPluginDependency 1.IBWindowTemplateEditedContentRect 1.NSWindowTemplate.visibleAtLaunch 2.IBPluginDependency + 3.IBPluginDependency + 4.IBPluginDependency + 5.IBPluginDependency + 6.IBPluginDependency + 7.IBPluginDependency + 8.IBPluginDependency - + YES com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - {{361, 348}, {602, 342}} com.apple.InterfaceBuilder.CocoaPlugin {{361, 348}, {602, 342}} - + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin YES - - - YES - + + - + YES - - - YES - + + - - 2 + + 11 @@ -153,9 +328,52 @@ EditValue NSWindow + + YES + + YES + ActionCancel: + ActionOK: + + + YES + id + id + + + + YES + + YES + ActionCancel: + ActionOK: + + + YES + + ActionCancel: + id + + + ActionOK: + id + + + + + _valueField + NSTextField + + + _valueField + + _valueField + NSTextField + + - IBUserSource - + IBProjectSource + ./Classes/EditValue.h @@ -164,10 +382,9 @@ IBCocoaFramework com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 - + YES - 3 diff --git a/NBTExplorerMac/Mac/IconRegistry.cs b/NBTExplorerMac/Mac/IconRegistry.cs index e3780be..28fafad 100644 --- a/NBTExplorerMac/Mac/IconRegistry.cs +++ b/NBTExplorerMac/Mac/IconRegistry.cs @@ -1,11 +1,31 @@ using System; +using System.Collections.Generic; +using MonoMac.AppKit; namespace NBTExplorer.Mac { public class IconRegistry { + private Dictionary _iconRegistry; + public IconRegistry () { + _iconRegistry = new Dictionary(); + } + + public NSImage DefaultIcon { get; set; } + + public NSImage Lookup (Type type) + { + if (_iconRegistry.ContainsKey(type)) + return _iconRegistry[type]; + else + return DefaultIcon; + } + + public void Register (Type type, NSImage icon) + { + _iconRegistry[type] = icon; } } } diff --git a/NBTExplorerMac/Mac/ImageAndTextCell.cs b/NBTExplorerMac/Mac/ImageAndTextCell.cs index 595cc74..d3e0aaa 100644 --- a/NBTExplorerMac/Mac/ImageAndTextCell.cs +++ b/NBTExplorerMac/Mac/ImageAndTextCell.cs @@ -1,12 +1,210 @@ using System; +using MonoMac.Foundation; +using MonoMac.AppKit; +using MonoMac.CoreGraphics; +using System.Drawing; +using MonoMac.ObjCRuntime; +using System.Collections.Generic; namespace NBTExplorer.Mac { - public class ImageAndTextCell + [Register("ImageAndTextCell")] + public class ImageAndTextCell : NSTextFieldCell { + private NSImage _image; + private bool _copyCalled; + private bool _disposeCalled; + private bool _deallocCalled; + private bool _drawCalled; + public ImageAndTextCell () { } + + public ImageAndTextCell (IntPtr handle) + : base(handle) + { + Initialize(); + } + + // Called when created directly from a XIB file + [Export ("initWithCoder:")] + public ImageAndTextCell (NSCoder coder) + : base (coder) + { + Initialize (); + } + + private void Initialize () + { + LineBreakMode = NSLineBreakMode.TruncatingTail; + Selectable = true; + } + + protected override void Dispose (bool disposing) + { + //if (_image != null) + // _image.Dispose(); + + //if (_noDispose) + // Handle = IntPtr.Zero; + _disposeCalled = true; + + base.Dispose (disposing); + } + + /*[Export("copyWithZone:")] + public virtual NSObject CopyWithZone(IntPtr zone) { + ImageAndTextCell cell = new ImageAndTextCell() { + Title = Title, + Image = Image, + }; + cell._noDispose = true; + return cell; + }*/ + + static List _refPool = new List(); + + //static IntPtr selRetain = Selector.GetHandle ("retain"); + //static IntPtr selAutoRelease = Selector.GetHandle("autorelease"); + //static IntPtr selRelease = Selector.GetHandle("release"); + //static IntPtr selCopyWithZone = Selector.GetHandle("copyWithZone:"); + + [Export("copyWithZone:")] + public NSObject CopyWithZone (IntPtr zone) + { + //IntPtr copy = Messaging.IntPtr_objc_msgSendSuper_IntPtr(SuperHandle, selCopyWithZone, zone); + //var cloned = new ImageAndTextCell(copy); + //cloned.Title = Title; + //cloned.Image = Image; + + var cloned = new ImageAndTextCell { + Title = Title, + Image = Image, + }; + cloned._copyCalled = true; + + _refPool.Add(cloned); + + //Messaging.void_objc_msgSend (cloned.Handle, selRetain); + return cloned; + } + + //static IntPtr selDealloc = Selector.GetHandle("dealloc"); + + [Export("dealloc")] + public void Dealloc () + { + _deallocCalled = true; + _refPool.Remove(this); + + //Messaging.void_objc_msgSendSuper(SuperHandle, selDealloc); + } + + public new NSImage Image + { + get { return _image; } + set { _image = value; } + } + + public override RectangleF ImageRectForBounds (RectangleF theRect) + { + if (_image != null) { + PointF origin = new PointF(theRect.X + 3, theRect.Y + (float)Math.Ceiling((theRect.Height - _image.Size.Height) / 2)); + return new RectangleF(origin, _image.Size); + } + else + return RectangleF.Empty; + } + + public override RectangleF TitleRectForBounds (RectangleF theRect) + { + if (_image != null) { + PointF origin = new PointF(theRect.X + 3 + _image.Size.Width, theRect.Y); + SizeF size = new SizeF(theRect.Width - 3 - _image.Size.Width, theRect.Height); + return new RectangleF(origin, size); + } + else + return base.TitleRectForBounds(theRect); + } + + public override void EditWithFrame (RectangleF aRect, NSView inView, NSText editor, NSObject delegateObject, NSEvent theEvent) + { + RectangleF textFrame, imageFrame; + aRect.Divide(3 + _image.Size.Width, CGRectEdge.MinXEdge, out imageFrame, out textFrame); + base.EditWithFrame(textFrame, inView, editor, delegateObject, theEvent); + } + + public override void SelectWithFrame (RectangleF aRect, NSView inView, NSText editor, NSObject delegateObject, int selStart, int selLength) + { + RectangleF textFrame, imageFrame; + aRect.Divide(3 + _image.Size.Width, CGRectEdge.MinXEdge, out imageFrame, out textFrame); + base.SelectWithFrame(textFrame, inView, editor, delegateObject, selStart, selLength); + } + + public override void DrawWithFrame (RectangleF cellFrame, NSView inView) + { + Assert (!_deallocCalled, "DrawWithFrame: Dealloc was called on object"); + Assert (!_disposeCalled, "DrawWithFrame: Dispose was called on object"); + + _drawCalled = true; + if (_image != null) { + RectangleF imageFrame; + cellFrame.Divide (3 + _image.Size.Width, CGRectEdge.MinXEdge, out imageFrame, out cellFrame); + + if (DrawsBackground) { + BackgroundColor.Set (); + NSGraphics.RectFill (imageFrame); + } + + imageFrame.X += 3; + imageFrame.Size = _image.Size; + + //if (inView.IsFlipped) { + // imageFrame.Y += (float)Math.Ceiling((cellFrame.Height + imageFrame.Height) / 2); + //} + //else { + imageFrame.Y += (float)Math.Ceiling ((cellFrame.Height - imageFrame.Height) / 2); + //} + + _image.Draw (imageFrame, new RectangleF (PointF.Empty, _image.Size), NSCompositingOperation.SourceOver, 1f, true, null); + } + + base.DrawWithFrame (cellFrame, inView); + } + + public override SizeF CellSize + { + get { + if (_image != null) + return new SizeF(base.CellSize.Width + 3 + _image.Size.Width, base.CellSize.Height); + else + return new SizeF(base.CellSize.Width + 3, base.CellSize.Height); + } + } + + public override NSCellHit HitTest (NSEvent forEvent, RectangleF inRect, NSView ofView) + { + PointF point = ofView.ConvertPointFromView (forEvent.LocationInWindow, null); + + if (_image != null) { + RectangleF imageFrame; + inRect.Divide(3 + _image.Size.Width, CGRectEdge.MinXEdge, out imageFrame, out inRect); + + imageFrame.X += 3; + imageFrame.Size = _image.Size; + if (ofView.MouseinRect(point, imageFrame)) + return NSCellHit.ContentArea; + } + + return base.HitTest (forEvent, inRect, ofView); + } + + private void Assert (bool condition, string message) + { + if (!condition) + throw new Exception("Assert failed: " + message); + } } } diff --git a/NBTExplorerMac/Mac/MainMenu.xib b/NBTExplorerMac/Mac/MainMenu.xib index 52d0fd5..d8693c3 100644 --- a/NBTExplorerMac/Mac/MainMenu.xib +++ b/NBTExplorerMac/Mac/MainMenu.xib @@ -1,31 +1,28 @@ - 1060 - 10D573 - 762 - 1038.29 - 460.00 + 1080 + 12B2080 + 2844 + 1187 + 624.00 com.apple.InterfaceBuilder.CocoaPlugin - 762 + 2844 - + YES - + NSCustomObject + NSMenu + NSMenuItem YES com.apple.InterfaceBuilder.CocoaPlugin - YES - - YES - - - YES - + PluginDependencyRecalculationVersion + YES @@ -43,9 +40,9 @@ YES - - Test - + + NBTExplorer + 1048576 2147483647 @@ -58,1258 +55,301 @@ submenuAction: - MacCocoaApp + NBTExplorer YES - - About Test - + + About NBTExplorer + 2147483647 - - + + - + YES YES - - + + 1048576 2147483647 - - - - - - Preferences… - , - 1048576 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Services - - 1048576 - 2147483647 - - - submenuAction: - - Services - - YES - - _NSServicesMenu - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Hide Test - h - 1048576 - 2147483647 - - - - - - Hide Others - h - 1572864 - 2147483647 - - - - - - Show All - - 1048576 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - + + - - Quit Test + + Quit NBTExplorer q 1048576 2147483647 - - + + _NSAppleMenu - + File - + 1048576 2147483647 - - + + submenuAction: File YES - - - New - n - 1048576 - 2147483647 - - - - + Open… o 1048576 2147483647 - - + + - - - Open Recent - + + + Open Folder... + O 1048576 2147483647 - - - submenuAction: - - Open Recent - - YES - - - Clear Menu - - 1048576 - 2147483647 - - - - - _NSRecentDocumentsMenu - + + + + + + Open Minecraft Save Folder + + 2147483647 + + - + YES YES - - + + 1048576 2147483647 - - - - - - Close - w - 1048576 - 2147483647 - - + + - + Save s 1048576 2147483647 - - + + - - - Save As… - S - 1179648 - 2147483647 - - - - - - Revert to Saved - - 2147483647 - - - - - + + YES YES - - - 1048576 + + 2147483647 - - + + - - - Page Setup... - P - 1179648 + + + Recent Files + R 2147483647 - - - + + + submenuAction: + + Recent Files + + YES + + _NSRecentDocumentsMenu + - - - Print… - p - 1048576 + + + Recent Folders + 2147483647 - - + + + submenuAction: + + Recent Folders + + YES + + - + Edit - + 1048576 2147483647 - - + + submenuAction: Edit YES - - - Undo - z - 1048576 - 2147483647 - - - - - - Redo - Z - 1179648 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - + Cut x 1048576 2147483647 - - + + - + Copy c 1048576 2147483647 - - + + - + Paste v 1048576 2147483647 - - - - - - Paste and Match Style - V - 1572864 - 2147483647 - - - - - - Delete - - 1048576 - 2147483647 - - - - - - Select All - a - 1048576 - 2147483647 - - + + - + YES YES - - + + 1048576 2147483647 - - + + - - - Find - + + + Rename + r 1048576 2147483647 - - - submenuAction: - - Find - - YES - - - Find… - f - 1048576 - 2147483647 - - - 1 - - - - Find Next - g - 1048576 - 2147483647 - - - 2 - - - - Find Previous - G - 1179648 - 2147483647 - - - 3 - - - - Use Selection for Find - e - 1048576 - 2147483647 - - - 7 - - - - Jump to Selection - j - 1048576 - 2147483647 - - - - - + + - - - Spelling and Grammar - + + + Edit Value + e 1048576 2147483647 - - - submenuAction: - - Spelling and Grammar - - YES - - - Show Spelling and Grammar - : - 1048576 - 2147483647 - - - - - - Check Document Now - ; - 1048576 - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - Check Spelling While Typing - - 1048576 - 2147483647 - - - - - - Check Grammar With Spelling - - 1048576 - 2147483647 - - - - - - Correct Spelling Automatically - - 2147483647 - - - - - + + - - - Substitutions - + + + Delete +  + 2147483647 + + + + + + YES + YES + + + 2147483647 + + + + + + Find... + f 1048576 2147483647 - - - submenuAction: - - Substitutions - - YES - - - Show Substitutions - - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - Smart Copy/Paste - f - 1048576 - 2147483647 - - - 1 - - - - Smart Quotes - g - 1048576 - 2147483647 - - - 2 - - - - Smart Dashes - - 2147483647 - - - - - - Smart Links - G - 1179648 - 2147483647 - - - 3 - - - - Text Replacement - - 2147483647 - - - - - + + - - - Transformations - + + + Find Next + 2147483647 - - - submenuAction: - - Transformations - - YES - - - Make Upper Case - - 2147483647 - - - - - - Make Lower Case - - 2147483647 - - - - - - Capitalize - - 2147483647 - - - - - - - - - Speech - - 1048576 - 2147483647 - - - submenuAction: - - Speech - - YES - - - Start Speaking - - 1048576 - 2147483647 - - - - - - Stop Speaking - - 1048576 - 2147483647 - - - - - - - - - - - - Format - - 2147483647 - - - submenuAction: - - Format - - YES - - - Font - - 2147483647 - - - submenuAction: - - Font - - YES - - - Show Fonts - t - 1048576 - 2147483647 - - - - - - Bold - b - 1048576 - 2147483647 - - - 2 - - - - Italic - i - 1048576 - 2147483647 - - - 1 - - - - Underline - u - 1048576 - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - Bigger - + - 1048576 - 2147483647 - - - 3 - - - - Smaller - - - 1048576 - 2147483647 - - - 4 - - - - YES - YES - - - 2147483647 - - - - - - Kern - - 2147483647 - - - submenuAction: - - Kern - - YES - - - Use Default - - 2147483647 - - - - - - Use None - - 2147483647 - - - - - - Tighten - - 2147483647 - - - - - - Loosen - - 2147483647 - - - - - - - - - Ligature - - 2147483647 - - - submenuAction: - - Ligature - - YES - - - Use Default - - 2147483647 - - - - - - Use None - - 2147483647 - - - - - - Use All - - 2147483647 - - - - - - - - - Baseline - - 2147483647 - - - submenuAction: - - Baseline - - YES - - - Use Default - - 2147483647 - - - - - - Superscript - - 2147483647 - - - - - - Subscript - - 2147483647 - - - - - - Raise - - 2147483647 - - - - - - Lower - - 2147483647 - - - - - - - - - YES - YES - - - 2147483647 - - - - - - Show Colors - C - 1048576 - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - Copy Style - c - 1572864 - 2147483647 - - - - - - Paste Style - v - 1572864 - 2147483647 - - - - - _NSFontMenu - - - - - Text - - 2147483647 - - - submenuAction: - - Text - - YES - - - Align Left - { - 1048576 - 2147483647 - - - - - - Center - | - 1048576 - 2147483647 - - - - - - Justify - - 2147483647 - - - - - - Align Right - } - 1048576 - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - Writing Direction - - 2147483647 - - - submenuAction: - - Writing Direction - - YES - - - YES - Paragraph - - 2147483647 - - - - - - CURlZmF1bHQ - - 2147483647 - - - - - - CUxlZnQgdG8gUmlnaHQ - - 2147483647 - - - - - - CVJpZ2h0IHRvIExlZnQ - - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - YES - Selection - - 2147483647 - - - - - - CURlZmF1bHQ - - 2147483647 - - - - - - CUxlZnQgdG8gUmlnaHQ - - 2147483647 - - - - - - CVJpZ2h0IHRvIExlZnQ - - 2147483647 - - - - - - - - - YES - YES - - - 2147483647 - - - - - - Show Ruler - - 2147483647 - - - - - - Copy Ruler - c - 1310720 - 2147483647 - - - - - - Paste Ruler - v - 1310720 - 2147483647 - - - - - + + - + View - + 1048576 2147483647 - - + + submenuAction: View YES - + Show Toolbar t 1572864 2147483647 - - + + - + Customize Toolbar… - + 1048576 2147483647 - - + + - + Window - + 1048576 2147483647 - - - submenuAction: - - Window - - YES - - - Minimize - m - 1048576 - 2147483647 - - - - - - Zoom - - 1048576 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Bring All to Front - - 1048576 - 2147483647 - - - - - _NSWindowsMenu - + + - + Help - + 2147483647 - - - submenuAction: - - Help - - YES - - - Test Help - ? - 1048576 - 2147483647 - - - - - _NSHelpMenu - + + _NSMainMenu @@ -1326,675 +366,107 @@ YES - performMiniaturize: - - + terminate: + + - 37 - - - - arrangeInFront: - - - - 39 - - - - print: - - - - 86 - - - - runPageLayout: - - - - 87 - - - - clearRecentDocuments: - - - - 127 + 449 orderFrontStandardAboutPanel: - - + + 142 - - performClose: - - + + delegate + + - 193 - - - - toggleContinuousSpellChecking: - - - - 222 - - - - undo: - - - - 223 + 534 copy: - - + + 224 - - - checkSpelling: - - - - 225 - paste: - - + + 226 - - - stopSpeaking: - - - - 227 - cut: - - + + 228 - - - showGuessPanel: - - - - 230 - - - - redo: - - - - 231 - - - - selectAll: - - - - 232 - - - - startSpeaking: - - - - 233 - - - - delete: - - - - 235 - - - - performZoom: - - - - 240 - - - - performFindPanelAction: - - - - 241 - - - - centerSelectionInVisibleArea: - - - - 245 - - - - toggleGrammarChecking: - - - - 347 - - - - toggleSmartInsertDelete: - - - - 355 - - - - toggleAutomaticQuoteSubstitution: - - - - 356 - - - - toggleAutomaticLinkDetection: - - - - 357 - saveDocument: - - + + 362 - - - saveDocumentAs: - - - - 363 - - - - revertDocumentToSaved: - - - - 364 - runToolbarCustomizationPalette: - - + + 365 toggleToolbarShown: - - + + 366 - - - hide: - - - - 367 - - - - hideOtherApplications: - - - - 368 - - - - unhideAllApplications: - - - - 370 - - - - newDocument: - - - - 373 - openDocument: - - + + 374 - addFontTrait: - - + ActionEditValue: + + - 421 + 546 - addFontTrait: - - + ActionRename: + + - 422 + 547 - modifyFont: - - + ActionDelete: + + - 423 - - - - orderFrontFontPanel: - - - - 424 - - - - modifyFont: - - - - 425 - - - - raiseBaseline: - - - - 426 - - - - lowerBaseline: - - - - 427 - - - - copyFont: - - - - 428 - - - - subscript: - - - - 429 - - - - superscript: - - - - 430 - - - - tightenKerning: - - - - 431 - - - - underline: - - - - 432 - - - - orderFrontColorPanel: - - - - 433 - - - - useAllLigatures: - - - - 434 - - - - loosenKerning: - - - - 435 - - - - pasteFont: - - - - 436 - - - - unscript: - - - - 437 - - - - useStandardKerning: - - - - 438 - - - - useStandardLigatures: - - - - 439 - - - - turnOffLigatures: - - - - 440 - - - - turnOffKerning: - - - - 441 - - - - terminate: - - - - 449 - - - - toggleAutomaticSpellingCorrection: - - - - 456 - - - - orderFrontSubstitutionsPanel: - - - - 458 - - - - toggleAutomaticDashSubstitution: - - - - 461 - - - - toggleAutomaticTextReplacement: - - - - 463 - - - - uppercaseWord: - - - - 464 - - - - capitalizeWord: - - - - 467 - - - - lowercaseWord: - - - - 468 - - - - pasteAsPlainText: - - - - 486 - - - - performFindPanelAction: - - - - 487 - - - - performFindPanelAction: - - - - 488 - - - - performFindPanelAction: - - - - 489 - - - - showHelp: - - - - 493 - - - - alignCenter: - - - - 518 - - - - pasteRuler: - - - - 519 - - - - toggleRuler: - - - - 520 - - - - alignRight: - - - - 521 - - - - copyRuler: - - - - 522 - - - - alignJustified: - - - - 523 - - - - alignLeft: - - - - 524 - - - - makeBaseWritingDirectionNatural: - - - - 525 - - - - makeBaseWritingDirectionLeftToRight: - - - - 526 - - - - makeBaseWritingDirectionRightToLeft: - - - - 527 - - - - makeTextWritingDirectionNatural: - - - - 528 - - - - makeTextWritingDirectionLeftToRight: - - - - 529 - - - - makeTextWritingDirectionRightToLeft: - - - - 530 - - - - delegate - - - - 534 + 548 @@ -2002,1026 +474,299 @@ YES 0 - - - + + YES + + + -2 - - + + File's Owner -1 - - + + First Responder -3 - - + + Application 29 - + YES - - - - - - - + + + + + + - + 19 - + YES - - + 56 - + YES - + - + 217 - + YES - + - + 83 - + YES - + - + 81 - + YES - - - - - - - - - - - + + + + + + + + - + 75 - - - - - 80 - - - - - 78 - - + + 72 - - - - - 82 - - + + 124 - + YES - + - - - - 77 - - - - - 73 - - + 79 - - - - - 112 - - - - - 74 - - + + 125 - + YES - - - - - 126 - - + 205 - + YES - - - - - - - - - - - - - - - + + + + + + + + + + - + 202 - - - - - 198 - - - - - 207 - - + + 214 - - + + 199 - - + + 203 - - + + 197 - - - - - 206 - - - - - 215 - - - - - 218 - - - YES - - - - - - 216 - - - YES - - - - - - 200 - - - YES - - - - - - - - - - - 219 - - - - - 201 - - - - - 204 - - - - - 220 - - - YES - - - - - - - - - - 213 - - - - - 210 - - - - - 221 - - - - - 208 - - - - - 209 - - + + 57 - + YES - - - - - - - - - - - + + + - + 58 - - - - - 134 - - - - - 150 - - + + 136 - - - - - 144 - - - - - 129 - - - - - 143 - - + + 236 - - - - - 131 - - - YES - - - - - - 149 - - - - - 145 - - - - - 130 - - - - - 24 - - - YES - - - - - - - - - 92 - - - - - 5 - - - - - 239 - - - - - 23 - - + + 295 - + YES - + - + 296 - + YES - - + + - + 297 - - + + 298 - - - - - 211 - - - YES - - - - - - 212 - - - YES - - - - - - - 195 - - - - - 196 - - - - - 346 - - - - - 348 - - - YES - - - - - - 349 - - - YES - - - - - - - - - - - - 350 - - - - - 351 - - - - - 354 - - - - - 375 - - - YES - - - - - - 376 - - - YES - - - - - - - 377 - - - YES - - - - - - 388 - - - YES - - - - - - - - - - - - - - - - - - - - - 389 - - - - - 390 - - - - - 391 - - - - - 392 - - - - - 393 - - - - - 394 - - - - - 395 - - - - - 396 - - - - - 397 - - - YES - - - - - - 398 - - - YES - - - - - - 399 - - - YES - - - - - - 400 - - - - - 401 - - - - - 402 - - - - - 403 - - - - - 404 - - - - - 405 - - - YES - - - - - - - - - - 406 - - - - - 407 - - - - - 408 - - - - - 409 - - - - - 410 - - - - - 411 - - - YES - - - - - - - - 412 - - - - - 413 - - - - - 414 - - - - - 415 - - - YES - - - - - - - - - 416 - - - - - 417 - - - - - 418 - - - - - 419 - - + + 420 - - - - - 450 - - - YES - - - - - - 451 - - - YES - - - - - - - - 452 - - - - - 453 - - - - - 454 - - - - - 457 - - - - - 459 - - - - - 460 - - - - - 462 - - - - - 465 - - - - - 466 - - - - - 485 - - + + 490 - + YES - - - - - 491 - - - YES - - - - - - 492 - - - - - 496 - - - YES - - - - - - 497 - - - YES - - - - - - - - - - - - - - - 498 - - - - - 499 - - - - - 500 - - - - - 501 - - - - - 502 - - - - - 503 - - - YES - - - - - - 504 - - - - - 505 - - - - - 506 - - - - - 507 - - - - - 508 - - - YES - - - - - - - - - - - - - - 509 - - - - - 510 - - - - - 511 - - - - - 512 - - - - - 513 - - - - - 514 - - - - - 515 - - - - - 516 - - - - - 517 - - + 533 - - + + + + + 535 + + + + + 536 + + + + + 537 + + + + + 538 + + + + + 539 + + + YES + + + + + + 540 + + + YES + + + + + 542 + + + + + 543 + + + + + 544 + + + + + 545 + + @@ -3029,1033 +774,166 @@ YES YES + -1.IBPluginDependency + -2.IBPluginDependency -3.IBPluginDependency - 112.IBPluginDependency - 112.ImportedFromIB2 124.IBPluginDependency - 124.ImportedFromIB2 125.IBPluginDependency - 125.ImportedFromIB2 - 125.editorWindowContentRectSynchronizationRect - 126.IBPluginDependency - 126.ImportedFromIB2 - 129.IBPluginDependency - 129.ImportedFromIB2 - 130.IBPluginDependency - 130.ImportedFromIB2 - 130.editorWindowContentRectSynchronizationRect - 131.IBPluginDependency - 131.ImportedFromIB2 - 134.IBPluginDependency - 134.ImportedFromIB2 136.IBPluginDependency - 136.ImportedFromIB2 - 143.IBPluginDependency - 143.ImportedFromIB2 - 144.IBPluginDependency - 144.ImportedFromIB2 - 145.IBPluginDependency - 145.ImportedFromIB2 - 149.IBPluginDependency - 149.ImportedFromIB2 - 150.IBPluginDependency - 150.ImportedFromIB2 19.IBPluginDependency - 19.ImportedFromIB2 - 195.IBPluginDependency - 195.ImportedFromIB2 - 196.IBPluginDependency - 196.ImportedFromIB2 197.IBPluginDependency - 197.ImportedFromIB2 - 198.IBPluginDependency - 198.ImportedFromIB2 199.IBPluginDependency - 199.ImportedFromIB2 - 200.IBEditorWindowLastContentRect - 200.IBPluginDependency - 200.ImportedFromIB2 - 200.editorWindowContentRectSynchronizationRect - 201.IBPluginDependency - 201.ImportedFromIB2 202.IBPluginDependency - 202.ImportedFromIB2 203.IBPluginDependency - 203.ImportedFromIB2 - 204.IBPluginDependency - 204.ImportedFromIB2 - 205.IBEditorWindowLastContentRect 205.IBPluginDependency - 205.ImportedFromIB2 - 205.editorWindowContentRectSynchronizationRect - 206.IBPluginDependency - 206.ImportedFromIB2 - 207.IBPluginDependency - 207.ImportedFromIB2 - 208.IBPluginDependency - 208.ImportedFromIB2 - 209.IBPluginDependency - 209.ImportedFromIB2 - 210.IBPluginDependency - 210.ImportedFromIB2 - 211.IBPluginDependency - 211.ImportedFromIB2 - 212.IBPluginDependency - 212.ImportedFromIB2 - 212.editorWindowContentRectSynchronizationRect - 213.IBPluginDependency - 213.ImportedFromIB2 214.IBPluginDependency - 214.ImportedFromIB2 - 215.IBPluginDependency - 215.ImportedFromIB2 - 216.IBPluginDependency - 216.ImportedFromIB2 217.IBPluginDependency - 217.ImportedFromIB2 - 218.IBPluginDependency - 218.ImportedFromIB2 - 219.IBPluginDependency - 219.ImportedFromIB2 - 220.IBEditorWindowLastContentRect - 220.IBPluginDependency - 220.ImportedFromIB2 - 220.editorWindowContentRectSynchronizationRect - 221.IBPluginDependency - 221.ImportedFromIB2 - 23.IBPluginDependency - 23.ImportedFromIB2 236.IBPluginDependency - 236.ImportedFromIB2 - 239.IBPluginDependency - 239.ImportedFromIB2 - 24.IBEditorWindowLastContentRect - 24.IBPluginDependency - 24.ImportedFromIB2 - 24.editorWindowContentRectSynchronizationRect - 29.IBEditorWindowLastContentRect 29.IBPluginDependency - 29.ImportedFromIB2 - 29.WindowOrigin - 29.editorWindowContentRectSynchronizationRect 295.IBPluginDependency - 296.IBEditorWindowLastContentRect 296.IBPluginDependency - 296.editorWindowContentRectSynchronizationRect 297.IBPluginDependency 298.IBPluginDependency - 346.IBPluginDependency - 346.ImportedFromIB2 - 348.IBPluginDependency - 348.ImportedFromIB2 - 349.IBEditorWindowLastContentRect - 349.IBPluginDependency - 349.ImportedFromIB2 - 349.editorWindowContentRectSynchronizationRect - 350.IBPluginDependency - 350.ImportedFromIB2 - 351.IBPluginDependency - 351.ImportedFromIB2 - 354.IBPluginDependency - 354.ImportedFromIB2 - 375.IBPluginDependency - 376.IBEditorWindowLastContentRect - 376.IBPluginDependency - 377.IBPluginDependency - 388.IBEditorWindowLastContentRect - 388.IBPluginDependency - 389.IBPluginDependency - 390.IBPluginDependency - 391.IBPluginDependency - 392.IBPluginDependency - 393.IBPluginDependency - 394.IBPluginDependency - 395.IBPluginDependency - 396.IBPluginDependency - 397.IBPluginDependency - 398.IBPluginDependency - 399.IBPluginDependency - 400.IBPluginDependency - 401.IBPluginDependency - 402.IBPluginDependency - 403.IBPluginDependency - 404.IBPluginDependency - 405.IBPluginDependency - 406.IBPluginDependency - 407.IBPluginDependency - 408.IBPluginDependency - 409.IBPluginDependency - 410.IBPluginDependency - 411.IBPluginDependency - 412.IBPluginDependency - 413.IBPluginDependency - 414.IBPluginDependency - 415.IBPluginDependency - 416.IBPluginDependency - 417.IBPluginDependency - 418.IBPluginDependency - 419.IBPluginDependency - 450.IBPluginDependency - 451.IBEditorWindowLastContentRect - 451.IBPluginDependency - 452.IBPluginDependency - 453.IBPluginDependency - 454.IBPluginDependency - 457.IBPluginDependency - 459.IBPluginDependency - 460.IBPluginDependency - 462.IBPluginDependency - 465.IBPluginDependency - 466.IBPluginDependency - 485.IBPluginDependency + 420.IBPluginDependency 490.IBPluginDependency - 491.IBEditorWindowLastContentRect - 491.IBPluginDependency - 492.IBPluginDependency - 496.IBPluginDependency - 497.IBEditorWindowLastContentRect - 497.IBPluginDependency - 498.IBPluginDependency - 499.IBPluginDependency - 5.IBPluginDependency - 5.ImportedFromIB2 - 500.IBPluginDependency - 501.IBPluginDependency - 502.IBPluginDependency - 503.IBPluginDependency - 504.IBPluginDependency - 505.IBPluginDependency - 506.IBPluginDependency - 507.IBPluginDependency - 508.IBEditorWindowLastContentRect - 508.IBPluginDependency - 509.IBPluginDependency - 510.IBPluginDependency - 511.IBPluginDependency - 512.IBPluginDependency - 513.IBPluginDependency - 514.IBPluginDependency - 515.IBPluginDependency - 516.IBPluginDependency - 517.IBPluginDependency + 533.IBPluginDependency + 535.IBPluginDependency + 536.IBPluginDependency + 537.IBPluginDependency + 538.IBPluginDependency + 539.IBPluginDependency + 540.IBPluginDependency + 542.IBPluginDependency + 543.IBPluginDependency + 544.IBPluginDependency + 545.IBPluginDependency 56.IBPluginDependency - 56.ImportedFromIB2 - 57.IBEditorWindowLastContentRect 57.IBPluginDependency - 57.ImportedFromIB2 - 57.editorWindowContentRectSynchronizationRect 58.IBPluginDependency - 58.ImportedFromIB2 72.IBPluginDependency - 72.ImportedFromIB2 - 73.IBPluginDependency - 73.ImportedFromIB2 - 74.IBPluginDependency - 74.ImportedFromIB2 75.IBPluginDependency - 75.ImportedFromIB2 - 77.IBPluginDependency - 77.ImportedFromIB2 - 78.IBPluginDependency - 78.ImportedFromIB2 79.IBPluginDependency - 79.ImportedFromIB2 - 80.IBPluginDependency - 80.ImportedFromIB2 - 81.IBEditorWindowLastContentRect 81.IBPluginDependency - 81.ImportedFromIB2 - 81.editorWindowContentRectSynchronizationRect - 82.IBPluginDependency - 82.ImportedFromIB2 83.IBPluginDependency - 83.ImportedFromIB2 - 92.IBPluginDependency - 92.ImportedFromIB2 - + YES com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - {{522, 812}, {146, 23}} com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - {{436, 809}, {64, 6}} com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - {{753, 187}, {275, 113}} com.apple.InterfaceBuilder.CocoaPlugin - - {{608, 612}, {275, 83}} com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - {{453, 408}, {254, 283}} com.apple.InterfaceBuilder.CocoaPlugin - - {{187, 434}, {243, 243}} com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - {{608, 612}, {167, 43}} com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - {{753, 217}, {238, 103}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{608, 612}, {241, 103}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{613, 618}, {194, 73}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{525, 802}, {197, 73}} - {{346, 722}, {402, 20}} - com.apple.InterfaceBuilder.CocoaPlugin - - {74, 862} - {{6, 978}, {478, 20}} - com.apple.InterfaceBuilder.CocoaPlugin - {{563, 648}, {231, 43}} - com.apple.InterfaceBuilder.CocoaPlugin - {{475, 832}, {234, 43}} - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{746, 287}, {220, 133}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{608, 612}, {215, 63}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - {{497, 648}, {83, 43}} - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - {{580, 408}, {175, 283}} - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - {{753, 197}, {170, 63}} - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - {{684, 668}, {142, 23}} - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - {{674, 260}, {204, 183}} - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - {{878, 180}, {164, 173}} - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - {{355, 508}, {183, 183}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{23, 794}, {245, 183}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{411, 488}, {196, 203}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{145, 474}, {199, 203}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - YES - - - YES - + + - + YES - - - YES - + + - - 534 + + 548 YES AppDelegate - NSResponder - - IBUserSource - - - - - - YES - - NSApplication - NSResponder - - IBFrameworkSource - AppKit.framework/Headers/NSApplication.h - - - - NSApplication - - IBFrameworkSource - AppKit.framework/Headers/NSApplicationScripting.h - - - - NSApplication - - IBFrameworkSource - AppKit.framework/Headers/NSColorPanel.h - - - - NSApplication - - IBFrameworkSource - AppKit.framework/Headers/NSHelpManager.h - - - - NSApplication - - IBFrameworkSource - AppKit.framework/Headers/NSPageLayout.h - - - - NSApplication - - IBFrameworkSource - AppKit.framework/Headers/NSUserInterfaceItemSearching.h - - - - NSBrowser - NSControl - - IBFrameworkSource - AppKit.framework/Headers/NSBrowser.h - - - - NSControl - NSView - - IBFrameworkSource - AppKit.framework/Headers/NSControl.h - - - - NSDocument NSObject YES YES - printDocument: - revertDocumentToSaved: - runPageLayout: - saveDocument: - saveDocumentAs: - saveDocumentTo: + ActionDelete: + ActionEditValue: + ActionRename: - + YES id id id - id - id - id - - IBFrameworkSource - AppKit.framework/Headers/NSDocument.h - - - - NSDocument - - IBFrameworkSource - AppKit.framework/Headers/NSDocumentScripting.h - - - - NSDocumentController - NSObject - + YES YES - clearRecentDocuments: - newDocument: - openDocument: - saveAllDocuments: + ActionDelete: + ActionEditValue: + ActionRename: - + YES - id - id - id - id + + ActionDelete: + id + + + ActionEditValue: + id + + + ActionRename: + id + - IBFrameworkSource - AppKit.framework/Headers/NSDocumentController.h - - - - NSFontManager - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSFontManager.h - - - - NSFormatter - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSFormatter.h - - - - NSMatrix - NSControl - - IBFrameworkSource - AppKit.framework/Headers/NSMatrix.h - - - - NSMenu - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSMenu.h - - - - NSMenuItem - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSMenuItem.h - - - - NSMovieView - NSView - - IBFrameworkSource - AppKit.framework/Headers/NSMovieView.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSAccessibility.h - - - - NSObject - - - - NSObject - - - - NSObject - - - - NSObject - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSDictionaryController.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSDragging.h - - - - NSObject - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSFontPanel.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSKeyValueBinding.h - - - - NSObject - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSNibLoading.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSOutlineView.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSPasteboard.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSSavePanel.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSTableView.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSToolbarItem.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSView.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSArchiver.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSClassDescription.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSError.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSFileManager.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueCoding.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueObserving.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyedArchiver.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSObject.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSObjectScripting.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSPortCoder.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSRunLoop.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSScriptClassDescription.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSScriptKeyValueCoding.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSScriptObjectSpecifiers.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSScriptWhoseTests.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSThread.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURL.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURLConnection.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURLDownload.h - - - - NSResponder - - IBFrameworkSource - AppKit.framework/Headers/NSInterfaceStyle.h - - - - NSResponder - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSResponder.h - - - - NSTableView - NSControl - - - - NSText - NSView - - IBFrameworkSource - AppKit.framework/Headers/NSText.h - - - - NSTextView - NSText - - IBFrameworkSource - AppKit.framework/Headers/NSTextView.h - - - - NSView - - IBFrameworkSource - AppKit.framework/Headers/NSClipView.h - - - - NSView - - - - NSView - - IBFrameworkSource - AppKit.framework/Headers/NSRulerView.h - - - - NSView - NSResponder - - - - NSWindow - - IBFrameworkSource - AppKit.framework/Headers/NSDrawer.h - - - - NSWindow - NSResponder - - IBFrameworkSource - AppKit.framework/Headers/NSWindow.h - - - - NSWindow - - IBFrameworkSource - AppKit.framework/Headers/NSWindowScripting.h + IBProjectSource + ./Classes/AppDelegate.h 0 IBCocoaFramework - - com.apple.InterfaceBuilder.CocoaPlugin.macosx - - com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 - + YES - ../MacCocoaApp.xcodeproj 3 YES @@ -4064,10 +942,10 @@ NSMenuCheckmark NSMenuMixedState - + YES - {9, 8} - {7, 2} + {11, 11} + {10, 3} diff --git a/NBTExplorerMac/Mac/MainWindow.cs b/NBTExplorerMac/Mac/MainWindow.cs index c744580..ff31d6e 100644 --- a/NBTExplorerMac/Mac/MainWindow.cs +++ b/NBTExplorerMac/Mac/MainWindow.cs @@ -4,6 +4,9 @@ using System.Collections.Generic; using System.Linq; using MonoMac.Foundation; using MonoMac.AppKit; +using NBTExplorer.Mac; +using System.IO; +using NBTExplorer.Model; namespace NBTExplorer { @@ -27,9 +30,289 @@ namespace NBTExplorer // Shared initialization code void Initialize () { + InitializeIconRegistry(); + } + + private NBTExplorer.Mac.IconRegistry _iconRegistry; + + private void InitializeIconRegistry () + { + _iconRegistry = new NBTExplorer.Mac.IconRegistry(); + _iconRegistry.DefaultIcon = NSImage.ImageNamed("question-white.png"); + + _iconRegistry.Register(typeof(TagByteDataNode), NSImage.ImageNamed("document-attribute-b.png")); + _iconRegistry.Register(typeof(TagShortDataNode), NSImage.ImageNamed("document-attribute-s.png")); + _iconRegistry.Register(typeof(TagIntDataNode), NSImage.ImageNamed("document-attribute-i.png")); + _iconRegistry.Register(typeof(TagLongDataNode), NSImage.ImageNamed("document-attribute-l.png")); + _iconRegistry.Register(typeof(TagFloatDataNode), NSImage.ImageNamed("document-attribute-f.png")); + _iconRegistry.Register(typeof(TagDoubleDataNode), NSImage.ImageNamed("document-attribute-d.png")); + _iconRegistry.Register(typeof(TagByteArrayDataNode), NSImage.ImageNamed("edit-code.png")); + _iconRegistry.Register(typeof(TagStringDataNode), NSImage.ImageNamed("edit-small-caps.png")); + _iconRegistry.Register(typeof(TagListDataNode), NSImage.ImageNamed("edit-list.png")); + _iconRegistry.Register(typeof(TagCompoundDataNode), NSImage.ImageNamed("box.png")); + _iconRegistry.Register(typeof(RegionChunkDataNode), NSImage.ImageNamed("wooden-box.png")); + _iconRegistry.Register(typeof(DirectoryDataNode), NSImage.ImageNamed("folder-open")); + _iconRegistry.Register(typeof(RegionFileDataNode), NSImage.ImageNamed("block.png")); + _iconRegistry.Register(typeof(CubicRegionDataNode), NSImage.ImageNamed("block.png")); + _iconRegistry.Register(typeof(NbtFileDataNode), NSImage.ImageNamed("wooden-box.png")); + _iconRegistry.Register(typeof(TagIntArrayDataNode), NSImage.ImageNamed("edit-code-i.png")); } #endregion + + private TreeDataSource _dataSource; + + public override void AwakeFromNib () + { + base.AwakeFromNib (); + + _dataSource = new TreeDataSource(); + _mainOutlineView.DataSource = _dataSource; + _mainOutlineView.Delegate = new MyDelegate(this); + + string[] args = Environment.GetCommandLineArgs(); + if (args.Length > 2) { + string[] paths = new string[args.Length - 1]; + Array.Copy(args, 1, paths, 0, paths.Length); + OpenPaths(paths); + } + else { + OpenMinecraftDirectory(); + } + } + + public class MyDelegate : NSOutlineViewDelegate + { + private MainWindow _main; + + public MyDelegate (MainWindow main) + { + _main = main; + } + + public override void ItemWillExpand (NSNotification notification) + { + TreeDataNode node = notification.UserInfo ["NSObject"] as TreeDataNode; + if (node != null) { + Console.WriteLine ("Preparing to expand: " + node.Data.NodeDisplay); + _main.ExpandNode(node); + } + } + + public override void ItemDidExpand (NSNotification notification) + { + TreeDataNode node = notification.UserInfo ["NSObject"] as TreeDataNode; + if (node != null) { + Console.WriteLine("Finished Expanding: " + node.Data.NodeDisplay); + } + } + + public override void ItemWillCollapse (NSNotification notification) + { + TreeDataNode node = notification.UserInfo ["NSObject"] as TreeDataNode; + if (node != null) { + if (node.Data.NodeDisplay == "saves") // The root node + Console.WriteLine ("Uh-oh..."); + Console.WriteLine("Preparing to collapse: " + node.Data.NodeDisplay); + } + } + + public override void ItemDidCollapse (NSNotification notification) + { + TreeDataNode node = notification.UserInfo ["NSObject"] as TreeDataNode; + if (node != null) { + _main.CollapseNode(node); + } + } + + public override void WillDisplayCell (NSOutlineView outlineView, NSObject cell, NSTableColumn tableColumn, NSObject item) + { + ImageAndTextCell c = cell as ImageAndTextCell; + TreeDataNode node = item as TreeDataNode; + + c.Title = node.CombinedName; + c.Image = _main._iconRegistry.Lookup(node.Data.GetType()); + //c.StringValue = node.Name; + //throw new System.NotImplementedException (); + } + } + + #region Actions + + partial void ActionOpenFolder (MonoMac.Foundation.NSObject sender) + { + OpenFolder (); + } + + #endregion + + private string _openFolderPath = null; + + private void OpenFolder () + { + NSOpenPanel opanel = new NSOpenPanel (); + opanel.CanChooseDirectories = true; + opanel.CanChooseFiles = false; + + if (_openFolderPath != null) + opanel.DirectoryUrl = new NSUrl (_openFolderPath, true); + + if (opanel.RunModal () == (int)NSPanelButtonType.Ok) { + _openFolderPath = opanel.DirectoryUrl.AbsoluteString; + OpenPaths(new string[] { opanel.DirectoryUrl.Path }); + } + + //UpdateUI(); + } + + private void OpenMinecraftDirectory () + { + try { + string path = Environment.GetFolderPath(Environment.SpecialFolder.Personal); + path = Path.Combine(path, "Library", "Application Support"); + path = Path.Combine(path, "minecraft", "saves"); + + if (!Directory.Exists(path)) { + path = Environment.GetFolderPath(Environment.SpecialFolder.Personal); + } + + OpenPaths(new string[] { path }); + } + catch (Exception e) { + //NSAlert.WithMessage("Could not open default Minecraft save directory", "OK", null, null, null).RunModal(); + Console.WriteLine(e.Message); + + try { + OpenPaths(new string[] { Directory.GetCurrentDirectory() }); + } + catch (Exception) { + //MessageBox.Show("Could not open current directory, this tool is probably not compatible with your platform."); + Console.WriteLine(e.Message); + NSApplication.SharedApplication.Terminate(this); + } + } + + //UpdateUI(); + } + + private void OpenPaths (string[] paths) + { + _dataSource.Nodes.Clear (); + _mainOutlineView.ReloadData (); + + foreach (string path in paths) { + if (Directory.Exists (path)) { + DirectoryDataNode node = new DirectoryDataNode (path); + _dataSource.Nodes.Add (new TreeDataNode (node)); + + // AddPathToHistory(Settings.Default.RecentDirectories, path); + } else if (File.Exists (path)) { + DataNode node = null; + } + } + + if (_dataSource.Nodes.Count > 0) { + _mainOutlineView.ExpandItem(_dataSource.Nodes[0]); + } + + _mainOutlineView.ReloadData(); + + // UpdateUI(); + // UpdateOpenMenu(); + + /*_nodeTree.Nodes.Clear(); + + foreach (string path in paths) { + if (Directory.Exists(path)) { + DirectoryDataNode node = new DirectoryDataNode(path); + _nodeTree.Nodes.Add(CreateUnexpandedNode(node)); + + AddPathToHistory(Settings.Default.RecentDirectories, path); + } + else if (File.Exists(path)) { + DataNode node = null; + foreach (var item in FileTypeRegistry.RegisteredTypes) { + if (item.Value.NamePatternTest(path)) + node = item.Value.NodeCreate(path); + } + + if (node != null) { + _nodeTree.Nodes.Add(CreateUnexpandedNode(node)); + AddPathToHistory(Settings.Default.RecentFiles, path); + } + } + } + + if (_nodeTree.Nodes.Count > 0) { + _nodeTree.Nodes[0].Expand(); + } + + UpdateUI(); + UpdateOpenMenu();*/ + } + + private void ExpandNode (TreeDataNode node) + { + if (node == null || node.IsExpanded) + return; + + Console.WriteLine ("Expand Node: " + node.Data.NodeDisplay); + + node.IsExpanded = true; + node.Nodes.Clear (); + + DataNode backNode = node.Data; + if (!backNode.IsExpanded) { + backNode.Expand (); + } + + foreach (DataNode child in backNode.Nodes) { + if (child != null) { + node.Nodes.Add (new TreeDataNode (child)); + } + } + } + + private void CollapseNode (TreeDataNode node) + { + if (node == null || !node.IsExpanded) + return; + + /*Console.WriteLine("Collapse Node: " + node.Data.NodeDisplay); + + DataNode backNode = node.Data; + if (backNode.IsModified) + return; + + backNode.Collapse(); + + node.IsExpanded = false; + node.Nodes.Clear();*/ + } + + public void ActionEditValue () + { + TreeDataNode node = _mainOutlineView.ItemAtRow(_mainOutlineView.SelectedRow) as TreeDataNode; + if (node != null) + EditNode(node); + } + + private void EditNode (TreeDataNode node) + { + if (node == null) + return; + + if (!node.Data.CanEditNode) + return; + + //NBTExplorer.Mac.EditValue form = new NBTExplorer.Mac.EditValue(node.Data); + + + //if (node.Data.EditNode()) { + //node.Text = dataNode.NodeDisplay; + //UpdateUI(dataNode); + //} + } } } diff --git a/NBTExplorerMac/Mac/MainWindow.designer.cs b/NBTExplorerMac/Mac/MainWindow.designer.cs index e620e76..677619b 100644 --- a/NBTExplorerMac/Mac/MainWindow.designer.cs +++ b/NBTExplorerMac/Mac/MainWindow.designer.cs @@ -1,17 +1,72 @@ +// WARNING +// +// This file has been generated automatically by MonoDevelop to store outlets and +// actions made in the Xcode designer. If it is removed, they will be lost. +// Manual changes to this file may not be handled correctly. +// +using MonoMac.Foundation; namespace NBTExplorer { - - // Should subclass MonoMac.AppKit.NSWindow - [MonoMac.Foundation.Register("MainWindow")] - public partial class MainWindow + [Register ("MainWindow")] + partial class MainWindow { + [Outlet] + MonoMac.AppKit.NSToolbar _toolbar { get; set; } + + [Outlet] + MonoMac.AppKit.NSToolbarItem _toolbarOpenFolder { get; set; } + + [Outlet] + MonoMac.AppKit.NSToolbarItem _toolbarSave { get; set; } + + [Outlet] + MonoMac.AppKit.NSScrollView _mainScrollView { get; set; } + + [Outlet] + MonoMac.AppKit.NSOutlineView _mainOutlineView { get; set; } + + [Action ("ActionOpenFolder:")] + partial void ActionOpenFolder (MonoMac.Foundation.NSObject sender); + + [Action ("ActionSave:")] + partial void ActionSave (MonoMac.Foundation.NSObject sender); + + void ReleaseDesignerOutlets () + { + if (_toolbar != null) { + _toolbar.Dispose (); + _toolbar = null; + } + + if (_toolbarOpenFolder != null) { + _toolbarOpenFolder.Dispose (); + _toolbarOpenFolder = null; + } + + if (_toolbarSave != null) { + _toolbarSave.Dispose (); + _toolbarSave = null; + } + + if (_mainScrollView != null) { + _mainScrollView.Dispose (); + _mainScrollView = null; + } + + if (_mainOutlineView != null) { + _mainOutlineView.Dispose (); + _mainOutlineView = null; + } + } } - - // Should subclass MonoMac.AppKit.NSWindowController - [MonoMac.Foundation.Register("MainWindowController")] - public partial class MainWindowController + + [Register ("MainWindowController")] + partial class MainWindowController { + + void ReleaseDesignerOutlets () + { + } } } - diff --git a/NBTExplorerMac/Mac/MainWindow.xib b/NBTExplorerMac/Mac/MainWindow.xib index 060535b..85a490d 100644 --- a/NBTExplorerMac/Mac/MainWindow.xib +++ b/NBTExplorerMac/Mac/MainWindow.xib @@ -1,31 +1,38 @@ - 1060 - 10D573 - 762 - 1038.29 - 460.00 + 1080 + 12B2080 + 2844 + 1187 + 624.00 com.apple.InterfaceBuilder.CocoaPlugin - 762 + 2844 - + YES - + IBCustomCell + NSCustomObject + NSOutlineView + NSScrollView + NSScroller + NSTableColumn + NSToolbar + NSToolbarFlexibleSpaceItem + NSToolbarItem + NSToolbarSpaceItem + NSUserDefaultsController + NSView + NSWindowTemplate YES com.apple.InterfaceBuilder.CocoaPlugin - YES - - YES - - - YES - + PluginDependencyRecalculationVersion + YES @@ -41,20 +48,330 @@ 15 2 - {{131, 74}, {606, 354}} + {{131, 74}, {776, 558}} 611844096 - Window + NBTExplorer MainWindow - - {1.79769e+308, 1.79769e+308} - - - 256 - {606, 354} - + + + A9746BAB-CAB3-4A72-9A03-237662FA7440 + + + YES + YES + YES + YES + 1 + 2 + + YES + + YES + 0156226B-2E18-4406-BBE6-7C88F62B4E27 + B62CA8DD-7D49-4BF3-B4AB-417078852D8B + NSToolbarFlexibleSpaceItem + NSToolbarSpaceItem + + + YES + + + 0156226B-2E18-4406-BBE6-7C88F62B4E27 + + Open + Open + + + + NSImage + folder-open-24 + + + + {0, 0} + {0, 0} + YES + YES + -1 + YES + 0 + + + + B62CA8DD-7D49-4BF3-B4AB-417078852D8B + + Save + Save + + + + NSImage + disk-24 + + + + {0, 0} + {0, 0} + YES + YES + -1 + YES + 0 + + + NSToolbarFlexibleSpaceItem + + Flexible Space + + + + + + {1, 5} + {20000, 32} + YES + YES + -1 + YES + 0 + + YES + YES + + + 1048576 + 2147483647 + + NSImage + NSMenuCheckmark + + + NSImage + NSMenuMixedState + + + + + NSToolbarSpaceItem + + Space + + + + + + {32, 5} + {32, 32} + YES + YES + -1 + YES + 0 + + YES + YES + + + 1048576 + 2147483647 + + + + + + + + YES + + + + + + + YES + + + + + + YES + - {{0, 0}, {1280, 778}} - {1.79769e+308, 1.79769e+308} + + + + 256 + + YES + + + 286 + + YES + + + 2304 + + YES + + + 256 + + YES + + {776, 558} + + + + _NS:13 + YES + NO + YES + + + -2147483392 + {{224, 0}, {16, 17}} + + _NS:18 + + + YES + + 773 + 16 + 1000 + + 75497536 + 2048 + + + LucidaGrande + 11 + 3100 + + + 3 + MC4zMzMzMzI5ODU2AA + + + 6 + System + headerTextColor + + 3 + MAA + + + + + 0 + 0 + + + 3 + YES + YES + + + + 3 + 2 + + 3 + MQA + + + 6 + System + gridColor + + 3 + MC41AA + + + 17 + 306184192 + + + 0 + 15 + 0 + YES + 0 + 1 + + + {{1, 1}, {776, 558}} + + + + _NS:11 + + + 6 + System + controlBackgroundColor + + 3 + MC42NjY2NjY2NjY3AA + + + 4 + + + + -2147483392 + {{224, 17}, {15, 102}} + + + + _NS:58 + NO + + _doScroller: + 0.99821109123434704 + + + + -2147483392 + {{1, 544}, {776, 15}} + + + + _NS:60 + NO + 1 + + _doScroller: + 0.99871299871299868 + + + {{-1, -1}, {778, 560}} + + + + _NS:9 + 133682 + + + + QSAAAEEgAABBmAAAQZgAAA + 0.25 + 4 + 1 + + + {776, 558} + + + + + {{0, 0}, {1600, 1178}} + {10000000000000, 10000000000000} + YES + + + YES @@ -63,52 +380,194 @@ window - - + + 6 + + + _mainScrollView + + + + 36 + + + + _mainOutlineView + + + + 37 + + + + _toolbar + + + + 38 + + + + _toolbarOpenFolder + + + + 39 + + + + _toolbarSave + + + + 40 + + + + ActionOpenFolder: + + + + 41 + + + + ActionSave: + + + + 42 + YES 0 - - - + + + -2 - - + + File's Owner -1 - - + + First Responder -3 - - + + Application 2 - + YES - + + - + 3 - - + + + YES + + + + + + 14 + + + YES + + + + + + + + + 15 + + + + + 18 + + + + + 20 + + + + + 21 + + + + + 22 + + + YES + + + + + + + + 23 + + + YES + + + + + + 24 + + + + + 26 + + + + + 27 + + + YES + + + + + + 44 + + + + + 71 + + @@ -119,59 +578,176 @@ -1.IBPluginDependency -2.IBPluginDependency -3.IBPluginDependency - 2.IBEditorWindowLastContentRect + 14.IBPluginDependency + 15.IBPluginDependency + 18.IBPluginDependency 2.IBPluginDependency 2.IBWindowTemplateEditedContentRect 2.NSWindowTemplate.visibleAtLaunch + 20.IBPluginDependency + 20.designableToolbarItemIdentifier + 21.IBPluginDependency + 21.designableToolbarItemIdentifier + 22.IBPluginDependency + 23.IBPluginDependency + 24.IBPluginDependency + 26.IBPluginDependency + 27.IBPluginDependency 3.IBPluginDependency + 44.IBPluginDependency + 71.CustomClassName + 71.IBPluginDependency - + YES com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - {{319, 371}, {606, 354}} + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin {{319, 371}, {606, 354}} - + + com.apple.InterfaceBuilder.CocoaPlugin + ToolbarOpen + com.apple.InterfaceBuilder.CocoaPlugin + ToolbarSave + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + ImageAndTextCell com.apple.InterfaceBuilder.CocoaPlugin YES - - - YES - + + - + YES - - - YES - + + - - 6 + + 71 YES + + ImageAndTextCell + NSTextFieldCell + + IBProjectSource + ./Classes/ImageAndTextCell.h + + MainWindow NSWindow + + YES + + YES + ActionOpenFolder: + ActionSave: + + + YES + id + id + + + + YES + + YES + ActionOpenFolder: + ActionSave: + + + YES + + ActionOpenFolder: + id + + + ActionSave: + id + + + + + YES + + YES + _mainOutlineView + _mainScrollView + _toolbar + _toolbarOpenFolder + _toolbarSave + + + YES + NSOutlineView + NSScrollView + NSToolbar + NSToolbarItem + NSToolbarItem + + + + YES + + YES + _mainOutlineView + _mainScrollView + _toolbar + _toolbarOpenFolder + _toolbarSave + + + YES + + _mainOutlineView + NSOutlineView + + + _mainScrollView + NSScrollView + + + _toolbar + NSToolbar + + + _toolbarOpenFolder + NSToolbarItem + + + _toolbarSave + NSToolbarItem + + + - IBUserSource - + IBProjectSource + ./Classes/MainWindow.h MainWindowController NSWindowController - IBUserSource - + IBProjectSource + ./Classes/MainWindowController.h @@ -180,10 +756,33 @@ IBCocoaFramework com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 - + YES - 3 + + YES + + YES + NSMenuCheckmark + NSMenuMixedState + disk-24 + folder-open-24 + + + YES + {11, 11} + {10, 3} + {24, 24} + {24, 24} + + + + + + NSCell + + + diff --git a/NBTExplorerMac/Mac/Scratch.cs b/NBTExplorerMac/Mac/Scratch.cs index da6aa8c..3313185 100644 --- a/NBTExplorerMac/Mac/Scratch.cs +++ b/NBTExplorerMac/Mac/Scratch.cs @@ -1,11 +1,176 @@ using System; -namespace NBTExplorer.Mac +namespace NBTExplorer.Mac.Test { - public class Scratch + public partial class MainWindow : MonoMac.AppKit.NSWindow { - public Scratch () + // ... + + [Outlet] + MonoMac.AppKit.NSOutlineView _mainOutlineView { get; set; } + + private TreeDataSource _dataSource; + + public override void AwakeFromNib () { + base.AwakeFromNib (); + + _dataSource = new TreeDataSource(); + _mainOutlineView.DataSource = _dataSource; + _mainOutlineView.Delegate = new MyDelegate(this); + } + + public class MyDelegate : NSOutlineViewDelegate + { + private MainWindow _main; + + public MyDelegate (MainWindow main) + { + _main = main; + } + + public override void ItemWillExpand (NSNotification notification) + { + TreeDataNode node = notification.UserInfo ["NSObject"] as TreeDataNode; + if (node != null) { + Console.WriteLine ("Preparing to expand: " + node.Data.NodeDisplay); + _main.ExpandNode(node); + } + } + + public override void ItemDidExpand (NSNotification notification) + { + TreeDataNode node = notification.UserInfo ["NSObject"] as TreeDataNode; + if (node != null) { + Console.WriteLine("Finished Expanding: " + node.Data.NodeDisplay); + } + } + + public override void ItemWillCollapse (NSNotification notification) + { + TreeDataNode node = notification.UserInfo ["NSObject"] as TreeDataNode; + if (node != null) { + if (node.Data.NodeDisplay == "saves") // The root node + Console.WriteLine ("Uh-oh..."); + Console.WriteLine("Preparing to collapse: " + node.Data.NodeDisplay); + } + } + } + + // ... + + private void ExpandNode (TreeDataNode node) + { + if (node == null || node.IsExpanded) + return; + + Console.WriteLine ("Expand Node: " + node.Data.NodeDisplay); + + node.IsExpanded = true; + node.Nodes.Clear (); + + DataNode backNode = node.Data; + if (!backNode.IsExpanded) { + backNode.Expand (); + } + + foreach (DataNode child in backNode.Nodes) { + if (child != null) { + node.Nodes.Add (new TreeDataNode (child)); + } + } + } + } + + public class TreeDataSource : NSOutlineViewDataSource + { + private List _nodes; + + public TreeDataSource () + { + _nodes = new List(); + } + + public List Nodes + { + get { return _nodes; } + } + + public override int GetChildrenCount (NSOutlineView outlineView, NSObject item) + { + if (item is TreeDataNode) { + TreeDataNode nodeItem = item as TreeDataNode; + return nodeItem.Nodes.Count; + } + + return _nodes.Count; + } + + public override NSObject GetObjectValue (NSOutlineView outlineView, NSTableColumn forTableColumn, NSObject byItem) + { + TreeDataNode nodeItem = byItem as TreeDataNode; + if (nodeItem == null) + return null; + + return (NSString)nodeItem.CombinedName; + } + + public override NSObject GetChild (NSOutlineView outlineView, int childIndex, NSObject ofItem) + { + TreeDataNode nodeItem = ofItem as TreeDataNode; + if (nodeItem != null) { + return nodeItem.Nodes [childIndex]; + } + + return Nodes[childIndex]; + } + + public override bool ItemExpandable (NSOutlineView outlineView, NSObject item) + { + TreeDataNode nodeItem = item as TreeDataNode; + if (nodeItem != null) + return nodeItem.HasChildren; + + return false; + } + } + + public class TreeDataNode : NSObject + { + private DataNode _dataNode; + private List _children; + private bool _expanded; + + public TreeDataNode (DataNode node) + { + _dataNode = node; + _children = new List(); + } + + public DataNode Data + { + get { return _dataNode; } + } + + public string CombinedName + { + get { return _dataNode.NodeDisplay; } + } + + public bool IsExpanded + { + get { return _expanded; } + set { _expanded = value; } + } + + public bool HasChildren + { + get { return _children.Count > 0 || _dataNode.HasUnexpandedChildren; } + } + + public List Nodes + { + get { return _children; } } } } diff --git a/NBTExplorerMac/Mac/TreeDataNode.cs b/NBTExplorerMac/Mac/TreeDataNode.cs index 9cc1777..6349bf0 100644 --- a/NBTExplorerMac/Mac/TreeDataNode.cs +++ b/NBTExplorerMac/Mac/TreeDataNode.cs @@ -1,11 +1,52 @@ using System; +using MonoMac.Foundation; +using MonoMac.AppKit; +using NBTExplorer.Model; +using System.Collections.Generic; -namespace NBTExplorer +namespace NBTExplorer.Mac { - public class TreeDataNode + public class TreeDataNode : NSObject { - public TreeDataNode () + private DataNode _dataNode; + private List _children; + private bool _expanded; + + public TreeDataNode (DataNode node) { + _dataNode = node; + _children = new List(); + } + + public DataNode Data + { + get { return _dataNode; } + } + + public string CombinedName + { + get { return _dataNode.NodeDisplay; } + } + + public string Name + { + get { return _dataNode.NodeName; } + } + + public bool IsExpanded + { + get { return _expanded; } + set { _expanded = value; } + } + + public bool HasChildren + { + get { return _children.Count > 0 || _dataNode.HasUnexpandedChildren; } + } + + public List Nodes + { + get { return _children; } } } } diff --git a/NBTExplorerMac/Mac/TreeDataSource.cs b/NBTExplorerMac/Mac/TreeDataSource.cs index b43d782..2791c2e 100644 --- a/NBTExplorerMac/Mac/TreeDataSource.cs +++ b/NBTExplorerMac/Mac/TreeDataSource.cs @@ -1,11 +1,60 @@ using System; +using System.Collections.Generic; +using MonoMac.AppKit; +using MonoMac.Foundation; namespace NBTExplorer.Mac { - public class TreeDataSource + public class TreeDataSource : NSOutlineViewDataSource { + private List _nodes; + public TreeDataSource () { + _nodes = new List(); + } + + public List Nodes + { + get { return _nodes; } + } + + public override int GetChildrenCount (NSOutlineView outlineView, NSObject item) + { + if (item is TreeDataNode) { + TreeDataNode nodeItem = item as TreeDataNode; + return nodeItem.Nodes.Count; + } + + return _nodes.Count; + } + + public override NSObject GetObjectValue (NSOutlineView outlineView, NSTableColumn forTableColumn, NSObject byItem) + { + TreeDataNode nodeItem = byItem as TreeDataNode; + if (nodeItem == null) + return null; + + return (NSString)nodeItem.CombinedName; + } + + public override NSObject GetChild (NSOutlineView outlineView, int childIndex, NSObject ofItem) + { + TreeDataNode nodeItem = ofItem as TreeDataNode; + if (nodeItem != null) { + return nodeItem.Nodes [childIndex]; + } + + return Nodes[childIndex]; + } + + public override bool ItemExpandable (NSOutlineView outlineView, NSObject item) + { + TreeDataNode nodeItem = item as TreeDataNode; + if (nodeItem != null) + return nodeItem.HasChildren; + + return false; } } } diff --git a/NBTExplorerMac/MainForm.cs b/NBTExplorerMac/MainForm.cs index bfa726a..b6847ef 100644 --- a/NBTExplorerMac/MainForm.cs +++ b/NBTExplorerMac/MainForm.cs @@ -37,7 +37,7 @@ namespace NBTExplorer _tagIconIndex[TagType.TAG_INT_ARRAY] = 14; } catch (Exception e) { - Program.StaticInitFailure(e); + //Program.StaticInitFailure(e); } } diff --git a/NBTExplorerMac/Model/FileTypeRegistry.cs b/NBTExplorerMac/Model/FileTypeRegistry.cs index 64e746b..c2d2cef 100644 --- a/NBTExplorerMac/Model/FileTypeRegistry.cs +++ b/NBTExplorerMac/Model/FileTypeRegistry.cs @@ -62,7 +62,7 @@ namespace NBTExplorer.Model }); } catch (Exception e) { - Program.StaticInitFailure(e); + //Program.StaticInitFailure(e); } } } diff --git a/NBTExplorerMac/NBTExplorerMac.csproj b/NBTExplorerMac/NBTExplorerMac.csproj index 9ddb9f2..d8255dd 100644 --- a/NBTExplorerMac/NBTExplorerMac.csproj +++ b/NBTExplorerMac/NBTExplorerMac.csproj @@ -8,9 +8,9 @@ {01F9A296-C477-4CBF-A0D0-41E697048257} {948B3504-5B70-4649-8FE4-BDE1FB46EC69};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} Exe - NBTExplorerMac + NBTExplorer Resources - NBTExplorerMac + NBTExplorer True @@ -26,6 +26,7 @@ False False Mac Developer + 3rd Party Mac Developer Installer none @@ -34,12 +35,13 @@ prompt 4 False - False + True Full False False False Mac Developer + 3rd Party Mac Developer Installer none @@ -62,11 +64,203 @@ - + + ..\..\Substrate\SubstrateCS\bin\Release\NET2\Substrate.dll + + + + + False + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + MainWindow.cs + + + + AppDelegate.cs + + + + + + + + EditValue.cs + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/NBTExplorerMac/Program.cs b/NBTExplorerMac/Program.cs index d2f1547..509525b 100644 --- a/NBTExplorerMac/Program.cs +++ b/NBTExplorerMac/Program.cs @@ -1,6 +1,9 @@ using System; using System.Collections.Generic; using System.Windows.Forms; +using MonoMac.Foundation; +using MonoMac.AppKit; +using MonoMac.ObjCRuntime; namespace NBTExplorer { @@ -9,15 +12,18 @@ namespace NBTExplorer /// /// The main entry point for the application. /// - [STAThread] - static void Main () + //[STAThread] + static void Main (string[] args) { - Application.EnableVisualStyles(); - Application.SetCompatibleTextRenderingDefault(false); - Application.Run(new MainForm()); + NSApplication.Init (); + NSApplication.Main (args); + + //Application.EnableVisualStyles(); + //Application.SetCompatibleTextRenderingDefault(false); + ///Application.Run(new MainForm()); } - public static void StaticInitFailure (Exception e) + /*public static void StaticInitFailure (Exception e) { Console.WriteLine("Static Initialization Failure:"); @@ -30,6 +36,6 @@ namespace NBTExplorer MessageBox.Show("Application failed during static initialization: " + original.Message); Application.Exit(); - } + }*/ } } diff --git a/Test/AppDelegate.cs b/Test/AppDelegate.cs deleted file mode 100644 index 32579a8..0000000 --- a/Test/AppDelegate.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System; -using System.Drawing; -using MonoMac.Foundation; -using MonoMac.AppKit; -using MonoMac.ObjCRuntime; - -namespace Test -{ - public partial class AppDelegate : NSApplicationDelegate - { - MainWindowController mainWindowController; - - public AppDelegate () - { - } - - public override void FinishedLaunching (NSObject notification) - { - mainWindowController = new MainWindowController (); - mainWindowController.Window.MakeKeyAndOrderFront (this); - } - } -} - diff --git a/Test/AppDelegate.designer.cs b/Test/AppDelegate.designer.cs deleted file mode 100644 index e0d6166..0000000 --- a/Test/AppDelegate.designer.cs +++ /dev/null @@ -1,10 +0,0 @@ - -namespace Test -{ - // Should subclass MonoMac.AppKit.NSResponder - [MonoMac.Foundation.Register("AppDelegate")] - public partial class AppDelegate - { - } -} - diff --git a/Test/Info.plist b/Test/Info.plist deleted file mode 100644 index 0651d58..0000000 --- a/Test/Info.plist +++ /dev/null @@ -1,18 +0,0 @@ - - - - - CFBundleIdentifier - com.yourcompany.Test - CFBundleName - Test - CFBundleVersion - 1 - LSMinimumSystemVersion - 10.6 - NSMainNibFile - MainMenu - NSPrincipalClass - NSApplication - - diff --git a/Test/Main.cs b/Test/Main.cs deleted file mode 100644 index 5ed8527..0000000 --- a/Test/Main.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System; -using System.Drawing; -using MonoMac.Foundation; -using MonoMac.AppKit; -using MonoMac.ObjCRuntime; - -namespace Test -{ - class MainClass - { - static void Main (string[] args) - { - NSApplication.Init (); - NSApplication.Main (args); - } - } -} - diff --git a/Test/MainMenu.xib b/Test/MainMenu.xib deleted file mode 100644 index 52d0fd5..0000000 --- a/Test/MainMenu.xib +++ /dev/null @@ -1,4074 +0,0 @@ - - - - 1060 - 10D573 - 762 - 1038.29 - 460.00 - - com.apple.InterfaceBuilder.CocoaPlugin - 762 - - - YES - - - - YES - com.apple.InterfaceBuilder.CocoaPlugin - - - YES - - YES - - - YES - - - - YES - - NSApplication - - - FirstResponder - - - NSApplication - - - AMainMenu - - YES - - - Test - - 1048576 - 2147483647 - - NSImage - NSMenuCheckmark - - - NSImage - NSMenuMixedState - - submenuAction: - - MacCocoaApp - - YES - - - About Test - - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Preferences… - , - 1048576 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Services - - 1048576 - 2147483647 - - - submenuAction: - - Services - - YES - - _NSServicesMenu - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Hide Test - h - 1048576 - 2147483647 - - - - - - Hide Others - h - 1572864 - 2147483647 - - - - - - Show All - - 1048576 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Quit Test - q - 1048576 - 2147483647 - - - - - _NSAppleMenu - - - - - File - - 1048576 - 2147483647 - - - submenuAction: - - File - - YES - - - New - n - 1048576 - 2147483647 - - - - - - Open… - o - 1048576 - 2147483647 - - - - - - Open Recent - - 1048576 - 2147483647 - - - submenuAction: - - Open Recent - - YES - - - Clear Menu - - 1048576 - 2147483647 - - - - - _NSRecentDocumentsMenu - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Close - w - 1048576 - 2147483647 - - - - - - Save - s - 1048576 - 2147483647 - - - - - - Save As… - S - 1179648 - 2147483647 - - - - - - Revert to Saved - - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Page Setup... - P - 1179648 - 2147483647 - - - - - - - Print… - p - 1048576 - 2147483647 - - - - - - - - - Edit - - 1048576 - 2147483647 - - - submenuAction: - - Edit - - YES - - - Undo - z - 1048576 - 2147483647 - - - - - - Redo - Z - 1179648 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Cut - x - 1048576 - 2147483647 - - - - - - Copy - c - 1048576 - 2147483647 - - - - - - Paste - v - 1048576 - 2147483647 - - - - - - Paste and Match Style - V - 1572864 - 2147483647 - - - - - - Delete - - 1048576 - 2147483647 - - - - - - Select All - a - 1048576 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Find - - 1048576 - 2147483647 - - - submenuAction: - - Find - - YES - - - Find… - f - 1048576 - 2147483647 - - - 1 - - - - Find Next - g - 1048576 - 2147483647 - - - 2 - - - - Find Previous - G - 1179648 - 2147483647 - - - 3 - - - - Use Selection for Find - e - 1048576 - 2147483647 - - - 7 - - - - Jump to Selection - j - 1048576 - 2147483647 - - - - - - - - - Spelling and Grammar - - 1048576 - 2147483647 - - - submenuAction: - - Spelling and Grammar - - YES - - - Show Spelling and Grammar - : - 1048576 - 2147483647 - - - - - - Check Document Now - ; - 1048576 - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - Check Spelling While Typing - - 1048576 - 2147483647 - - - - - - Check Grammar With Spelling - - 1048576 - 2147483647 - - - - - - Correct Spelling Automatically - - 2147483647 - - - - - - - - - Substitutions - - 1048576 - 2147483647 - - - submenuAction: - - Substitutions - - YES - - - Show Substitutions - - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - Smart Copy/Paste - f - 1048576 - 2147483647 - - - 1 - - - - Smart Quotes - g - 1048576 - 2147483647 - - - 2 - - - - Smart Dashes - - 2147483647 - - - - - - Smart Links - G - 1179648 - 2147483647 - - - 3 - - - - Text Replacement - - 2147483647 - - - - - - - - - Transformations - - 2147483647 - - - submenuAction: - - Transformations - - YES - - - Make Upper Case - - 2147483647 - - - - - - Make Lower Case - - 2147483647 - - - - - - Capitalize - - 2147483647 - - - - - - - - - Speech - - 1048576 - 2147483647 - - - submenuAction: - - Speech - - YES - - - Start Speaking - - 1048576 - 2147483647 - - - - - - Stop Speaking - - 1048576 - 2147483647 - - - - - - - - - - - - Format - - 2147483647 - - - submenuAction: - - Format - - YES - - - Font - - 2147483647 - - - submenuAction: - - Font - - YES - - - Show Fonts - t - 1048576 - 2147483647 - - - - - - Bold - b - 1048576 - 2147483647 - - - 2 - - - - Italic - i - 1048576 - 2147483647 - - - 1 - - - - Underline - u - 1048576 - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - Bigger - + - 1048576 - 2147483647 - - - 3 - - - - Smaller - - - 1048576 - 2147483647 - - - 4 - - - - YES - YES - - - 2147483647 - - - - - - Kern - - 2147483647 - - - submenuAction: - - Kern - - YES - - - Use Default - - 2147483647 - - - - - - Use None - - 2147483647 - - - - - - Tighten - - 2147483647 - - - - - - Loosen - - 2147483647 - - - - - - - - - Ligature - - 2147483647 - - - submenuAction: - - Ligature - - YES - - - Use Default - - 2147483647 - - - - - - Use None - - 2147483647 - - - - - - Use All - - 2147483647 - - - - - - - - - Baseline - - 2147483647 - - - submenuAction: - - Baseline - - YES - - - Use Default - - 2147483647 - - - - - - Superscript - - 2147483647 - - - - - - Subscript - - 2147483647 - - - - - - Raise - - 2147483647 - - - - - - Lower - - 2147483647 - - - - - - - - - YES - YES - - - 2147483647 - - - - - - Show Colors - C - 1048576 - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - Copy Style - c - 1572864 - 2147483647 - - - - - - Paste Style - v - 1572864 - 2147483647 - - - - - _NSFontMenu - - - - - Text - - 2147483647 - - - submenuAction: - - Text - - YES - - - Align Left - { - 1048576 - 2147483647 - - - - - - Center - | - 1048576 - 2147483647 - - - - - - Justify - - 2147483647 - - - - - - Align Right - } - 1048576 - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - Writing Direction - - 2147483647 - - - submenuAction: - - Writing Direction - - YES - - - YES - Paragraph - - 2147483647 - - - - - - CURlZmF1bHQ - - 2147483647 - - - - - - CUxlZnQgdG8gUmlnaHQ - - 2147483647 - - - - - - CVJpZ2h0IHRvIExlZnQ - - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - YES - Selection - - 2147483647 - - - - - - CURlZmF1bHQ - - 2147483647 - - - - - - CUxlZnQgdG8gUmlnaHQ - - 2147483647 - - - - - - CVJpZ2h0IHRvIExlZnQ - - 2147483647 - - - - - - - - - YES - YES - - - 2147483647 - - - - - - Show Ruler - - 2147483647 - - - - - - Copy Ruler - c - 1310720 - 2147483647 - - - - - - Paste Ruler - v - 1310720 - 2147483647 - - - - - - - - - - - - View - - 1048576 - 2147483647 - - - submenuAction: - - View - - YES - - - Show Toolbar - t - 1572864 - 2147483647 - - - - - - Customize Toolbar… - - 1048576 - 2147483647 - - - - - - - - - Window - - 1048576 - 2147483647 - - - submenuAction: - - Window - - YES - - - Minimize - m - 1048576 - 2147483647 - - - - - - Zoom - - 1048576 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Bring All to Front - - 1048576 - 2147483647 - - - - - _NSWindowsMenu - - - - - Help - - 2147483647 - - - submenuAction: - - Help - - YES - - - Test Help - ? - 1048576 - 2147483647 - - - - - _NSHelpMenu - - - - _NSMainMenu - - - NSFontManager - - - AppDelegate - - - - - YES - - - performMiniaturize: - - - - 37 - - - - arrangeInFront: - - - - 39 - - - - print: - - - - 86 - - - - runPageLayout: - - - - 87 - - - - clearRecentDocuments: - - - - 127 - - - - orderFrontStandardAboutPanel: - - - - 142 - - - - performClose: - - - - 193 - - - - toggleContinuousSpellChecking: - - - - 222 - - - - undo: - - - - 223 - - - - copy: - - - - 224 - - - - checkSpelling: - - - - 225 - - - - paste: - - - - 226 - - - - stopSpeaking: - - - - 227 - - - - cut: - - - - 228 - - - - showGuessPanel: - - - - 230 - - - - redo: - - - - 231 - - - - selectAll: - - - - 232 - - - - startSpeaking: - - - - 233 - - - - delete: - - - - 235 - - - - performZoom: - - - - 240 - - - - performFindPanelAction: - - - - 241 - - - - centerSelectionInVisibleArea: - - - - 245 - - - - toggleGrammarChecking: - - - - 347 - - - - toggleSmartInsertDelete: - - - - 355 - - - - toggleAutomaticQuoteSubstitution: - - - - 356 - - - - toggleAutomaticLinkDetection: - - - - 357 - - - - saveDocument: - - - - 362 - - - - saveDocumentAs: - - - - 363 - - - - revertDocumentToSaved: - - - - 364 - - - - runToolbarCustomizationPalette: - - - - 365 - - - - toggleToolbarShown: - - - - 366 - - - - hide: - - - - 367 - - - - hideOtherApplications: - - - - 368 - - - - unhideAllApplications: - - - - 370 - - - - newDocument: - - - - 373 - - - - openDocument: - - - - 374 - - - - addFontTrait: - - - - 421 - - - - addFontTrait: - - - - 422 - - - - modifyFont: - - - - 423 - - - - orderFrontFontPanel: - - - - 424 - - - - modifyFont: - - - - 425 - - - - raiseBaseline: - - - - 426 - - - - lowerBaseline: - - - - 427 - - - - copyFont: - - - - 428 - - - - subscript: - - - - 429 - - - - superscript: - - - - 430 - - - - tightenKerning: - - - - 431 - - - - underline: - - - - 432 - - - - orderFrontColorPanel: - - - - 433 - - - - useAllLigatures: - - - - 434 - - - - loosenKerning: - - - - 435 - - - - pasteFont: - - - - 436 - - - - unscript: - - - - 437 - - - - useStandardKerning: - - - - 438 - - - - useStandardLigatures: - - - - 439 - - - - turnOffLigatures: - - - - 440 - - - - turnOffKerning: - - - - 441 - - - - terminate: - - - - 449 - - - - toggleAutomaticSpellingCorrection: - - - - 456 - - - - orderFrontSubstitutionsPanel: - - - - 458 - - - - toggleAutomaticDashSubstitution: - - - - 461 - - - - toggleAutomaticTextReplacement: - - - - 463 - - - - uppercaseWord: - - - - 464 - - - - capitalizeWord: - - - - 467 - - - - lowercaseWord: - - - - 468 - - - - pasteAsPlainText: - - - - 486 - - - - performFindPanelAction: - - - - 487 - - - - performFindPanelAction: - - - - 488 - - - - performFindPanelAction: - - - - 489 - - - - showHelp: - - - - 493 - - - - alignCenter: - - - - 518 - - - - pasteRuler: - - - - 519 - - - - toggleRuler: - - - - 520 - - - - alignRight: - - - - 521 - - - - copyRuler: - - - - 522 - - - - alignJustified: - - - - 523 - - - - alignLeft: - - - - 524 - - - - makeBaseWritingDirectionNatural: - - - - 525 - - - - makeBaseWritingDirectionLeftToRight: - - - - 526 - - - - makeBaseWritingDirectionRightToLeft: - - - - 527 - - - - makeTextWritingDirectionNatural: - - - - 528 - - - - makeTextWritingDirectionLeftToRight: - - - - 529 - - - - makeTextWritingDirectionRightToLeft: - - - - 530 - - - - delegate - - - - 534 - - - - - YES - - 0 - - - - - - -2 - - - File's Owner - - - -1 - - - First Responder - - - -3 - - - Application - - - 29 - - - YES - - - - - - - - - - - - 19 - - - YES - - - - - - 56 - - - YES - - - - - - 217 - - - YES - - - - - - 83 - - - YES - - - - - - 81 - - - YES - - - - - - - - - - - - - - - - 75 - - - - - 80 - - - - - 78 - - - - - 72 - - - - - 82 - - - - - 124 - - - YES - - - - - - 77 - - - - - 73 - - - - - 79 - - - - - 112 - - - - - 74 - - - - - 125 - - - YES - - - - - - 126 - - - - - 205 - - - YES - - - - - - - - - - - - - - - - - - - - 202 - - - - - 198 - - - - - 207 - - - - - 214 - - - - - 199 - - - - - 203 - - - - - 197 - - - - - 206 - - - - - 215 - - - - - 218 - - - YES - - - - - - 216 - - - YES - - - - - - 200 - - - YES - - - - - - - - - - - 219 - - - - - 201 - - - - - 204 - - - - - 220 - - - YES - - - - - - - - - - 213 - - - - - 210 - - - - - 221 - - - - - 208 - - - - - 209 - - - - - 57 - - - YES - - - - - - - - - - - - - - - - 58 - - - - - 134 - - - - - 150 - - - - - 136 - - - - - 144 - - - - - 129 - - - - - 143 - - - - - 236 - - - - - 131 - - - YES - - - - - - 149 - - - - - 145 - - - - - 130 - - - - - 24 - - - YES - - - - - - - - - 92 - - - - - 5 - - - - - 239 - - - - - 23 - - - - - 295 - - - YES - - - - - - 296 - - - YES - - - - - - - 297 - - - - - 298 - - - - - 211 - - - YES - - - - - - 212 - - - YES - - - - - - - 195 - - - - - 196 - - - - - 346 - - - - - 348 - - - YES - - - - - - 349 - - - YES - - - - - - - - - - - - 350 - - - - - 351 - - - - - 354 - - - - - 375 - - - YES - - - - - - 376 - - - YES - - - - - - - 377 - - - YES - - - - - - 388 - - - YES - - - - - - - - - - - - - - - - - - - - - 389 - - - - - 390 - - - - - 391 - - - - - 392 - - - - - 393 - - - - - 394 - - - - - 395 - - - - - 396 - - - - - 397 - - - YES - - - - - - 398 - - - YES - - - - - - 399 - - - YES - - - - - - 400 - - - - - 401 - - - - - 402 - - - - - 403 - - - - - 404 - - - - - 405 - - - YES - - - - - - - - - - 406 - - - - - 407 - - - - - 408 - - - - - 409 - - - - - 410 - - - - - 411 - - - YES - - - - - - - - 412 - - - - - 413 - - - - - 414 - - - - - 415 - - - YES - - - - - - - - - 416 - - - - - 417 - - - - - 418 - - - - - 419 - - - - - 420 - - - - - 450 - - - YES - - - - - - 451 - - - YES - - - - - - - - 452 - - - - - 453 - - - - - 454 - - - - - 457 - - - - - 459 - - - - - 460 - - - - - 462 - - - - - 465 - - - - - 466 - - - - - 485 - - - - - 490 - - - YES - - - - - - 491 - - - YES - - - - - - 492 - - - - - 496 - - - YES - - - - - - 497 - - - YES - - - - - - - - - - - - - - - 498 - - - - - 499 - - - - - 500 - - - - - 501 - - - - - 502 - - - - - 503 - - - YES - - - - - - 504 - - - - - 505 - - - - - 506 - - - - - 507 - - - - - 508 - - - YES - - - - - - - - - - - - - - 509 - - - - - 510 - - - - - 511 - - - - - 512 - - - - - 513 - - - - - 514 - - - - - 515 - - - - - 516 - - - - - 517 - - - - - 533 - - - - - - - YES - - YES - -3.IBPluginDependency - 112.IBPluginDependency - 112.ImportedFromIB2 - 124.IBPluginDependency - 124.ImportedFromIB2 - 125.IBPluginDependency - 125.ImportedFromIB2 - 125.editorWindowContentRectSynchronizationRect - 126.IBPluginDependency - 126.ImportedFromIB2 - 129.IBPluginDependency - 129.ImportedFromIB2 - 130.IBPluginDependency - 130.ImportedFromIB2 - 130.editorWindowContentRectSynchronizationRect - 131.IBPluginDependency - 131.ImportedFromIB2 - 134.IBPluginDependency - 134.ImportedFromIB2 - 136.IBPluginDependency - 136.ImportedFromIB2 - 143.IBPluginDependency - 143.ImportedFromIB2 - 144.IBPluginDependency - 144.ImportedFromIB2 - 145.IBPluginDependency - 145.ImportedFromIB2 - 149.IBPluginDependency - 149.ImportedFromIB2 - 150.IBPluginDependency - 150.ImportedFromIB2 - 19.IBPluginDependency - 19.ImportedFromIB2 - 195.IBPluginDependency - 195.ImportedFromIB2 - 196.IBPluginDependency - 196.ImportedFromIB2 - 197.IBPluginDependency - 197.ImportedFromIB2 - 198.IBPluginDependency - 198.ImportedFromIB2 - 199.IBPluginDependency - 199.ImportedFromIB2 - 200.IBEditorWindowLastContentRect - 200.IBPluginDependency - 200.ImportedFromIB2 - 200.editorWindowContentRectSynchronizationRect - 201.IBPluginDependency - 201.ImportedFromIB2 - 202.IBPluginDependency - 202.ImportedFromIB2 - 203.IBPluginDependency - 203.ImportedFromIB2 - 204.IBPluginDependency - 204.ImportedFromIB2 - 205.IBEditorWindowLastContentRect - 205.IBPluginDependency - 205.ImportedFromIB2 - 205.editorWindowContentRectSynchronizationRect - 206.IBPluginDependency - 206.ImportedFromIB2 - 207.IBPluginDependency - 207.ImportedFromIB2 - 208.IBPluginDependency - 208.ImportedFromIB2 - 209.IBPluginDependency - 209.ImportedFromIB2 - 210.IBPluginDependency - 210.ImportedFromIB2 - 211.IBPluginDependency - 211.ImportedFromIB2 - 212.IBPluginDependency - 212.ImportedFromIB2 - 212.editorWindowContentRectSynchronizationRect - 213.IBPluginDependency - 213.ImportedFromIB2 - 214.IBPluginDependency - 214.ImportedFromIB2 - 215.IBPluginDependency - 215.ImportedFromIB2 - 216.IBPluginDependency - 216.ImportedFromIB2 - 217.IBPluginDependency - 217.ImportedFromIB2 - 218.IBPluginDependency - 218.ImportedFromIB2 - 219.IBPluginDependency - 219.ImportedFromIB2 - 220.IBEditorWindowLastContentRect - 220.IBPluginDependency - 220.ImportedFromIB2 - 220.editorWindowContentRectSynchronizationRect - 221.IBPluginDependency - 221.ImportedFromIB2 - 23.IBPluginDependency - 23.ImportedFromIB2 - 236.IBPluginDependency - 236.ImportedFromIB2 - 239.IBPluginDependency - 239.ImportedFromIB2 - 24.IBEditorWindowLastContentRect - 24.IBPluginDependency - 24.ImportedFromIB2 - 24.editorWindowContentRectSynchronizationRect - 29.IBEditorWindowLastContentRect - 29.IBPluginDependency - 29.ImportedFromIB2 - 29.WindowOrigin - 29.editorWindowContentRectSynchronizationRect - 295.IBPluginDependency - 296.IBEditorWindowLastContentRect - 296.IBPluginDependency - 296.editorWindowContentRectSynchronizationRect - 297.IBPluginDependency - 298.IBPluginDependency - 346.IBPluginDependency - 346.ImportedFromIB2 - 348.IBPluginDependency - 348.ImportedFromIB2 - 349.IBEditorWindowLastContentRect - 349.IBPluginDependency - 349.ImportedFromIB2 - 349.editorWindowContentRectSynchronizationRect - 350.IBPluginDependency - 350.ImportedFromIB2 - 351.IBPluginDependency - 351.ImportedFromIB2 - 354.IBPluginDependency - 354.ImportedFromIB2 - 375.IBPluginDependency - 376.IBEditorWindowLastContentRect - 376.IBPluginDependency - 377.IBPluginDependency - 388.IBEditorWindowLastContentRect - 388.IBPluginDependency - 389.IBPluginDependency - 390.IBPluginDependency - 391.IBPluginDependency - 392.IBPluginDependency - 393.IBPluginDependency - 394.IBPluginDependency - 395.IBPluginDependency - 396.IBPluginDependency - 397.IBPluginDependency - 398.IBPluginDependency - 399.IBPluginDependency - 400.IBPluginDependency - 401.IBPluginDependency - 402.IBPluginDependency - 403.IBPluginDependency - 404.IBPluginDependency - 405.IBPluginDependency - 406.IBPluginDependency - 407.IBPluginDependency - 408.IBPluginDependency - 409.IBPluginDependency - 410.IBPluginDependency - 411.IBPluginDependency - 412.IBPluginDependency - 413.IBPluginDependency - 414.IBPluginDependency - 415.IBPluginDependency - 416.IBPluginDependency - 417.IBPluginDependency - 418.IBPluginDependency - 419.IBPluginDependency - 450.IBPluginDependency - 451.IBEditorWindowLastContentRect - 451.IBPluginDependency - 452.IBPluginDependency - 453.IBPluginDependency - 454.IBPluginDependency - 457.IBPluginDependency - 459.IBPluginDependency - 460.IBPluginDependency - 462.IBPluginDependency - 465.IBPluginDependency - 466.IBPluginDependency - 485.IBPluginDependency - 490.IBPluginDependency - 491.IBEditorWindowLastContentRect - 491.IBPluginDependency - 492.IBPluginDependency - 496.IBPluginDependency - 497.IBEditorWindowLastContentRect - 497.IBPluginDependency - 498.IBPluginDependency - 499.IBPluginDependency - 5.IBPluginDependency - 5.ImportedFromIB2 - 500.IBPluginDependency - 501.IBPluginDependency - 502.IBPluginDependency - 503.IBPluginDependency - 504.IBPluginDependency - 505.IBPluginDependency - 506.IBPluginDependency - 507.IBPluginDependency - 508.IBEditorWindowLastContentRect - 508.IBPluginDependency - 509.IBPluginDependency - 510.IBPluginDependency - 511.IBPluginDependency - 512.IBPluginDependency - 513.IBPluginDependency - 514.IBPluginDependency - 515.IBPluginDependency - 516.IBPluginDependency - 517.IBPluginDependency - 56.IBPluginDependency - 56.ImportedFromIB2 - 57.IBEditorWindowLastContentRect - 57.IBPluginDependency - 57.ImportedFromIB2 - 57.editorWindowContentRectSynchronizationRect - 58.IBPluginDependency - 58.ImportedFromIB2 - 72.IBPluginDependency - 72.ImportedFromIB2 - 73.IBPluginDependency - 73.ImportedFromIB2 - 74.IBPluginDependency - 74.ImportedFromIB2 - 75.IBPluginDependency - 75.ImportedFromIB2 - 77.IBPluginDependency - 77.ImportedFromIB2 - 78.IBPluginDependency - 78.ImportedFromIB2 - 79.IBPluginDependency - 79.ImportedFromIB2 - 80.IBPluginDependency - 80.ImportedFromIB2 - 81.IBEditorWindowLastContentRect - 81.IBPluginDependency - 81.ImportedFromIB2 - 81.editorWindowContentRectSynchronizationRect - 82.IBPluginDependency - 82.ImportedFromIB2 - 83.IBPluginDependency - 83.ImportedFromIB2 - 92.IBPluginDependency - 92.ImportedFromIB2 - - - YES - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{522, 812}, {146, 23}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{436, 809}, {64, 6}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{753, 187}, {275, 113}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{608, 612}, {275, 83}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{453, 408}, {254, 283}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{187, 434}, {243, 243}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{608, 612}, {167, 43}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{753, 217}, {238, 103}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{608, 612}, {241, 103}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{613, 618}, {194, 73}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{525, 802}, {197, 73}} - {{346, 722}, {402, 20}} - com.apple.InterfaceBuilder.CocoaPlugin - - {74, 862} - {{6, 978}, {478, 20}} - com.apple.InterfaceBuilder.CocoaPlugin - {{563, 648}, {231, 43}} - com.apple.InterfaceBuilder.CocoaPlugin - {{475, 832}, {234, 43}} - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{746, 287}, {220, 133}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{608, 612}, {215, 63}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - {{497, 648}, {83, 43}} - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - {{580, 408}, {175, 283}} - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - {{753, 197}, {170, 63}} - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - {{684, 668}, {142, 23}} - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - {{674, 260}, {204, 183}} - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - {{878, 180}, {164, 173}} - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - {{355, 508}, {183, 183}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{23, 794}, {245, 183}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{411, 488}, {196, 203}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{145, 474}, {199, 203}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - - - - YES - - - YES - - - - - YES - - - YES - - - - 534 - - - - YES - - AppDelegate - NSResponder - - IBUserSource - - - - - - YES - - NSApplication - NSResponder - - IBFrameworkSource - AppKit.framework/Headers/NSApplication.h - - - - NSApplication - - IBFrameworkSource - AppKit.framework/Headers/NSApplicationScripting.h - - - - NSApplication - - IBFrameworkSource - AppKit.framework/Headers/NSColorPanel.h - - - - NSApplication - - IBFrameworkSource - AppKit.framework/Headers/NSHelpManager.h - - - - NSApplication - - IBFrameworkSource - AppKit.framework/Headers/NSPageLayout.h - - - - NSApplication - - IBFrameworkSource - AppKit.framework/Headers/NSUserInterfaceItemSearching.h - - - - NSBrowser - NSControl - - IBFrameworkSource - AppKit.framework/Headers/NSBrowser.h - - - - NSControl - NSView - - IBFrameworkSource - AppKit.framework/Headers/NSControl.h - - - - NSDocument - NSObject - - YES - - YES - printDocument: - revertDocumentToSaved: - runPageLayout: - saveDocument: - saveDocumentAs: - saveDocumentTo: - - - YES - id - id - id - id - id - id - - - - IBFrameworkSource - AppKit.framework/Headers/NSDocument.h - - - - NSDocument - - IBFrameworkSource - AppKit.framework/Headers/NSDocumentScripting.h - - - - NSDocumentController - NSObject - - YES - - YES - clearRecentDocuments: - newDocument: - openDocument: - saveAllDocuments: - - - YES - id - id - id - id - - - - IBFrameworkSource - AppKit.framework/Headers/NSDocumentController.h - - - - NSFontManager - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSFontManager.h - - - - NSFormatter - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSFormatter.h - - - - NSMatrix - NSControl - - IBFrameworkSource - AppKit.framework/Headers/NSMatrix.h - - - - NSMenu - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSMenu.h - - - - NSMenuItem - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSMenuItem.h - - - - NSMovieView - NSView - - IBFrameworkSource - AppKit.framework/Headers/NSMovieView.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSAccessibility.h - - - - NSObject - - - - NSObject - - - - NSObject - - - - NSObject - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSDictionaryController.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSDragging.h - - - - NSObject - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSFontPanel.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSKeyValueBinding.h - - - - NSObject - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSNibLoading.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSOutlineView.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSPasteboard.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSSavePanel.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSTableView.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSToolbarItem.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSView.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSArchiver.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSClassDescription.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSError.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSFileManager.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueCoding.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueObserving.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyedArchiver.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSObject.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSObjectScripting.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSPortCoder.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSRunLoop.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSScriptClassDescription.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSScriptKeyValueCoding.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSScriptObjectSpecifiers.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSScriptWhoseTests.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSThread.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURL.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURLConnection.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURLDownload.h - - - - NSResponder - - IBFrameworkSource - AppKit.framework/Headers/NSInterfaceStyle.h - - - - NSResponder - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSResponder.h - - - - NSTableView - NSControl - - - - NSText - NSView - - IBFrameworkSource - AppKit.framework/Headers/NSText.h - - - - NSTextView - NSText - - IBFrameworkSource - AppKit.framework/Headers/NSTextView.h - - - - NSView - - IBFrameworkSource - AppKit.framework/Headers/NSClipView.h - - - - NSView - - - - NSView - - IBFrameworkSource - AppKit.framework/Headers/NSRulerView.h - - - - NSView - NSResponder - - - - NSWindow - - IBFrameworkSource - AppKit.framework/Headers/NSDrawer.h - - - - NSWindow - NSResponder - - IBFrameworkSource - AppKit.framework/Headers/NSWindow.h - - - - NSWindow - - IBFrameworkSource - AppKit.framework/Headers/NSWindowScripting.h - - - - - 0 - IBCocoaFramework - - com.apple.InterfaceBuilder.CocoaPlugin.macosx - - - - com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 - - - YES - ../MacCocoaApp.xcodeproj - 3 - - YES - - YES - NSMenuCheckmark - NSMenuMixedState - - - YES - {9, 8} - {7, 2} - - - - diff --git a/Test/MainWindow.cs b/Test/MainWindow.cs deleted file mode 100644 index da9548f..0000000 --- a/Test/MainWindow.cs +++ /dev/null @@ -1,35 +0,0 @@ - -using System; -using System.Collections.Generic; -using System.Linq; -using MonoMac.Foundation; -using MonoMac.AppKit; - -namespace Test -{ - public partial class MainWindow : MonoMac.AppKit.NSWindow - { - #region Constructors - - // Called when created from unmanaged code - public MainWindow (IntPtr handle) : base (handle) - { - Initialize (); - } - - // Called when created directly from a XIB file - [Export ("initWithCoder:")] - public MainWindow (NSCoder coder) : base (coder) - { - Initialize (); - } - - // Shared initialization code - void Initialize () - { - } - - #endregion - } -} - diff --git a/Test/MainWindow.designer.cs b/Test/MainWindow.designer.cs deleted file mode 100644 index 3d9393d..0000000 --- a/Test/MainWindow.designer.cs +++ /dev/null @@ -1,17 +0,0 @@ - -namespace Test -{ - - // Should subclass MonoMac.AppKit.NSWindow - [MonoMac.Foundation.Register("MainWindow")] - public partial class MainWindow - { - } - - // Should subclass MonoMac.AppKit.NSWindowController - [MonoMac.Foundation.Register("MainWindowController")] - public partial class MainWindowController - { - } -} - diff --git a/Test/MainWindow.xib b/Test/MainWindow.xib deleted file mode 100644 index 060535b..0000000 --- a/Test/MainWindow.xib +++ /dev/null @@ -1,189 +0,0 @@ - - - - 1060 - 10D573 - 762 - 1038.29 - 460.00 - - com.apple.InterfaceBuilder.CocoaPlugin - 762 - - - YES - - - - YES - com.apple.InterfaceBuilder.CocoaPlugin - - - YES - - YES - - - YES - - - - YES - - MainWindowController - - - FirstResponder - - - NSApplication - - - 15 - 2 - {{131, 74}, {606, 354}} - 611844096 - Window - MainWindow - - {1.79769e+308, 1.79769e+308} - - - 256 - {606, 354} - - - {{0, 0}, {1280, 778}} - {1.79769e+308, 1.79769e+308} - - - - - YES - - - window - - - - 6 - - - - - YES - - 0 - - - - - - -2 - - - File's Owner - - - -1 - - - First Responder - - - -3 - - - Application - - - 2 - - - YES - - - - - - 3 - - - - - - - YES - - YES - -1.IBPluginDependency - -2.IBPluginDependency - -3.IBPluginDependency - 2.IBEditorWindowLastContentRect - 2.IBPluginDependency - 2.IBWindowTemplateEditedContentRect - 2.NSWindowTemplate.visibleAtLaunch - 3.IBPluginDependency - - - YES - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - {{319, 371}, {606, 354}} - com.apple.InterfaceBuilder.CocoaPlugin - {{319, 371}, {606, 354}} - - com.apple.InterfaceBuilder.CocoaPlugin - - - - YES - - - YES - - - - - YES - - - YES - - - - 6 - - - - YES - - MainWindow - NSWindow - - IBUserSource - - - - - MainWindowController - NSWindowController - - IBUserSource - - - - - - 0 - IBCocoaFramework - - com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 - - - YES - - 3 - - diff --git a/Test/MainWindowController.cs b/Test/MainWindowController.cs deleted file mode 100644 index 54fb420..0000000 --- a/Test/MainWindowController.cs +++ /dev/null @@ -1,48 +0,0 @@ - -using System; -using System.Collections.Generic; -using System.Linq; -using MonoMac.Foundation; -using MonoMac.AppKit; - -namespace Test -{ - public partial class MainWindowController : MonoMac.AppKit.NSWindowController - { - #region Constructors - - // Called when created from unmanaged code - public MainWindowController (IntPtr handle) : base (handle) - { - Initialize (); - } - - // Called when created directly from a XIB file - [Export ("initWithCoder:")] - public MainWindowController (NSCoder coder) : base (coder) - { - Initialize (); - } - - // Call to load from the XIB/NIB file - public MainWindowController () : base ("MainWindow") - { - Initialize (); - } - - // Shared initialization code - void Initialize () - { - } - - #endregion - - //strongly typed window accessor - public new MainWindow Window { - get { - return (MainWindow)base.Window; - } - } - } -} - diff --git a/Test/Resources/scissors.png b/Test/Resources/scissors.png deleted file mode 100644 index 85f80b593f616145c6210097351749af0faae30b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 690 zcmV;j0!{siP)_0@Jsyvq&1RMSBs~xa`1|_$;BvXZ$eMl5$s^w|{oBOr_3HV2UPU4i zU5I`fFtTQ!^L_CjgR7c`NkLG+p={I(g@Ou&Lb}uGyvWF!ea?dhpSqSoPLfZ8O+n(f zk>BU@>BVAEg~Q>+bULkAv!5_{$uK6Z8OjK<^r!s+L_ z#@5!)A4^NY-R0#0>D>@i@J`dlz6=e$Rq?ob($lkk6L`HhJ*^fb3T`bJHT#^CM?Q6} z|KNqD-D?-url!=K#HYa6Gg-knXY|`mS~@W>eN(EtzP+tBH#W-Su~^{o%*>lzVD z;Gq~WvSy!i^2n#Ib(gn+JFA0(MY`UX4Kdkx@}F18ntjg6BcHm~E%<=ZN#L?@23`S) zyTGF4vJ`ym4SsNf!vf1V5IGH8k~}*LJjyBcoI_{(lNU4%;hvH691@s~Xli?jUw;WO Y0K{B8%8@~yF8}}l07*qoM6N<$g8HpcV*mgE diff --git a/Test/Test.csproj b/Test/Test.csproj deleted file mode 100644 index 5469c1f..0000000 --- a/Test/Test.csproj +++ /dev/null @@ -1,88 +0,0 @@ - - - - Debug - AnyCPU - 10.0.0 - 2.0 - {C7203DAF-8FEF-4F66-9A6B-4657A85F0B5D} - {948B3504-5B70-4649-8FE4-BDE1FB46EC69};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - Exe - Test - Resources - Test - - - True - full - False - bin\Debug - DEBUG; - prompt - 4 - False - False - False - False - False - Mac Developer - - - none - True - bin\Release - prompt - 4 - False - False - Full - False - False - False - Mac Developer - - - none - True - bin\AppStore - prompt - 4 - 3rd Party Mac Developer Installer - True - Full - True - False - True - True - 3rd Party Mac Developer Application - - - - - - - - - - - - - - MainWindow.cs - - - - - AppDelegate.cs - - - - - - - - - - - - \ No newline at end of file