Mercurial > projects > dwt-mac
comparison dwt/internal/cocoa/NSTableColumn.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.NSTableColumn; | 14 module dwt.internal.cocoa.NSTableColumn; |
15 | 15 |
16 import dwt.internal.cocoa.CGFloat; | |
16 import dwt.internal.cocoa.id; | 17 import dwt.internal.cocoa.id; |
17 import dwt.internal.cocoa.NSCell; | 18 import dwt.internal.cocoa.NSCell; |
18 import dwt.internal.cocoa.NSInteger; | 19 import dwt.internal.cocoa.NSInteger; |
19 import dwt.internal.cocoa.NSObject; | 20 import dwt.internal.cocoa.NSObject; |
20 import dwt.internal.cocoa.NSSortDescriptor; | 21 import dwt.internal.cocoa.NSSortDescriptor; |
37 super(id); | 38 super(id); |
38 } | 39 } |
39 | 40 |
40 public id dataCell () | 41 public id dataCell () |
41 { | 42 { |
42 objc.id result = OS.objc_msgSend(this.id, OS.sel_dataCell); | 43 objc.id result = OS.objc_msgSend(this.id_, OS.sel_dataCell); |
43 return result !is null ? new id(result) : null; | 44 return result !is null ? new id(result) : null; |
44 } | 45 } |
45 | 46 |
46 public id dataCellForRow (NSInteger row) | 47 public id dataCellForRow (NSInteger row) |
47 { | 48 { |
48 objc.id result = OS.objc_msgSend(this.id, OS.sel_dataCellForRow_1, row); | 49 objc.id result = OS.objc_msgSend(this.id_, OS.sel_dataCellForRow_1, row); |
49 return result !is null ? new id(result) : null; | 50 return result !is null ? new id(result) : null; |
50 } | 51 } |
51 | 52 |
52 public NSTableHeaderCell headerCell () | 53 public NSTableHeaderCell headerCell () |
53 { | 54 { |
54 objc.id result = OS.objc_msgSend(this.id, OS.sel_headerCell); | 55 objc.id result = OS.objc_msgSend(this.id_, OS.sel_headerCell); |
55 return result !is null ? new NSTableHeaderCell(result) : null; | 56 return result !is null ? new NSTableHeaderCell(result) : null; |
56 } | 57 } |
57 | 58 |
58 public NSString headerToolTip () | 59 public NSString headerToolTip () |
59 { | 60 { |
60 objc.id result = OS.objc_msgSend(this.id, OS.sel_headerToolTip); | 61 objc.id result = OS.objc_msgSend(this.id_, OS.sel_headerToolTip); |
61 return result !is null ? new NSString(result) : null; | 62 return result !is null ? new NSString(result) : null; |
62 } | 63 } |
63 | 64 |
64 public id identifier () | 65 public id identifier () |
65 { | 66 { |
66 objc.id result = OS.objc_msgSend(this.id, OS.sel_identifier); | 67 objc.id result = OS.objc_msgSend(this.id_, OS.sel_identifier); |
67 return result !is null ? new id(result) : null; | 68 return result !is null ? new id(result) : null; |
68 } | 69 } |
69 | 70 |
70 public NSTableColumn initWithIdentifier (id identifier) | 71 public NSTableColumn initWithIdentifier (id identifier) |
71 { | 72 { |
72 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithIdentifier_1, identifier !is null ? identifier.id : null); | 73 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithIdentifier_1, identifier !is null ? identifier.id_ : null); |
73 return result !is null ? this : null; | 74 return result !is null ? this : null; |
74 } | 75 } |
75 | 76 |
76 public bool isEditable () | 77 public bool isEditable () |
77 { | 78 { |
78 return OS.objc_msgSend(this.id, OS.sel_isEditable) !is null; | 79 return OS.objc_msgSend(this.id_, OS.sel_isEditable) !is null; |
79 } | 80 } |
80 | 81 |
81 public bool isHidden () | 82 public bool isHidden () |
82 { | 83 { |
83 return OS.objc_msgSend(this.id, OS.sel_isHidden) !is null; | 84 return OS.objc_msgSend(this.id_, OS.sel_isHidden) !is null; |
84 } | 85 } |
85 | 86 |
86 public bool isResizable () | 87 public bool isResizable () |
87 { | 88 { |
88 return OS.objc_msgSend(this.id, OS.sel_isResizable) !is null; | 89 return OS.objc_msgSend(this.id_, OS.sel_isResizable) !is null; |
89 } | 90 } |
90 | 91 |
91 public CGFloat maxWidth () | 92 public CGFloat maxWidth () |
92 { | 93 { |
93 return cast(CGFloat) OS.objc_msgSend_fpret(this.id, OS.sel_maxWidth); | 94 return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_maxWidth); |
94 } | 95 } |
95 | 96 |
96 public CGFloat minWidth () | 97 public CGFloat minWidth () |
97 { | 98 { |
98 return cast(CGFloat) OS.objc_msgSend_fpret(this.id, OS.sel_minWidth); | 99 return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_minWidth); |
99 } | 100 } |
100 | 101 |
101 public NSUInteger resizingMask () | 102 public NSUInteger resizingMask () |
102 { | 103 { |
103 return cast(NSUInteger) OS.objc_msgSend(this.id, OS.sel_resizingMask); | 104 return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_resizingMask); |
104 } | 105 } |
105 | 106 |
106 public void setDataCell (NSCell cell) | 107 public void setDataCell (NSCell cell) |
107 { | 108 { |
108 OS.objc_msgSend(this.id, OS.sel_setDataCell_1, cell !is null ? cell.id : null); | 109 OS.objc_msgSend(this.id_, OS.sel_setDataCell_1, cell !is null ? cell.id_ : null); |
109 } | 110 } |
110 | 111 |
111 public void setEditable (bool flag) | 112 public void setEditable (bool flag) |
112 { | 113 { |
113 OS.objc_msgSend(this.id, OS.sel_setEditable_1, flag); | 114 OS.objc_msgSend(this.id_, OS.sel_setEditable_1, flag); |
114 } | 115 } |
115 | 116 |
116 public void setHeaderCell (NSCell cell) | 117 public void setHeaderCell (NSCell cell) |
117 { | 118 { |
118 OS.objc_msgSend(this.id, OS.sel_setHeaderCell_1, cell !is null ? cell.id : null); | 119 OS.objc_msgSend(this.id_, OS.sel_setHeaderCell_1, cell !is null ? cell.id_ : null); |
119 } | 120 } |
120 | 121 |
121 public void setHeaderToolTip (NSString string) | 122 public void setHeaderToolTip (NSString string) |
122 { | 123 { |
123 OS.objc_msgSend(this.id, OS.sel_setHeaderToolTip_1, string !is null ? string.id : null); | 124 OS.objc_msgSend(this.id_, OS.sel_setHeaderToolTip_1, string !is null ? string.id_ : null); |
124 } | 125 } |
125 | 126 |
126 public void setHidden (bool hidden) | 127 public void setHidden (bool hidden) |
127 { | 128 { |
128 OS.objc_msgSend(this.id, OS.sel_setHidden_1, hidden); | 129 OS.objc_msgSend(this.id_, OS.sel_setHidden_1, hidden); |
129 } | 130 } |
130 | 131 |
131 public void setIdentifier (id identifier) | 132 public void setIdentifier (id identifier) |
132 { | 133 { |
133 OS.objc_msgSend(this.id, OS.sel_setIdentifier_1, identifier !is null ? identifier.id : null); | 134 OS.objc_msgSend(this.id_, OS.sel_setIdentifier_1, identifier !is null ? identifier.id_ : null); |
134 } | 135 } |
135 | 136 |
136 public void setMaxWidth (CGFloat maxWidth) | 137 public void setMaxWidth (CGFloat maxWidth) |
137 { | 138 { |
138 OS.objc_msgSend(this.id, OS.sel_setMaxWidth_1, maxWidth); | 139 OS.objc_msgSend(this.id_, OS.sel_setMaxWidth_1, maxWidth); |
139 } | 140 } |
140 | 141 |
141 public void setMinWidth (CGFloat minWidth) | 142 public void setMinWidth (CGFloat minWidth) |
142 { | 143 { |
143 OS.objc_msgSend(this.id, OS.sel_setMinWidth_1, minWidth); | 144 OS.objc_msgSend(this.id_, OS.sel_setMinWidth_1, minWidth); |
144 } | 145 } |
145 | 146 |
146 public void setResizable (bool flag) | 147 public void setResizable (bool flag) |
147 { | 148 { |
148 OS.objc_msgSend(this.id, OS.sel_setResizable_1, flag); | 149 OS.objc_msgSend(this.id_, OS.sel_setResizable_1, flag); |
149 } | 150 } |
150 | 151 |
151 public void setResizingMask (NSUInteger resizingMask) | 152 public void setResizingMask (NSUInteger resizingMask) |
152 { | 153 { |
153 OS.objc_msgSend(this.id, OS.sel_setResizingMask_1, resizingMask); | 154 OS.objc_msgSend(this.id_, OS.sel_setResizingMask_1, resizingMask); |
154 } | 155 } |
155 | 156 |
156 public void setSortDescriptorPrototype (NSSortDescriptor sortDescriptor) | 157 public void setSortDescriptorPrototype (NSSortDescriptor sortDescriptor) |
157 { | 158 { |
158 OS.objc_msgSend(this.id, OS.sel_setSortDescriptorPrototype_1, sortDescriptor !is null ? sortDescriptor.id : null); | 159 OS.objc_msgSend(this.id_, OS.sel_setSortDescriptorPrototype_1, sortDescriptor !is null ? sortDescriptor.id_ : null); |
159 } | 160 } |
160 | 161 |
161 public void setTableView (NSTableView tableView) | 162 public void setTableView (NSTableView tableView) |
162 { | 163 { |
163 OS.objc_msgSend(this.id, OS.sel_setTableView_1, tableView !is null ? tableView.id : null); | 164 OS.objc_msgSend(this.id_, OS.sel_setTableView_1, tableView !is null ? tableView.id_ : null); |
164 } | 165 } |
165 | 166 |
166 public void setWidth (CGFloat width) | 167 public void setWidth (CGFloat width) |
167 { | 168 { |
168 OS.objc_msgSend(this.id, OS.sel_setWidth_1, width); | 169 OS.objc_msgSend(this.id_, OS.sel_setWidth_1, width); |
169 } | 170 } |
170 | 171 |
171 public void sizeToFit () | 172 public void sizeToFit () |
172 { | 173 { |
173 OS.objc_msgSend(this.id, OS.sel_sizeToFit); | 174 OS.objc_msgSend(this.id_, OS.sel_sizeToFit); |
174 } | 175 } |
175 | 176 |
176 public NSSortDescriptor sortDescriptorPrototype () | 177 public NSSortDescriptor sortDescriptorPrototype () |
177 { | 178 { |
178 objc.id result = OS.objc_msgSend(this.id, OS.sel_sortDescriptorPrototype); | 179 objc.id result = OS.objc_msgSend(this.id_, OS.sel_sortDescriptorPrototype); |
179 return result !is null ? new NSSortDescriptor(result) : null; | 180 return result !is null ? new NSSortDescriptor(result) : null; |
180 } | 181 } |
181 | 182 |
182 public NSTableView tableView () | 183 public NSTableView tableView () |
183 { | 184 { |
184 objc.id result = OS.objc_msgSend(this.id, OS.sel_tableView); | 185 objc.id result = OS.objc_msgSend(this.id_, OS.sel_tableView); |
185 return result !is null ? new NSTableView(result) : null; | 186 return result !is null ? new NSTableView(result) : null; |
186 } | 187 } |
187 | 188 |
188 public CGFloat width () | 189 public CGFloat width () |
189 { | 190 { |
190 return cast(CGFloat) OS.objc_msgSend_fpret(this.id, OS.sel_width); | 191 return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_width); |
191 } | 192 } |
192 | 193 |
193 } | 194 } |