Mercurial > projects > dwt-mac
comparison dwt/internal/cocoa/NSTreeNode.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 |
---|---|
34 super(id); | 34 super(id); |
35 } | 35 } |
36 | 36 |
37 public NSArray childNodes () | 37 public NSArray childNodes () |
38 { | 38 { |
39 objc.id result = OS.objc_msgSend(this.id, OS.sel_childNodes); | 39 objc.id result = OS.objc_msgSend(this.id_, OS.sel_childNodes); |
40 return result !is null ? new NSArray(result) : null; | 40 return result !is null ? new NSArray(result) : null; |
41 } | 41 } |
42 | 42 |
43 public NSTreeNode descendantNodeAtIndexPath (NSIndexPath indexPath) | 43 public NSTreeNode descendantNodeAtIndexPath (NSIndexPath indexPath) |
44 { | 44 { |
45 objc.id result = OS.objc_msgSend(this.id, OS.sel_descendantNodeAtIndexPath_1, indexPath !is null ? indexPath.id : null); | 45 objc.id result = OS.objc_msgSend(this.id_, OS.sel_descendantNodeAtIndexPath_1, indexPath !is null ? indexPath.id_ : null); |
46 return result is this.id ? this : (result !is null ? new NSTreeNode(result) : null); | 46 return result is this.id_ ? this : (result !is null ? new NSTreeNode(result) : null); |
47 } | 47 } |
48 | 48 |
49 public NSIndexPath indexPath () | 49 public NSIndexPath indexPath () |
50 { | 50 { |
51 objc.id result = OS.objc_msgSend(this.id, OS.sel_indexPath); | 51 objc.id result = OS.objc_msgSend(this.id_, OS.sel_indexPath); |
52 return result !is null ? new NSIndexPath(result) : null; | 52 return result !is null ? new NSIndexPath(result) : null; |
53 } | 53 } |
54 | 54 |
55 public id initWithRepresentedObject (id modelObject) | 55 public id initWithRepresentedObject (id modelObject) |
56 { | 56 { |
57 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithRepresentedObject_1, modelObject !is null ? modelObject.id : null); | 57 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithRepresentedObject_1, modelObject !is null ? modelObject.id_ : null); |
58 return result !is null ? new id(result) : null; | 58 return result !is null ? new id(result) : null; |
59 } | 59 } |
60 | 60 |
61 public bool isLeaf () | 61 public bool isLeaf () |
62 { | 62 { |
63 return OS.objc_msgSend(this.id, OS.sel_isLeaf) !is null; | 63 return OS.objc_msgSend(this.id_, OS.sel_isLeaf) !is null; |
64 } | 64 } |
65 | 65 |
66 public NSMutableArray mutableChildNodes () | 66 public NSMutableArray mutableChildNodes () |
67 { | 67 { |
68 objc.id result = OS.objc_msgSend(this.id, OS.sel_mutableChildNodes); | 68 objc.id result = OS.objc_msgSend(this.id_, OS.sel_mutableChildNodes); |
69 return result !is null ? new NSMutableArray(result) : null; | 69 return result !is null ? new NSMutableArray(result) : null; |
70 } | 70 } |
71 | 71 |
72 public NSTreeNode parentNode () | 72 public NSTreeNode parentNode () |
73 { | 73 { |
74 objc.id result = OS.objc_msgSend(this.id, OS.sel_parentNode); | 74 objc.id result = OS.objc_msgSend(this.id_, OS.sel_parentNode); |
75 return result is this.id ? this : (result !is null ? new NSTreeNode(result) : null); | 75 return result is this.id_ ? this : (result !is null ? new NSTreeNode(result) : null); |
76 } | 76 } |
77 | 77 |
78 public id representedObject () | 78 public id representedObject () |
79 { | 79 { |
80 objc.id result = OS.objc_msgSend(this.id, OS.sel_representedObject); | 80 objc.id result = OS.objc_msgSend(this.id_, OS.sel_representedObject); |
81 return result !is null ? new id(result) : null; | 81 return result !is null ? new id(result) : null; |
82 } | 82 } |
83 | 83 |
84 public void sortWithSortDescriptors (NSArray sortDescriptors, bool recursively) | 84 public void sortWithSortDescriptors (NSArray sortDescriptors, bool recursively) |
85 { | 85 { |
86 OS.objc_msgSend(this.id, OS.sel_sortWithSortDescriptors_1recursively_1, sortDescriptors !is null ? sortDescriptors.id : null, recursively); | 86 OS.objc_msgSend(this.id_, OS.sel_sortWithSortDescriptors_1recursively_1, sortDescriptors !is null ? sortDescriptors.id_ : null, recursively); |
87 } | 87 } |
88 | 88 |
89 public static id treeNodeWithRepresentedObject (id modelObject) | 89 public static id treeNodeWithRepresentedObject (id modelObject) |
90 { | 90 { |
91 objc.id result = OS.objc_msgSend(OS.class_NSTreeNode, OS.sel_treeNodeWithRepresentedObject_1, modelObject !is null ? modelObject.id : null); | 91 objc.id result = OS.objc_msgSend(OS.class_NSTreeNode, OS.sel_treeNodeWithRepresentedObject_1, modelObject !is null ? modelObject.id_ : null); |
92 return result !is null ? new id(result) : null; | 92 return result !is null ? new id(result) : null; |
93 } | 93 } |
94 | 94 |
95 } | 95 } |