diff dstep/appkit/NSCollectionView.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 b9de51448c6b
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dstep/appkit/NSCollectionView.d	Sun Jan 03 22:06:11 2010 +0100
@@ -0,0 +1,198 @@
+/**
+ * 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.NSCollectionView;
+
+import dstep.appkit.NSAnimation;
+import dstep.appkit.NSView;
+import dstep.foundation.NSArray;
+import dstep.foundation.NSCoder;
+import dstep.foundation.NSData;
+import dstep.foundation.NSGeometry;
+import dstep.foundation.NSIndexSet;
+import dstep.foundation.NSObjCRuntime;
+import dstep.foundation.NSObject;
+import dstep.foundation.NSSet;
+import dstep.foundation.NSZone;
+import dstep.objc.bridge.Bridge;
+import dstep.objc.objc;
+
+class NSCollectionViewItem : NSObject, INSCopying, INSCoding
+{
+	mixin (ObjcWrap);
+	
+	this (NSCoder aDecoder)
+	{
+		super(typeof(this).alloc.initWithCoder(aDecoder).objcObject);
+	}
+	
+	void encodeWithCoder (NSCoder aCoder)
+	{
+		return invokeObjcSelf!(void, "encodeWithCoder:", NSCoder)(aCoder);
+	}
+	
+	typeof(this) initWithCoder (NSCoder aDecoder)
+	{
+		return invokeObjcSelf!(typeof(this), "initWithCoder:", NSCoder)(aDecoder);
+	}
+	
+	typeof(this) copyWithZone (NSZone* zone)
+	{
+		return invokeObjcSelf!(typeof(this), "copyWithZone:", NSZone*)(zone);
+	}
+
+	NSCollectionView collectionView ()
+	{
+		return invokeObjcSelf!(NSCollectionView, "collectionView");
+	}
+
+	void setRepresentedObject (Object object)
+	{
+		return invokeObjcSelf!(void, "setRepresentedObject:", Object)(object);
+	}
+
+	Object representedObject ()
+	{
+		return invokeObjcSelf!(Object, "representedObject");
+	}
+
+	void setView (NSView view)
+	{
+		return invokeObjcSelf!(void, "setView:", NSView)(view);
+	}
+
+	NSView view ()
+	{
+		return invokeObjcSelf!(NSView, "view");
+	}
+
+	void setSelected (bool flag)
+	{
+		return invokeObjcSelf!(void, "setSelected:", bool)(flag);
+	}
+
+	bool isSelected ()
+	{
+		return invokeObjcSelf!(bool, "isSelected");
+	}
+
+}
+
+class NSCollectionView : NSView
+{
+	mixin (ObjcWrap);
+
+	bool isFirstResponder ()
+	{
+		return invokeObjcSelf!(bool, "isFirstResponder");
+	}
+
+	void setContent (NSArray content)
+	{
+		return invokeObjcSelf!(void, "setContent:", NSArray)(content);
+	}
+
+	NSArray content ()
+	{
+		return invokeObjcSelf!(NSArray, "content");
+	}
+
+	void setSelectable (bool flag)
+	{
+		return invokeObjcSelf!(void, "setSelectable:", bool)(flag);
+	}
+
+	bool isSelectable ()
+	{
+		return invokeObjcSelf!(bool, "isSelectable");
+	}
+
+	void setAllowsMultipleSelection (bool flag)
+	{
+		return invokeObjcSelf!(void, "setAllowsMultipleSelection:", bool)(flag);
+	}
+
+	bool allowsMultipleSelection ()
+	{
+		return invokeObjcSelf!(bool, "allowsMultipleSelection");
+	}
+
+	void setSelectionIndexes (NSIndexSet indexes)
+	{
+		return invokeObjcSelf!(void, "setSelectionIndexes:", NSIndexSet)(indexes);
+	}
+
+	NSIndexSet selectionIndexes ()
+	{
+		return invokeObjcSelf!(NSIndexSet, "selectionIndexes");
+	}
+
+	NSCollectionViewItem newItemForRepresentedObject (Object object)
+	{
+		return invokeObjcSelf!(NSCollectionViewItem, "newItemForRepresentedObject:", Object)(object);
+	}
+
+	void setItemPrototype (NSCollectionViewItem prototype)
+	{
+		return invokeObjcSelf!(void, "setItemPrototype:", NSCollectionViewItem)(prototype);
+	}
+
+	NSCollectionViewItem itemPrototype ()
+	{
+		return invokeObjcSelf!(NSCollectionViewItem, "itemPrototype");
+	}
+
+	void setMaxNumberOfRows (NSUInteger number)
+	{
+		return invokeObjcSelf!(void, "setMaxNumberOfRows:", NSUInteger)(number);
+	}
+
+	NSUInteger maxNumberOfRows ()
+	{
+		return invokeObjcSelf!(NSUInteger, "maxNumberOfRows");
+	}
+
+	void setMaxNumberOfColumns (NSUInteger number)
+	{
+		return invokeObjcSelf!(void, "setMaxNumberOfColumns:", NSUInteger)(number);
+	}
+
+	NSUInteger maxNumberOfColumns ()
+	{
+		return invokeObjcSelf!(NSUInteger, "maxNumberOfColumns");
+	}
+
+	void setMinItemSize (NSSize size)
+	{
+		return invokeObjcSelf!(void, "setMinItemSize:", NSSize)(size);
+	}
+
+	NSSize minItemSize ()
+	{
+		return invokeObjcSelf!(NSSize, "minItemSize");
+	}
+
+	void setMaxItemSize (NSSize size)
+	{
+		return invokeObjcSelf!(void, "setMaxItemSize:", NSSize)(size);
+	}
+
+	NSSize maxItemSize ()
+	{
+		return invokeObjcSelf!(NSSize, "maxItemSize");
+	}
+
+	void setBackgroundColors (NSArray colors)
+	{
+		return invokeObjcSelf!(void, "setBackgroundColors:", NSArray)(colors);
+	}
+
+	NSArray backgroundColors ()
+	{
+		return invokeObjcSelf!(NSArray, "backgroundColors");
+	}
+}
+