Mercurial > projects > dwt-mac
comparison dwt/internal/cocoa/NSTreeController.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 |
---|---|
35 super(id); | 35 super(id); |
36 } | 36 } |
37 | 37 |
38 public void add (id sender) | 38 public void add (id sender) |
39 { | 39 { |
40 OS.objc_msgSend(this.id, OS.sel_add_1, sender !is null ? sender.id : null); | 40 OS.objc_msgSend(this.id_, OS.sel_add_1, sender !is null ? sender.id_ : null); |
41 } | 41 } |
42 | 42 |
43 public void addChild (id sender) | 43 public void addChild (id sender) |
44 { | 44 { |
45 OS.objc_msgSend(this.id, OS.sel_addChild_1, sender !is null ? sender.id : null); | 45 OS.objc_msgSend(this.id_, OS.sel_addChild_1, sender !is null ? sender.id_ : null); |
46 } | 46 } |
47 | 47 |
48 public bool addSelectionIndexPaths (NSArray indexPaths) | 48 public bool addSelectionIndexPaths (NSArray indexPaths) |
49 { | 49 { |
50 return OS.objc_msgSend(this.id, OS.sel_addSelectionIndexPaths_1, indexPaths !is null ? indexPaths.id : null) !is null; | 50 return OS.objc_msgSend(this.id_, OS.sel_addSelectionIndexPaths_1, indexPaths !is null ? indexPaths.id_ : null) !is null; |
51 } | 51 } |
52 | 52 |
53 public bool alwaysUsesMultipleValuesMarker () | 53 public bool alwaysUsesMultipleValuesMarker () |
54 { | 54 { |
55 return OS.objc_msgSend(this.id, OS.sel_alwaysUsesMultipleValuesMarker) !is null; | 55 return OS.objc_msgSend(this.id_, OS.sel_alwaysUsesMultipleValuesMarker) !is null; |
56 } | 56 } |
57 | 57 |
58 public id arrangedObjects () | 58 public id arrangedObjects () |
59 { | 59 { |
60 objc.id result = OS.objc_msgSend(this.id, OS.sel_arrangedObjects); | 60 objc.id result = OS.objc_msgSend(this.id_, OS.sel_arrangedObjects); |
61 return result !is null ? new id(result) : null; | 61 return result !is null ? new id(result) : null; |
62 } | 62 } |
63 | 63 |
64 public bool avoidsEmptySelection () | 64 public bool avoidsEmptySelection () |
65 { | 65 { |
66 return OS.objc_msgSend(this.id, OS.sel_avoidsEmptySelection) !is null; | 66 return OS.objc_msgSend(this.id_, OS.sel_avoidsEmptySelection) !is null; |
67 } | 67 } |
68 | 68 |
69 public bool canAddChild () | 69 public bool canAddChild () |
70 { | 70 { |
71 return OS.objc_msgSend(this.id, OS.sel_canAddChild) !is null; | 71 return OS.objc_msgSend(this.id_, OS.sel_canAddChild) !is null; |
72 } | 72 } |
73 | 73 |
74 public bool canInsert () | 74 public bool canInsert () |
75 { | 75 { |
76 return OS.objc_msgSend(this.id, OS.sel_canInsert) !is null; | 76 return OS.objc_msgSend(this.id_, OS.sel_canInsert) !is null; |
77 } | 77 } |
78 | 78 |
79 public bool canInsertChild () | 79 public bool canInsertChild () |
80 { | 80 { |
81 return OS.objc_msgSend(this.id, OS.sel_canInsertChild) !is null; | 81 return OS.objc_msgSend(this.id_, OS.sel_canInsertChild) !is null; |
82 } | 82 } |
83 | 83 |
84 public NSString childrenKeyPath () | 84 public NSString childrenKeyPath () |
85 { | 85 { |
86 objc.id result = OS.objc_msgSend(this.id, OS.sel_childrenKeyPath); | 86 objc.id result = OS.objc_msgSend(this.id_, OS.sel_childrenKeyPath); |
87 return result !is null ? new NSString(result) : null; | 87 return result !is null ? new NSString(result) : null; |
88 } | 88 } |
89 | 89 |
90 public NSString childrenKeyPathForNode (NSTreeNode node) | 90 public NSString childrenKeyPathForNode (NSTreeNode node) |
91 { | 91 { |
92 objc.id result = OS.objc_msgSend(this.id, OS.sel_childrenKeyPathForNode_1, node !is null ? node.id : null); | 92 objc.id result = OS.objc_msgSend(this.id_, OS.sel_childrenKeyPathForNode_1, node !is null ? node.id_ : null); |
93 return result !is null ? new NSString(result) : null; | 93 return result !is null ? new NSString(result) : null; |
94 } | 94 } |
95 | 95 |
96 public id content () | 96 public id content () |
97 { | 97 { |
98 objc.id result = OS.objc_msgSend(this.id, OS.sel_content); | 98 objc.id result = OS.objc_msgSend(this.id_, OS.sel_content); |
99 return result !is null ? new id(result) : null; | 99 return result !is null ? new id(result) : null; |
100 } | 100 } |
101 | 101 |
102 public NSString countKeyPath () | 102 public NSString countKeyPath () |
103 { | 103 { |
104 objc.id result = OS.objc_msgSend(this.id, OS.sel_countKeyPath); | 104 objc.id result = OS.objc_msgSend(this.id_, OS.sel_countKeyPath); |
105 return result !is null ? new NSString(result) : null; | 105 return result !is null ? new NSString(result) : null; |
106 } | 106 } |
107 | 107 |
108 public NSString countKeyPathForNode (NSTreeNode node) | 108 public NSString countKeyPathForNode (NSTreeNode node) |
109 { | 109 { |
110 objc.id result = OS.objc_msgSend(this.id, OS.sel_countKeyPathForNode_1, node !is null ? node.id : null); | 110 objc.id result = OS.objc_msgSend(this.id_, OS.sel_countKeyPathForNode_1, node !is null ? node.id_ : null); |
111 return result !is null ? new NSString(result) : null; | 111 return result !is null ? new NSString(result) : null; |
112 } | 112 } |
113 | 113 |
114 public void insert (id sender) | 114 public void insert (id sender) |
115 { | 115 { |
116 OS.objc_msgSend(this.id, OS.sel_insert_1, sender !is null ? sender.id : null); | 116 OS.objc_msgSend(this.id_, OS.sel_insert_1, sender !is null ? sender.id_ : null); |
117 } | 117 } |
118 | 118 |
119 public void insertChild (id sender) | 119 public void insertChild (id sender) |
120 { | 120 { |
121 OS.objc_msgSend(this.id, OS.sel_insertChild_1, sender !is null ? sender.id : null); | 121 OS.objc_msgSend(this.id_, OS.sel_insertChild_1, sender !is null ? sender.id_ : null); |
122 } | 122 } |
123 | 123 |
124 public void insertObject (id object, NSIndexPath indexPath) | 124 public void insertObject (id object, NSIndexPath indexPath) |
125 { | 125 { |
126 OS.objc_msgSend(this.id, OS.sel_insertObject_1atArrangedObjectIndexPath_1, object !is null ? object.id : null, | 126 OS.objc_msgSend(this.id_, OS.sel_insertObject_1atArrangedObjectIndexPath_1, object !is null ? object.id_ : null, |
127 indexPath !is null ? indexPath.id : null); | 127 indexPath !is null ? indexPath.id_ : null); |
128 } | 128 } |
129 | 129 |
130 public void insertObjects (NSArray objects, NSArray indexPaths) | 130 public void insertObjects (NSArray objects, NSArray indexPaths) |
131 { | 131 { |
132 OS.objc_msgSend(this.id, OS.sel_insertObjects_1atArrangedObjectIndexPaths_1, objects !is null ? objects.id : null, | 132 OS.objc_msgSend(this.id_, OS.sel_insertObjects_1atArrangedObjectIndexPaths_1, objects !is null ? objects.id_ : null, |
133 indexPaths !is null ? indexPaths.id : null); | 133 indexPaths !is null ? indexPaths.id_ : null); |
134 } | 134 } |
135 | 135 |
136 public NSString leafKeyPath () | 136 public NSString leafKeyPath () |
137 { | 137 { |
138 objc.id result = OS.objc_msgSend(this.id, OS.sel_leafKeyPath); | 138 objc.id result = OS.objc_msgSend(this.id_, OS.sel_leafKeyPath); |
139 return result !is null ? new NSString(result) : null; | 139 return result !is null ? new NSString(result) : null; |
140 } | 140 } |
141 | 141 |
142 public NSString leafKeyPathForNode (NSTreeNode node) | 142 public NSString leafKeyPathForNode (NSTreeNode node) |
143 { | 143 { |
144 objc.id result = OS.objc_msgSend(this.id, OS.sel_leafKeyPathForNode_1, node !is null ? node.id : null); | 144 objc.id result = OS.objc_msgSend(this.id_, OS.sel_leafKeyPathForNode_1, node !is null ? node.id_ : null); |
145 return result !is null ? new NSString(result) : null; | 145 return result !is null ? new NSString(result) : null; |
146 } | 146 } |
147 | 147 |
148 public void moveNode (NSTreeNode node, NSIndexPath indexPath) | 148 public void moveNode (NSTreeNode node, NSIndexPath indexPath) |
149 { | 149 { |
150 OS.objc_msgSend(this.id, OS.sel_moveNode_1toIndexPath_1, node !is null ? node.id : null, indexPath !is null ? indexPath.id : null); | 150 OS.objc_msgSend(this.id_, OS.sel_moveNode_1toIndexPath_1, node !is null ? node.id_ : null, indexPath !is null ? indexPath.id_ : null); |
151 } | 151 } |
152 | 152 |
153 public void moveNodes (NSArray nodes, NSIndexPath startingIndexPath) | 153 public void moveNodes (NSArray nodes, NSIndexPath startingIndexPath) |
154 { | 154 { |
155 OS.objc_msgSend(this.id, OS.sel_moveNodes_1toIndexPath_1, nodes !is null ? nodes.id : null, | 155 OS.objc_msgSend(this.id_, OS.sel_moveNodes_1toIndexPath_1, nodes !is null ? nodes.id_ : null, |
156 startingIndexPath !is null ? startingIndexPath.id : null); | 156 startingIndexPath !is null ? startingIndexPath.id_ : null); |
157 } | 157 } |
158 | 158 |
159 public bool preservesSelection () | 159 public bool preservesSelection () |
160 { | 160 { |
161 return OS.objc_msgSend(this.id, OS.sel_preservesSelection) !is null; | 161 return OS.objc_msgSend(this.id_, OS.sel_preservesSelection) !is null; |
162 } | 162 } |
163 | 163 |
164 public void rearrangeObjects () | 164 public void rearrangeObjects () |
165 { | 165 { |
166 OS.objc_msgSend(this.id, OS.sel_rearrangeObjects); | 166 OS.objc_msgSend(this.id_, OS.sel_rearrangeObjects); |
167 } | 167 } |
168 | 168 |
169 public void remove (id sender) | 169 public void remove (id sender) |
170 { | 170 { |
171 OS.objc_msgSend(this.id, OS.sel_remove_1, sender !is null ? sender.id : null); | 171 OS.objc_msgSend(this.id_, OS.sel_remove_1, sender !is null ? sender.id_ : null); |
172 } | 172 } |
173 | 173 |
174 public void removeObjectAtArrangedObjectIndexPath (NSIndexPath indexPath) | 174 public void removeObjectAtArrangedObjectIndexPath (NSIndexPath indexPath) |
175 { | 175 { |
176 OS.objc_msgSend(this.id, OS.sel_removeObjectAtArrangedObjectIndexPath_1, indexPath !is null ? indexPath.id : null); | 176 OS.objc_msgSend(this.id_, OS.sel_removeObjectAtArrangedObjectIndexPath_1, indexPath !is null ? indexPath.id_ : null); |
177 } | 177 } |
178 | 178 |
179 public void removeObjectsAtArrangedObjectIndexPaths (NSArray indexPaths) | 179 public void removeObjectsAtArrangedObjectIndexPaths (NSArray indexPaths) |
180 { | 180 { |
181 OS.objc_msgSend(this.id, OS.sel_removeObjectsAtArrangedObjectIndexPaths_1, indexPaths !is null ? indexPaths.id : null); | 181 OS.objc_msgSend(this.id_, OS.sel_removeObjectsAtArrangedObjectIndexPaths_1, indexPaths !is null ? indexPaths.id_ : null); |
182 } | 182 } |
183 | 183 |
184 public bool removeSelectionIndexPaths (NSArray indexPaths) | 184 public bool removeSelectionIndexPaths (NSArray indexPaths) |
185 { | 185 { |
186 return OS.objc_msgSend(this.id, OS.sel_removeSelectionIndexPaths_1, indexPaths !is null ? indexPaths.id : null) !is null; | 186 return OS.objc_msgSend(this.id_, OS.sel_removeSelectionIndexPaths_1, indexPaths !is null ? indexPaths.id_ : null) !is null; |
187 } | 187 } |
188 | 188 |
189 public NSArray selectedNodes () | 189 public NSArray selectedNodes () |
190 { | 190 { |
191 objc.id result = OS.objc_msgSend(this.id, OS.sel_selectedNodes); | 191 objc.id result = OS.objc_msgSend(this.id_, OS.sel_selectedNodes); |
192 return result !is null ? new NSArray(result) : null; | 192 return result !is null ? new NSArray(result) : null; |
193 } | 193 } |
194 | 194 |
195 public NSArray selectedObjects () | 195 public NSArray selectedObjects () |
196 { | 196 { |
197 objc.id result = OS.objc_msgSend(this.id, OS.sel_selectedObjects); | 197 objc.id result = OS.objc_msgSend(this.id_, OS.sel_selectedObjects); |
198 return result !is null ? new NSArray(result) : null; | 198 return result !is null ? new NSArray(result) : null; |
199 } | 199 } |
200 | 200 |
201 public NSIndexPath selectionIndexPath () | 201 public NSIndexPath selectionIndexPath () |
202 { | 202 { |
203 objc.id result = OS.objc_msgSend(this.id, OS.sel_selectionIndexPath); | 203 objc.id result = OS.objc_msgSend(this.id_, OS.sel_selectionIndexPath); |
204 return result !is null ? new NSIndexPath(result) : null; | 204 return result !is null ? new NSIndexPath(result) : null; |
205 } | 205 } |
206 | 206 |
207 public NSArray selectionIndexPaths () | 207 public NSArray selectionIndexPaths () |
208 { | 208 { |
209 objc.id result = OS.objc_msgSend(this.id, OS.sel_selectionIndexPaths); | 209 objc.id result = OS.objc_msgSend(this.id_, OS.sel_selectionIndexPaths); |
210 return result !is null ? new NSArray(result) : null; | 210 return result !is null ? new NSArray(result) : null; |
211 } | 211 } |
212 | 212 |
213 public bool selectsInsertedObjects () | 213 public bool selectsInsertedObjects () |
214 { | 214 { |
215 return OS.objc_msgSend(this.id, OS.sel_selectsInsertedObjects) !is null; | 215 return OS.objc_msgSend(this.id_, OS.sel_selectsInsertedObjects) !is null; |
216 } | 216 } |
217 | 217 |
218 public void setAlwaysUsesMultipleValuesMarker (bool flag) | 218 public void setAlwaysUsesMultipleValuesMarker (bool flag) |
219 { | 219 { |
220 OS.objc_msgSend(this.id, OS.sel_setAlwaysUsesMultipleValuesMarker_1, flag); | 220 OS.objc_msgSend(this.id_, OS.sel_setAlwaysUsesMultipleValuesMarker_1, flag); |
221 } | 221 } |
222 | 222 |
223 public void setAvoidsEmptySelection (bool flag) | 223 public void setAvoidsEmptySelection (bool flag) |
224 { | 224 { |
225 OS.objc_msgSend(this.id, OS.sel_setAvoidsEmptySelection_1, flag); | 225 OS.objc_msgSend(this.id_, OS.sel_setAvoidsEmptySelection_1, flag); |
226 } | 226 } |
227 | 227 |
228 public void setChildrenKeyPath (NSString keyPath) | 228 public void setChildrenKeyPath (NSString keyPath) |
229 { | 229 { |
230 OS.objc_msgSend(this.id, OS.sel_setChildrenKeyPath_1, keyPath !is null ? keyPath.id : null); | 230 OS.objc_msgSend(this.id_, OS.sel_setChildrenKeyPath_1, keyPath !is null ? keyPath.id_ : null); |
231 } | 231 } |
232 | 232 |
233 public void setContent (id content) | 233 public void setContent (id content) |
234 { | 234 { |
235 OS.objc_msgSend(this.id, OS.sel_setContent_1, content !is null ? content.id : null); | 235 OS.objc_msgSend(this.id_, OS.sel_setContent_1, content !is null ? content.id_ : null); |
236 } | 236 } |
237 | 237 |
238 public void setCountKeyPath (NSString keyPath) | 238 public void setCountKeyPath (NSString keyPath) |
239 { | 239 { |
240 OS.objc_msgSend(this.id, OS.sel_setCountKeyPath_1, keyPath !is null ? keyPath.id : null); | 240 OS.objc_msgSend(this.id_, OS.sel_setCountKeyPath_1, keyPath !is null ? keyPath.id_ : null); |
241 } | 241 } |
242 | 242 |
243 public void setLeafKeyPath (NSString keyPath) | 243 public void setLeafKeyPath (NSString keyPath) |
244 { | 244 { |
245 OS.objc_msgSend(this.id, OS.sel_setLeafKeyPath_1, keyPath !is null ? keyPath.id : null); | 245 OS.objc_msgSend(this.id_, OS.sel_setLeafKeyPath_1, keyPath !is null ? keyPath.id_ : null); |
246 } | 246 } |
247 | 247 |
248 public void setPreservesSelection (bool flag) | 248 public void setPreservesSelection (bool flag) |
249 { | 249 { |
250 OS.objc_msgSend(this.id, OS.sel_setPreservesSelection_1, flag); | 250 OS.objc_msgSend(this.id_, OS.sel_setPreservesSelection_1, flag); |
251 } | 251 } |
252 | 252 |
253 public bool setSelectionIndexPath (NSIndexPath indexPath) | 253 public bool setSelectionIndexPath (NSIndexPath indexPath) |
254 { | 254 { |
255 return OS.objc_msgSend(this.id, OS.sel_setSelectionIndexPath_1, indexPath !is null ? indexPath.id : null) !is null; | 255 return OS.objc_msgSend(this.id_, OS.sel_setSelectionIndexPath_1, indexPath !is null ? indexPath.id_ : null) !is null; |
256 } | 256 } |
257 | 257 |
258 public bool setSelectionIndexPaths (NSArray indexPaths) | 258 public bool setSelectionIndexPaths (NSArray indexPaths) |
259 { | 259 { |
260 return OS.objc_msgSend(this.id, OS.sel_setSelectionIndexPaths_1, indexPaths !is null ? indexPaths.id : null) !is null; | 260 return OS.objc_msgSend(this.id_, OS.sel_setSelectionIndexPaths_1, indexPaths !is null ? indexPaths.id_ : null) !is null; |
261 } | 261 } |
262 | 262 |
263 public void setSelectsInsertedObjects (bool flag) | 263 public void setSelectsInsertedObjects (bool flag) |
264 { | 264 { |
265 OS.objc_msgSend(this.id, OS.sel_setSelectsInsertedObjects_1, flag); | 265 OS.objc_msgSend(this.id_, OS.sel_setSelectsInsertedObjects_1, flag); |
266 } | 266 } |
267 | 267 |
268 public void setSortDescriptors (NSArray sortDescriptors) | 268 public void setSortDescriptors (NSArray sortDescriptors) |
269 { | 269 { |
270 OS.objc_msgSend(this.id, OS.sel_setSortDescriptors_1, sortDescriptors !is null ? sortDescriptors.id : null); | 270 OS.objc_msgSend(this.id_, OS.sel_setSortDescriptors_1, sortDescriptors !is null ? sortDescriptors.id_ : null); |
271 } | 271 } |
272 | 272 |
273 public NSArray sortDescriptors () | 273 public NSArray sortDescriptors () |
274 { | 274 { |
275 objc.id result = OS.objc_msgSend(this.id, OS.sel_sortDescriptors); | 275 objc.id result = OS.objc_msgSend(this.id_, OS.sel_sortDescriptors); |
276 return result !is null ? new NSArray(result) : null; | 276 return result !is null ? new NSArray(result) : null; |
277 } | 277 } |
278 | 278 |
279 } | 279 } |