Mercurial > projects > dwt-mac
comparison dwt/internal/cocoa/NSTextField.d @ 1:8b48be5454ce
The internal cocoa classes compile now
author | Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com> |
---|---|
date | Tue, 19 Aug 2008 17:35:17 +0200 |
parents | 380af2bdd8e5 |
children | f565d3a95c0a |
comparison
equal
deleted
inserted
replaced
0:380af2bdd8e5 | 1:8b48be5454ce |
---|---|
36 super(id); | 36 super(id); |
37 } | 37 } |
38 | 38 |
39 public bool acceptsFirstResponder () | 39 public bool acceptsFirstResponder () |
40 { | 40 { |
41 return OS.objc_msgSend(this.id, OS.sel_acceptsFirstResponder) !is null; | 41 return OS.objc_msgSend(this.id_, OS.sel_acceptsFirstResponder) !is null; |
42 } | 42 } |
43 | 43 |
44 public bool allowsEditingTextAttributes () | 44 public bool allowsEditingTextAttributes () |
45 { | 45 { |
46 return OS.objc_msgSend(this.id, OS.sel_allowsEditingTextAttributes) !is null; | 46 return OS.objc_msgSend(this.id_, OS.sel_allowsEditingTextAttributes) !is null; |
47 } | 47 } |
48 | 48 |
49 public NSColor backgroundColor () | 49 public NSColor backgroundColor () |
50 { | 50 { |
51 objc.id result = OS.objc_msgSend(this.id, OS.sel_backgroundColor); | 51 objc.id result = OS.objc_msgSend(this.id_, OS.sel_backgroundColor); |
52 return result !is null ? new NSColor(result) : null; | 52 return result !is null ? new NSColor(result) : null; |
53 } | 53 } |
54 | 54 |
55 public NSTextFieldBezelStyl bezelStyle () | 55 public NSTextFieldBezelStyle bezelStyle () |
56 { | 56 { |
57 return cast(NSTextFieldBezelStyle) OS.objc_msgSend(this.id, OS.sel_bezelStyle); | 57 return cast(NSTextFieldBezelStyle) OS.objc_msgSend(this.id_, OS.sel_bezelStyle); |
58 } | 58 } |
59 | 59 |
60 public id delegatee () | 60 public id delegatee () |
61 { | 61 { |
62 objc.id result = OS.objc_msgSend(this.id, OS.sel_delegate); | 62 objc.id result = OS.objc_msgSend(this.id_, OS.sel_delegate); |
63 return result !is null ? new id(result) : null; | 63 return result !is null ? new id(result) : null; |
64 } | 64 } |
65 | 65 |
66 public bool drawsBackground () | 66 public bool drawsBackground () |
67 { | 67 { |
68 return OS.objc_msgSend(this.id, OS.sel_drawsBackground) !is null; | 68 return OS.objc_msgSend(this.id_, OS.sel_drawsBackground) !is null; |
69 } | 69 } |
70 | 70 |
71 public bool importsGraphics () | 71 public bool importsGraphics () |
72 { | 72 { |
73 return OS.objc_msgSend(this.id, OS.sel_importsGraphics) !is null; | 73 return OS.objc_msgSend(this.id_, OS.sel_importsGraphics) !is null; |
74 } | 74 } |
75 | 75 |
76 public bool isBezeled () | 76 public bool isBezeled () |
77 { | 77 { |
78 return OS.objc_msgSend(this.id, OS.sel_isBezeled) !is null; | 78 return OS.objc_msgSend(this.id_, OS.sel_isBezeled) !is null; |
79 } | 79 } |
80 | 80 |
81 public bool isBordered () | 81 public bool isBordered () |
82 { | 82 { |
83 return OS.objc_msgSend(this.id, OS.sel_isBordered) !is null; | 83 return OS.objc_msgSend(this.id_, OS.sel_isBordered) !is null; |
84 } | 84 } |
85 | 85 |
86 public bool isEditable () | 86 public bool isEditable () |
87 { | 87 { |
88 return OS.objc_msgSend(this.id, OS.sel_isEditable) !is null; | 88 return OS.objc_msgSend(this.id_, OS.sel_isEditable) !is null; |
89 } | 89 } |
90 | 90 |
91 public bool isSelectable () | 91 public bool isSelectable () |
92 { | 92 { |
93 return OS.objc_msgSend(this.id, OS.sel_isSelectable) !is null; | 93 return OS.objc_msgSend(this.id_, OS.sel_isSelectable) !is null; |
94 } | 94 } |
95 | 95 |
96 public void selectText (id sender) | 96 public void selectText (id sender) |
97 { | 97 { |
98 OS.objc_msgSend(this.id, OS.sel_selectText_1, sender !is null ? sender.id : null); | 98 OS.objc_msgSend(this.id_, OS.sel_selectText_1, sender !is null ? sender.id_ : null); |
99 } | 99 } |
100 | 100 |
101 public void setAllowsEditingTextAttributes (bool flag) | 101 public void setAllowsEditingTextAttributes (bool flag) |
102 { | 102 { |
103 OS.objc_msgSend(this.id, OS.sel_setAllowsEditingTextAttributes_1, flag); | 103 OS.objc_msgSend(this.id_, OS.sel_setAllowsEditingTextAttributes_1, flag); |
104 } | 104 } |
105 | 105 |
106 public void setBackgroundColor (NSColor color) | 106 public void setBackgroundColor (NSColor color) |
107 { | 107 { |
108 OS.objc_msgSend(this.id, OS.sel_setBackgroundColor_1, color !is null ? color.id : null); | 108 OS.objc_msgSend(this.id_, OS.sel_setBackgroundColor_1, color !is null ? color.id_ : null); |
109 } | 109 } |
110 | 110 |
111 public void setBezelStyle (NSTextFieldBezelStyle style) | 111 public void setBezelStyle (NSTextFieldBezelStyle style) |
112 { | 112 { |
113 OS.objc_msgSend(this.id, OS.sel_setBezelStyle_1, style); | 113 OS.objc_msgSend(this.id_, OS.sel_setBezelStyle_1, style); |
114 } | 114 } |
115 | 115 |
116 public void setBezeled (bool flag) | 116 public void setBezeled (bool flag) |
117 { | 117 { |
118 OS.objc_msgSend(this.id, OS.sel_setBezeled_1, flag); | 118 OS.objc_msgSend(this.id_, OS.sel_setBezeled_1, flag); |
119 } | 119 } |
120 | 120 |
121 public void setBordered (bool flag) | 121 public void setBordered (bool flag) |
122 { | 122 { |
123 OS.objc_msgSend(this.id, OS.sel_setBordered_1, flag); | 123 OS.objc_msgSend(this.id_, OS.sel_setBordered_1, flag); |
124 } | 124 } |
125 | 125 |
126 public void setDelegate (id anObject) | 126 public void setDelegate (id anObject) |
127 { | 127 { |
128 OS.objc_msgSend(this.id, OS.sel_setDelegate_1, anObject !is null ? anObject.id : null); | 128 OS.objc_msgSend(this.id_, OS.sel_setDelegate_1, anObject !is null ? anObject.id_ : null); |
129 } | 129 } |
130 | 130 |
131 public void setDrawsBackground (bool flag) | 131 public void setDrawsBackground (bool flag) |
132 { | 132 { |
133 OS.objc_msgSend(this.id, OS.sel_setDrawsBackground_1, flag); | 133 OS.objc_msgSend(this.id_, OS.sel_setDrawsBackground_1, flag); |
134 } | 134 } |
135 | 135 |
136 public void setEditable (bool flag) | 136 public void setEditable (bool flag) |
137 { | 137 { |
138 OS.objc_msgSend(this.id, OS.sel_setEditable_1, flag); | 138 OS.objc_msgSend(this.id_, OS.sel_setEditable_1, flag); |
139 } | 139 } |
140 | 140 |
141 public void setImportsGraphics (bool flag) | 141 public void setImportsGraphics (bool flag) |
142 { | 142 { |
143 OS.objc_msgSend(this.id, OS.sel_setImportsGraphics_1, flag); | 143 OS.objc_msgSend(this.id_, OS.sel_setImportsGraphics_1, flag); |
144 } | 144 } |
145 | 145 |
146 public void setSelectable (bool flag) | 146 public void setSelectable (bool flag) |
147 { | 147 { |
148 OS.objc_msgSend(this.id, OS.sel_setSelectable_1, flag); | 148 OS.objc_msgSend(this.id_, OS.sel_setSelectable_1, flag); |
149 } | 149 } |
150 | 150 |
151 public void setTextColor (NSColor color) | 151 public void setTextColor (NSColor color) |
152 { | 152 { |
153 OS.objc_msgSend(this.id, OS.sel_setTextColor_1, color !is null ? color.id : null); | 153 OS.objc_msgSend(this.id_, OS.sel_setTextColor_1, color !is null ? color.id_ : null); |
154 } | 154 } |
155 | 155 |
156 public void setTitleWithMnemonic (NSString stringWithAmpersand) | 156 public void setTitleWithMnemonic (NSString stringWithAmpersand) |
157 { | 157 { |
158 OS.objc_msgSend(this.id, OS.sel_setTitleWithMnemonic_1, stringWithAmpersand !is null ? stringWithAmpersand.id : null); | 158 OS.objc_msgSend(this.id_, OS.sel_setTitleWithMnemonic_1, stringWithAmpersand !is null ? stringWithAmpersand.id_ : null); |
159 } | 159 } |
160 | 160 |
161 public NSColor textColor () | 161 public NSColor textColor () |
162 { | 162 { |
163 objc.id result = OS.objc_msgSend(this.id, OS.sel_textColor); | 163 objc.id result = OS.objc_msgSend(this.id_, OS.sel_textColor); |
164 return result !is null ? new NSColor(result) : null; | 164 return result !is null ? new NSColor(result) : null; |
165 } | 165 } |
166 | 166 |
167 public void textDidBeginEditing (NSNotification notification) | 167 public void textDidBeginEditing (NSNotification notification) |
168 { | 168 { |
169 OS.objc_msgSend(this.id, OS.sel_textDidBeginEditing_1, notification !is null ? notification.id : null); | 169 OS.objc_msgSend(this.id_, OS.sel_textDidBeginEditing_1, notification !is null ? notification.id_ : null); |
170 } | 170 } |
171 | 171 |
172 public void textDidChange (NSNotification notification) | 172 public void textDidChange (NSNotification notification) |
173 { | 173 { |
174 OS.objc_msgSend(this.id, OS.sel_textDidChange_1, notification !is null ? notification.id : null); | 174 OS.objc_msgSend(this.id_, OS.sel_textDidChange_1, notification !is null ? notification.id_ : null); |
175 } | 175 } |
176 | 176 |
177 public void textDidEndEditing (NSNotification notification) | 177 public void textDidEndEditing (NSNotification notification) |
178 { | 178 { |
179 OS.objc_msgSend(this.id, OS.sel_textDidEndEditing_1, notification !is null ? notification.id : null); | 179 OS.objc_msgSend(this.id_, OS.sel_textDidEndEditing_1, notification !is null ? notification.id_ : null); |
180 } | 180 } |
181 | 181 |
182 public bool textShouldBeginEditing (NSText textObject) | 182 public bool textShouldBeginEditing (NSText textObject) |
183 { | 183 { |
184 return OS.objc_msgSend(this.id, OS.sel_textShouldBeginEditing_1, textObject !is null ? textObject.id : null) !is null; | 184 return OS.objc_msgSend(this.id_, OS.sel_textShouldBeginEditing_1, textObject !is null ? textObject.id_ : null) !is null; |
185 } | 185 } |
186 | 186 |
187 public bool textShouldEndEditing (NSText textObject) | 187 public bool textShouldEndEditing (NSText textObject) |
188 { | 188 { |
189 return OS.objc_msgSend(this.id, OS.sel_textShouldEndEditing_1, textObject !is null ? textObject.id : null) !is null; | 189 return OS.objc_msgSend(this.id_, OS.sel_textShouldEndEditing_1, textObject !is null ? textObject.id_ : null) !is null; |
190 } | 190 } |
191 | 191 |
192 } | 192 } |