comparison 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
comparison
equal deleted inserted replaced
15:7ff919f595d5 16:19885b43130e
1 /**
2 * Copyright: Copyright (c) 2009 Jacob Carlborg.
3 * Authors: Jacob Carlborg
4 * Version: Initial created: Sep 24, 2009
5 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
6 */
7 module dstep.appkit.NSTextFieldCell;
8
9 import dstep.appkit.NSActionCell;
10 import dstep.appkit.NSColor;
11 import dstep.appkit.NSText;
12 import dstep.foundation.NSArray;
13 import dstep.foundation.NSAttributedString;
14 import dstep.foundation.NSObjCRuntime;
15 import dstep.foundation.NSString;
16 import dstep.objc.bridge.Bridge;
17 import dstep.objc.objc;
18
19 typedef NSUInteger NSTextFieldBezelStyle;
20
21 enum
22 {
23 NSTextFieldSquareBezel = 0,
24 NSTextFieldRoundedBezel = 1
25 }
26
27 class NSTextFieldCell : NSActionCell
28 {
29 mixin (ObjcWrap);
30
31 void setBackgroundColor (NSColor color)
32 {
33 return invokeObjcSelf!(void, "setBackgroundColor:", NSColor)(color);
34 }
35
36 NSColor backgroundColor ()
37 {
38 return invokeObjcSelf!(NSColor, "backgroundColor");
39 }
40
41 void setDrawsBackground (bool flag)
42 {
43 return invokeObjcSelf!(void, "setDrawsBackground:", bool)(flag);
44 }
45
46 bool drawsBackground ()
47 {
48 return invokeObjcSelf!(bool, "drawsBackground");
49 }
50
51 void setTextColor (NSColor color)
52 {
53 return invokeObjcSelf!(void, "setTextColor:", NSColor)(color);
54 }
55
56 NSColor textColor ()
57 {
58 return invokeObjcSelf!(NSColor, "textColor");
59 }
60
61 NSText setUpFieldEditorAttributes (NSText textObj)
62 {
63 return invokeObjcSelf!(NSText, "setUpFieldEditorAttributes:", NSText)(textObj);
64 }
65
66 void setBezelStyle (uint style)
67 {
68 return invokeObjcSelf!(void, "setBezelStyle:", uint)(style);
69 }
70
71 uint bezelStyle ()
72 {
73 return invokeObjcSelf!(uint, "bezelStyle");
74 }
75
76 void setPlaceholderString (NSString string)
77 {
78 return invokeObjcSelf!(void, "setPlaceholderString:", NSString)(string);
79 }
80
81 NSString placeholderString ()
82 {
83 return invokeObjcSelf!(NSString, "placeholderString");
84 }
85
86 void setPlaceholderAttributedString (NSAttributedString string)
87 {
88 return invokeObjcSelf!(void, "setPlaceholderAttributedString:", NSAttributedString)(string);
89 }
90
91 NSAttributedString placeholderAttributedString ()
92 {
93 return invokeObjcSelf!(NSAttributedString, "placeholderAttributedString");
94 }
95
96 void setWantsNotificationForMarkedText (bool flag)
97 {
98 return invokeObjcSelf!(void, "setWantsNotificationForMarkedText:", bool)(flag);
99 }
100
101 NSArray allowedInputSourceLocales ()
102 {
103 return invokeObjcSelf!(NSArray, "allowedInputSourceLocales");
104 }
105
106 void setAllowedInputSourceLocales (NSArray localeIdentifiers)
107 {
108 return invokeObjcSelf!(void, "setAllowedInputSourceLocales:", NSArray)(localeIdentifiers);
109 }
110 }
111