diff dstep/appkit/NSDictionaryController.d @ 16:19885b43130e

Huge update, the bridge actually works now
author Jacob Carlborg <doob@me.com>
date Sun, 03 Jan 2010 22:06:11 +0100
parents
children f8a3b67adfcb
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dstep/appkit/NSDictionaryController.d	Sun Jan 03 22:06:11 2010 +0100
@@ -0,0 +1,144 @@
+/**
+ * Copyright: Copyright (c) 2009 Jacob Carlborg.
+ * Authors: Jacob Carlborg
+ * Version: Initial created: Sep 24, 2009 
+ * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
+ */
+module dstep.appkit.NSDictionaryController;
+
+import dstep.appkit.NSArrayController;
+import dstep.foundation.NSArray;
+import dstep.foundation.NSDictionary;
+import dstep.foundation.NSString;
+import dstep.objc.bridge.Bridge;
+import dstep.objc.objc;
+
+class NSDictionaryController : NSArrayController
+{
+	mixin (ObjcWrap);
+
+	Object newObject ()
+	{
+		return invokeObjcSelf!(Object, "newObject");
+	}
+
+	void setInitialKey (NSString key)
+	{
+		return invokeObjcSelf!(void, "setInitialKey:", NSString)(key);
+	}
+
+	NSDictionaryController initialKey ()
+	{
+		id result = invokeObjcSelf!(id, "initialKey");
+		return result is this.objcObject ? this : (result !is null ? new NSDictionaryController(result) : null);
+	}
+
+	this ()
+	{
+		super(NSDictionaryController.alloc.initialKey.objcObject);
+	}
+
+	void setInitialValue (Object value)
+	{
+		return invokeObjcSelf!(void, "setInitialValue:", Object)(value);
+	}
+
+	NSDictionaryController initialValue ()
+	{
+		id result = invokeObjcSelf!(id, "initialValue");
+		return result is this.objcObject ? this : (result !is null ? new NSDictionaryController(result) : null);
+	}
+
+	this ()
+	{
+		super(NSDictionaryController.alloc.initialValue.objcObject);
+	}
+
+	void setIncludedKeys (NSArray keys)
+	{
+		return invokeObjcSelf!(void, "setIncludedKeys:", NSArray)(keys);
+	}
+
+	NSArray includedKeys ()
+	{
+		return invokeObjcSelf!(NSArray, "includedKeys");
+	}
+
+	void setExcludedKeys (NSArray keys)
+	{
+		return invokeObjcSelf!(void, "setExcludedKeys:", NSArray)(keys);
+	}
+
+	NSArray excludedKeys ()
+	{
+		return invokeObjcSelf!(NSArray, "excludedKeys");
+	}
+
+	void setLocalizedKeyDictionary (NSDictionary dictionary)
+	{
+		return invokeObjcSelf!(void, "setLocalizedKeyDictionary:", NSDictionary)(dictionary);
+	}
+
+	NSDictionary localizedKeyDictionary ()
+	{
+		return invokeObjcSelf!(NSDictionary, "localizedKeyDictionary");
+	}
+
+	void setLocalizedKeyTable (NSString stringsFileName)
+	{
+		return invokeObjcSelf!(void, "setLocalizedKeyTable:", NSString)(stringsFileName);
+	}
+
+	NSString localizedKeyTable ()
+	{
+		return invokeObjcSelf!(NSString, "localizedKeyTable");
+	}
+}
+
+const TNSDictionaryControllerKeyValuePair = `
+
+	void setLocalizedKey (NSString localizedKey)
+	{
+		return invokeObjcSelf!(void, "setLocalizedKey:", NSString)(localizedKey);
+	}
+
+	NSString localizedKey ()
+	{
+		return invokeObjcSelf!(NSString, "localizedKey");
+	}
+
+	void setKey (NSString key)
+	{
+		return invokeObjcSelf!(void, "setKey:", NSString)(key);
+	}
+
+	NSString key ()
+	{
+		return invokeObjcSelf!(NSString, "key");
+	}
+
+	void setValue (Object value)
+	{
+		return invokeObjcSelf!(void, "setValue:", Object)(value);
+	}
+
+	Object value ()
+	{
+		return invokeObjcSelf!(Object, "value");
+	}
+
+	bool isExplicitlyIncluded ()
+	{
+		return invokeObjcSelf!(bool, "isExplicitlyIncluded");
+	}
+
+	//mixin ObjcBindMethod!(setLocalizedKey, "setLocalizedKey:");
+	//mixin ObjcBindMethod!(localizedKey, "localizedKey");
+	//mixin ObjcBindMethod!(setKey, "setKey:");
+	//mixin ObjcBindMethod!(key, "key");
+	//mixin ObjcBindMethod!(setValue, "setValue:");
+	//mixin ObjcBindMethod!(value, "value");
+	//mixin ObjcBindMethod!(isExplicitlyIncluded, "isExplicitlyIncluded");
+
+`;
+