diff dstep/appkit/NSTextFieldCell.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/NSTextFieldCell.d	Sun Jan 03 22:06:11 2010 +0100
@@ -0,0 +1,111 @@
+/**
+ * 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.NSTextFieldCell;
+
+import dstep.appkit.NSActionCell;
+import dstep.appkit.NSColor;
+import dstep.appkit.NSText;
+import dstep.foundation.NSArray;
+import dstep.foundation.NSAttributedString;
+import dstep.foundation.NSObjCRuntime;
+import dstep.foundation.NSString;
+import dstep.objc.bridge.Bridge;
+import dstep.objc.objc;
+
+typedef NSUInteger NSTextFieldBezelStyle;
+
+enum
+{
+	NSTextFieldSquareBezel = 0,
+	NSTextFieldRoundedBezel = 1
+}
+
+class NSTextFieldCell : NSActionCell
+{
+	mixin (ObjcWrap);
+
+	void setBackgroundColor (NSColor color)
+	{
+		return invokeObjcSelf!(void, "setBackgroundColor:", NSColor)(color);
+	}
+
+	NSColor backgroundColor ()
+	{
+		return invokeObjcSelf!(NSColor, "backgroundColor");
+	}
+
+	void setDrawsBackground (bool flag)
+	{
+		return invokeObjcSelf!(void, "setDrawsBackground:", bool)(flag);
+	}
+
+	bool drawsBackground ()
+	{
+		return invokeObjcSelf!(bool, "drawsBackground");
+	}
+
+	void setTextColor (NSColor color)
+	{
+		return invokeObjcSelf!(void, "setTextColor:", NSColor)(color);
+	}
+
+	NSColor textColor ()
+	{
+		return invokeObjcSelf!(NSColor, "textColor");
+	}
+
+	NSText setUpFieldEditorAttributes (NSText textObj)
+	{
+		return invokeObjcSelf!(NSText, "setUpFieldEditorAttributes:", NSText)(textObj);
+	}
+
+	void setBezelStyle (uint style)
+	{
+		return invokeObjcSelf!(void, "setBezelStyle:", uint)(style);
+	}
+
+	uint bezelStyle ()
+	{
+		return invokeObjcSelf!(uint, "bezelStyle");
+	}
+
+	void setPlaceholderString (NSString string)
+	{
+		return invokeObjcSelf!(void, "setPlaceholderString:", NSString)(string);
+	}
+
+	NSString placeholderString ()
+	{
+		return invokeObjcSelf!(NSString, "placeholderString");
+	}
+
+	void setPlaceholderAttributedString (NSAttributedString string)
+	{
+		return invokeObjcSelf!(void, "setPlaceholderAttributedString:", NSAttributedString)(string);
+	}
+
+	NSAttributedString placeholderAttributedString ()
+	{
+		return invokeObjcSelf!(NSAttributedString, "placeholderAttributedString");
+	}
+
+	void setWantsNotificationForMarkedText (bool flag)
+	{
+		return invokeObjcSelf!(void, "setWantsNotificationForMarkedText:", bool)(flag);
+	}
+
+	NSArray allowedInputSourceLocales ()
+	{
+		return invokeObjcSelf!(NSArray, "allowedInputSourceLocales");
+	}
+
+	void setAllowedInputSourceLocales (NSArray localeIdentifiers)
+	{
+		return invokeObjcSelf!(void, "setAllowedInputSourceLocales:", NSArray)(localeIdentifiers);
+	}
+}
+