comparison dwt/internal/cocoa/NSOutlineView.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
11 * Port to the D Programming language: 11 * Port to the D Programming language:
12 * Jacob Carlborg <jacob.carlborg@gmail.com> 12 * Jacob Carlborg <jacob.carlborg@gmail.com>
13 *******************************************************************************/ 13 *******************************************************************************/
14 module dwt.internal.cocoa.NSOutlineView; 14 module dwt.internal.cocoa.NSOutlineView;
15 15
16
16 import dwt.internal.cocoa.CGFloat; 17 import dwt.internal.cocoa.CGFloat;
18 import dwt.internal.cocoa.id;
17 import dwt.internal.cocoa.NSInteger; 19 import dwt.internal.cocoa.NSInteger;
18 import dwt.internal.cocoa.NSRect; 20 import dwt.internal.cocoa.NSRect;
19 import dwt.internal.cocoa.NSTableColumn; 21 import dwt.internal.cocoa.NSTableColumn;
20 import dwt.internal.cocoa.NSTableView; 22 import dwt.internal.cocoa.NSTableView;
21 import dwt.internal.cocoa.OS; 23 import dwt.internal.cocoa.OS;
34 super(id); 36 super(id);
35 } 37 }
36 38
37 public bool autoresizesOutlineColumn () 39 public bool autoresizesOutlineColumn ()
38 { 40 {
39 return OS.objc_msgSend(this.id, OS.sel_autoresizesOutlineColumn) !is null; 41 return OS.objc_msgSend(this.id_, OS.sel_autoresizesOutlineColumn) !is null;
40 } 42 }
41 43
42 public bool autosaveExpandedItems () 44 public bool autosaveExpandedItems ()
43 { 45 {
44 return OS.objc_msgSend(this.id, OS.sel_autosaveExpandedItems) !is null; 46 return OS.objc_msgSend(this.id_, OS.sel_autosaveExpandedItems) !is null;
45 } 47 }
46 48
47 public void collapseItem_ (id item) 49 public void collapseItem_ (id item)
48 { 50 {
49 OS.objc_msgSend(this.id, OS.sel_collapseItem_1, item !is null ? item.id : null); 51 OS.objc_msgSend(this.id_, OS.sel_collapseItem_1, item !is null ? item.id_ : null);
50 } 52 }
51 53
52 public void collapseItem_collapseChildren_ (id item, bool collapseChildren) 54 public void collapseItem_collapseChildren_ (id item, bool collapseChildren)
53 { 55 {
54 OS.objc_msgSend(this.id, OS.sel_collapseItem_1collapseChildren_1, item !is null ? item.id : null, collapseChildren); 56 OS.objc_msgSend(this.id_, OS.sel_collapseItem_1collapseChildren_1, item !is null ? item.id_ : null, collapseChildren);
55 } 57 }
56 58
57 public void expandItem_ (id item) 59 public void expandItem_ (id item)
58 { 60 {
59 OS.objc_msgSend(this.id, OS.sel_expandItem_1, item !is null ? item.id : null); 61 OS.objc_msgSend(this.id_, OS.sel_expandItem_1, item !is null ? item.id_ : null);
60 } 62 }
61 63
62 public void expandItem_expandChildren_ (id item, bool expandChildren) 64 public void expandItem_expandChildren_ (id item, bool expandChildren)
63 { 65 {
64 OS.objc_msgSend(this.id, OS.sel_expandItem_1expandChildren_1, item !is null ? item.id : null, expandChildren); 66 OS.objc_msgSend(this.id_, OS.sel_expandItem_1expandChildren_1, item !is null ? item.id_ : null, expandChildren);
65 } 67 }
66 68
67 public NSRect frameOfOutlineCellAtRow (NSInteger row) 69 public NSRect frameOfOutlineCellAtRow (NSInteger row)
68 { 70 {
69 NSRect result; 71 NSRect result;
70 OS.objc_msgSend_stret(result, this.id, OS.sel_frameOfOutlineCellAtRow_1, row); 72 OS.objc_msgSend_stret(&result, this.id_, OS.sel_frameOfOutlineCellAtRow_1, row);
71 return result; 73 return result;
72 } 74 }
73 75
74 public bool indentationMarkerFollowsCell () 76 public bool indentationMarkerFollowsCell ()
75 { 77 {
76 return OS.objc_msgSend(this.id, OS.sel_indentationMarkerFollowsCell) !is null; 78 return OS.objc_msgSend(this.id_, OS.sel_indentationMarkerFollowsCell) !is null;
77 } 79 }
78 80
79 public CGFloat indentationPerLevel () 81 public CGFloat indentationPerLevel ()
80 { 82 {
81 return cast(CGFloat) OS.objc_msgSend_fpret(this.id, OS.sel_indentationPerLevel); 83 return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_indentationPerLevel);
82 } 84 }
83 85
84 public bool isExpandable (id item) 86 public bool isExpandable (id item)
85 { 87 {
86 return OS.objc_msgSend(this.id, OS.sel_isExpandable_1, item !is null ? item.id : null) !is null; 88 return OS.objc_msgSend(this.id_, OS.sel_isExpandable_1, item !is null ? item.id_ : null) !is null;
87 } 89 }
88 90
89 public bool isItemExpanded (id item) 91 public bool isItemExpanded (id item)
90 { 92 {
91 return OS.objc_msgSend(this.id, OS.sel_isItemExpanded_1, item !is null ? item.id : null) !is null; 93 return OS.objc_msgSend(this.id_, OS.sel_isItemExpanded_1, item !is null ? item.id_ : null) !is null;
92 } 94 }
93 95
94 public id itemAtRow (NSInteger row) 96 public id itemAtRow (NSInteger row)
95 { 97 {
96 objc.id result = OS.objc_msgSend(this.id, OS.sel_itemAtRow_1, row); 98 objc.id result = OS.objc_msgSend(this.id_, OS.sel_itemAtRow_1, row);
97 return result !is null ? new id(result) : null; 99 return result !is null ? new id(result) : null;
98 } 100 }
99 101
100 public NSInteger levelForItem (id item) 102 public NSInteger levelForItem (id item)
101 { 103 {
102 return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_levelForItem_1, item !is null ? item.id : null); 104 return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_levelForItem_1, item !is null ? item.id_ : null);
103 } 105 }
104 106
105 public NSInteger levelForRow (NSInteger row) 107 public NSInteger levelForRow (NSInteger row)
106 { 108 {
107 return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_levelForRow_1, row); 109 return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_levelForRow_1, row);
108 } 110 }
109 111
110 public NSTableColumn outlineTableColumn () 112 public NSTableColumn outlineTableColumn ()
111 { 113 {
112 objc.id result = OS.objc_msgSend(this.id, OS.sel_outlineTableColumn); 114 objc.id result = OS.objc_msgSend(this.id_, OS.sel_outlineTableColumn);
113 return result !is null ? new NSTableColumn(result) : null; 115 return result !is null ? new NSTableColumn(result) : null;
114 } 116 }
115 117
116 public id parentForItem (id item) 118 public id parentForItem (id item)
117 { 119 {
118 objc.id result = OS.objc_msgSend(this.id, OS.sel_parentForItem_1, item !is null ? item.id : null); 120 objc.id result = OS.objc_msgSend(this.id_, OS.sel_parentForItem_1, item !is null ? item.id_ : null);
119 return result !is null ? new id(result) : null; 121 return result !is null ? new id(result) : null;
120 } 122 }
121 123
122 public void reloadItem_ (id item) 124 public void reloadItem_ (id item)
123 { 125 {
124 OS.objc_msgSend(this.id, OS.sel_reloadItem_1, item !is null ? item.id : null); 126 OS.objc_msgSend(this.id_, OS.sel_reloadItem_1, item !is null ? item.id_ : null);
125 } 127 }
126 128
127 public void reloadItem_reloadChildren_ (id item, bool reloadChildren) 129 public void reloadItem_reloadChildren_ (id item, bool reloadChildren)
128 { 130 {
129 OS.objc_msgSend(this.id, OS.sel_reloadItem_1reloadChildren_1, item !is null ? item.id : null, reloadChildren); 131 OS.objc_msgSend(this.id_, OS.sel_reloadItem_1reloadChildren_1, item !is null ? item.id_ : null, reloadChildren);
130 } 132 }
131 133
132 public NSInteger rowForItem (id item) 134 public NSInteger rowForItem (id item)
133 { 135 {
134 return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_rowForItem_1, item !is null ? item.id : null); 136 return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_rowForItem_1, item !is null ? item.id_ : null);
135 } 137 }
136 138
137 public void setAutoresizesOutlineColumn (bool resize) 139 public void setAutoresizesOutlineColumn (bool resize)
138 { 140 {
139 OS.objc_msgSend(this.id, OS.sel_setAutoresizesOutlineColumn_1, resize); 141 OS.objc_msgSend(this.id_, OS.sel_setAutoresizesOutlineColumn_1, resize);
140 } 142 }
141 143
142 public void setAutosaveExpandedItems (bool save) 144 public void setAutosaveExpandedItems (bool save)
143 { 145 {
144 OS.objc_msgSend(this.id, OS.sel_setAutosaveExpandedItems_1, save); 146 OS.objc_msgSend(this.id_, OS.sel_setAutosaveExpandedItems_1, save);
145 } 147 }
146 148
147 public void setDropItem (id item, NSInteger index) 149 public void setDropItem (id item, NSInteger index)
148 { 150 {
149 OS.objc_msgSend(this.id, OS.sel_setDropItem_1dropChildIndex_1, item !is null ? item.id : null, index); 151 OS.objc_msgSend(this.id_, OS.sel_setDropItem_1dropChildIndex_1, item !is null ? item.id_ : null, index);
150 } 152 }
151 153
152 public void setIndentationMarkerFollowsCell (bool drawInCell) 154 public void setIndentationMarkerFollowsCell (bool drawInCell)
153 { 155 {
154 OS.objc_msgSend(this.id, OS.sel_setIndentationMarkerFollowsCell_1, drawInCell); 156 OS.objc_msgSend(this.id_, OS.sel_setIndentationMarkerFollowsCell_1, drawInCell);
155 } 157 }
156 158
157 public void setIndentationPerLevel (CGFloat indentationPerLevel) 159 public void setIndentationPerLevel (CGFloat indentationPerLevel)
158 { 160 {
159 OS.objc_msgSend(this.id, OS.sel_setIndentationPerLevel_1, indentationPerLevel); 161 OS.objc_msgSend(this.id_, OS.sel_setIndentationPerLevel_1, indentationPerLevel);
160 } 162 }
161 163
162 public void setOutlineTableColumn (NSTableColumn outlineTableColumn) 164 public void setOutlineTableColumn (NSTableColumn outlineTableColumn)
163 { 165 {
164 OS.objc_msgSend(this.id, OS.sel_setOutlineTableColumn_1, outlineTableColumn !is null ? outlineTableColumn.id : null); 166 OS.objc_msgSend(this.id_, OS.sel_setOutlineTableColumn_1, outlineTableColumn !is null ? outlineTableColumn.id_ : null);
165 } 167 }
166 168
167 public bool shouldCollapseAutoExpandedItemsForDeposited (bool deposited) 169 public bool shouldCollapseAutoExpandedItemsForDeposited (bool deposited)
168 { 170 {
169 return OS.objc_msgSend(this.id, OS.sel_shouldCollapseAutoExpandedItemsForDeposited_1, deposited) !is null; 171 return OS.objc_msgSend(this.id_, OS.sel_shouldCollapseAutoExpandedItemsForDeposited_1, deposited) !is null;
170 } 172 }
171 173
172 } 174 }