Mercurial > projects > dstep
view dstep/appkit/NSTextFieldCell.d @ 25:b9de51448c6b
Added an id constructor. Changed the string mixin to a template mixin. Added support for building as a dynamic library
author | Jacob Carlborg <doob@me.com> |
---|---|
date | Tue, 06 Apr 2010 11:37:27 +0200 |
parents | 19885b43130e |
children |
line wrap: on
line source
/** * 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; this (id object) { super(object); } 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); } }