comparison dwt/internal/cocoa/NSTabView.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
24 import dwt.internal.cocoa.NSTabViewItem; 24 import dwt.internal.cocoa.NSTabViewItem;
25 import dwt.internal.cocoa.NSView; 25 import dwt.internal.cocoa.NSView;
26 import dwt.internal.cocoa.OS; 26 import dwt.internal.cocoa.OS;
27 import objc = dwt.internal.objc.runtime; 27 import objc = dwt.internal.objc.runtime;
28 28
29 enum NSTabViewType 29 enum NSTabViewType : NSUInteger
30 { 30 {
31 NSTopTabsBezelBorder = 0, 31 NSTopTabsBezelBorder = 0,
32 NSLeftTabsBezelBorder = 1, 32 NSLeftTabsBezelBorder = 1,
33 NSBottomTabsBezelBorder = 2, 33 NSBottomTabsBezelBorder = 2,
34 NSRightTabsBezelBorder = 3, 34 NSRightTabsBezelBorder = 3,
58 super(id); 58 super(id);
59 } 59 }
60 60
61 public void addTabViewItem (NSTabViewItem tabViewItem) 61 public void addTabViewItem (NSTabViewItem tabViewItem)
62 { 62 {
63 OS.objc_msgSend(this.id, OS.sel_addTabViewItem_1, tabViewItem !is null ? tabViewItem.id : null); 63 OS.objc_msgSend(this.id_, OS.sel_addTabViewItem_1, tabViewItem !is null ? tabViewItem.id_ : null);
64 } 64 }
65 65
66 public bool allowsTruncatedLabels () 66 public bool allowsTruncatedLabels ()
67 { 67 {
68 return OS.objc_msgSend(this.id, OS.sel_allowsTruncatedLabels) !is null; 68 return OS.objc_msgSend(this.id_, OS.sel_allowsTruncatedLabels) !is null;
69 } 69 }
70 70
71 public NSRect contentRect () 71 public NSRect contentRect ()
72 { 72 {
73 NSRect result; 73 NSRect result;
74 OS.objc_msgSend_stret(result, this.id, OS.sel_contentRect); 74 OS.objc_msgSend_stret(&result, this.id_, OS.sel_contentRect);
75 return result; 75 return result;
76 } 76 }
77 77
78 public NSControlSize controlSize () 78 public NSControlSize controlSize ()
79 { 79 {
80 return cast(NSControlSize) OS.objc_msgSend(this.id, OS.sel_controlSize); 80 return cast(NSControlSize) OS.objc_msgSend(this.id_, OS.sel_controlSize);
81 } 81 }
82 82
83 public NSControlTint controlTint () 83 public NSControlTint controlTint ()
84 { 84 {
85 return OS.objc_msgSend(this.id, OS.sel_controlTint); 85 return cast(NSControlTint) OS.objc_msgSend(this.id_, OS.sel_controlTint);
86 } 86 }
87 87
88 public id delegatee () 88 public id delegatee ()
89 { 89 {
90 objc.id result = OS.objc_msgSend(this.id, OS.sel_delegate); 90 objc.id result = OS.objc_msgSend(this.id_, OS.sel_delegate);
91 return result !is null ? new id(result) : null; 91 return result !is null ? new id(result) : null;
92 } 92 }
93 93
94 public bool drawsBackground () 94 public bool drawsBackground ()
95 { 95 {
96 return OS.objc_msgSend(this.id, OS.sel_drawsBackground) !is null; 96 return OS.objc_msgSend(this.id_, OS.sel_drawsBackground) !is null;
97 } 97 }
98 98
99 public NSFont font () 99 public NSFont font ()
100 { 100 {
101 objc.id result = OS.objc_msgSend(this.id, OS.sel_font); 101 objc.id result = OS.objc_msgSend(this.id_, OS.sel_font);
102 return result !is null ? new NSFont(result) : null; 102 return result !is null ? new NSFont(result) : null;
103 } 103 }
104 104
105 public NSInteger indexOfTabViewItem (NSTabViewItem tabViewItem) 105 public NSInteger indexOfTabViewItem (NSTabViewItem tabViewItem)
106 { 106 {
107 return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_indexOfTabViewItem_1, tabViewItem !is null ? tabViewItem.id : null); 107 return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_indexOfTabViewItem_1, tabViewItem !is null ? tabViewItem.id_ : null);
108 } 108 }
109 109
110 public NSInteger indexOfTabViewItemWithIdentifier (id identifier) 110 public NSInteger indexOfTabViewItemWithIdentifier (id identifier)
111 { 111 {
112 return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_indexOfTabViewItemWithIdentifier_1, identifier !is null ? identifier.id : null); 112 return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_indexOfTabViewItemWithIdentifier_1, identifier !is null ? identifier.id_ : null);
113 } 113 }
114 114
115 public void insertTabViewItem (NSTabViewItem tabViewItem, NSInteger index) 115 public void insertTabViewItem (NSTabViewItem tabViewItem, NSInteger index)
116 { 116 {
117 OS.objc_msgSend(this.id, OS.sel_insertTabViewItem_1atIndex_1, tabViewItem !is null ? tabViewItem.id : null, index); 117 OS.objc_msgSend(this.id_, OS.sel_insertTabViewItem_1atIndex_1, tabViewItem !is null ? tabViewItem.id_ : null, index);
118 } 118 }
119 119
120 public NSSize minimumSize () 120 public NSSize minimumSize ()
121 { 121 {
122 NSSize result; 122 NSSize result;
123 OS.objc_msgSend_struct(result, this.id, OS.sel_minimumSize); 123 OS.objc_msgSend_struct(&result, this.id_, OS.sel_minimumSize);
124 return result; 124 return result;
125 } 125 }
126 126
127 public NSInteger numberOfTabViewItems () 127 public NSInteger numberOfTabViewItems ()
128 { 128 {
129 return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_numberOfTabViewItems); 129 return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_numberOfTabViewItems);
130 } 130 }
131 131
132 public void removeTabViewItem (NSTabViewItem tabViewItem) 132 public void removeTabViewItem (NSTabViewItem tabViewItem)
133 { 133 {
134 OS.objc_msgSend(this.id, OS.sel_removeTabViewItem_1, tabViewItem !is null ? tabViewItem.id : null); 134 OS.objc_msgSend(this.id_, OS.sel_removeTabViewItem_1, tabViewItem !is null ? tabViewItem.id_ : null);
135 } 135 }
136 136
137 public void selectFirstTabViewItem (id sender) 137 public void selectFirstTabViewItem (id sender)
138 { 138 {
139 OS.objc_msgSend(this.id, OS.sel_selectFirstTabViewItem_1, sender !is null ? sender.id : null); 139 OS.objc_msgSend(this.id_, OS.sel_selectFirstTabViewItem_1, sender !is null ? sender.id_ : null);
140 } 140 }
141 141
142 public void selectLastTabViewItem (id sender) 142 public void selectLastTabViewItem (id sender)
143 { 143 {
144 OS.objc_msgSend(this.id, OS.sel_selectLastTabViewItem_1, sender !is null ? sender.id : null); 144 OS.objc_msgSend(this.id_, OS.sel_selectLastTabViewItem_1, sender !is null ? sender.id_ : null);
145 } 145 }
146 146
147 public void selectNextTabViewItem (id sender) 147 public void selectNextTabViewItem (id sender)
148 { 148 {
149 OS.objc_msgSend(this.id, OS.sel_selectNextTabViewItem_1, sender !is null ? sender.id : null); 149 OS.objc_msgSend(this.id_, OS.sel_selectNextTabViewItem_1, sender !is null ? sender.id_ : null);
150 } 150 }
151 151
152 public void selectPreviousTabViewItem (id sender) 152 public void selectPreviousTabViewItem (id sender)
153 { 153 {
154 OS.objc_msgSend(this.id, OS.sel_selectPreviousTabViewItem_1, sender !is null ? sender.id : null); 154 OS.objc_msgSend(this.id_, OS.sel_selectPreviousTabViewItem_1, sender !is null ? sender.id_ : null);
155 } 155 }
156 156
157 public void selectTabViewItem (NSTabViewItem tabViewItem) 157 public void selectTabViewItem (NSTabViewItem tabViewItem)
158 { 158 {
159 OS.objc_msgSend(this.id, OS.sel_selectTabViewItem_1, tabViewItem !is null ? tabViewItem.id : null); 159 OS.objc_msgSend(this.id_, OS.sel_selectTabViewItem_1, tabViewItem !is null ? tabViewItem.id_ : null);
160 } 160 }
161 161
162 public void selectTabViewItemAtIndex (NSInteger index) 162 public void selectTabViewItemAtIndex (NSInteger index)
163 { 163 {
164 OS.objc_msgSend(this.id, OS.sel_selectTabViewItemAtIndex_1, index); 164 OS.objc_msgSend(this.id_, OS.sel_selectTabViewItemAtIndex_1, index);
165 } 165 }
166 166
167 public void selectTabViewItemWithIdentifier (id identifier) 167 public void selectTabViewItemWithIdentifier (id identifier)
168 { 168 {
169 OS.objc_msgSend(this.id, OS.sel_selectTabViewItemWithIdentifier_1, identifier !is null ? identifier.id : null); 169 OS.objc_msgSend(this.id_, OS.sel_selectTabViewItemWithIdentifier_1, identifier !is null ? identifier.id_ : null);
170 } 170 }
171 171
172 public NSTabViewItem selectedTabViewItem () 172 public NSTabViewItem selectedTabViewItem ()
173 { 173 {
174 objc.id result = OS.objc_msgSend(this.id, OS.sel_selectedTabViewItem); 174 objc.id result = OS.objc_msgSend(this.id_, OS.sel_selectedTabViewItem);
175 return result !is null ? new NSTabViewItem(result) : null; 175 return result !is null ? new NSTabViewItem(result) : null;
176 } 176 }
177 177
178 public void setAllowsTruncatedLabels (bool allowTruncatedLabels) 178 public void setAllowsTruncatedLabels (bool allowTruncatedLabels)
179 { 179 {
180 OS.objc_msgSend(this.id, OS.sel_setAllowsTruncatedLabels_1, allowTruncatedLabels); 180 OS.objc_msgSend(this.id_, OS.sel_setAllowsTruncatedLabels_1, allowTruncatedLabels);
181 } 181 }
182 182
183 public void setControlSize (NSControlSize controlSize) 183 public void setControlSize (NSControlSize controlSize)
184 { 184 {
185 OS.objc_msgSend(this.id, OS.sel_setControlSize_1, controlSize); 185 OS.objc_msgSend(this.id_, OS.sel_setControlSize_1, controlSize);
186 } 186 }
187 187
188 public void setControlTint (NSControlTint controlTint) 188 public void setControlTint (NSControlTint controlTint)
189 { 189 {
190 OS.objc_msgSend(this.id, OS.sel_setControlTint_1, controlTint); 190 OS.objc_msgSend(this.id_, OS.sel_setControlTint_1, controlTint);
191 } 191 }
192 192
193 public void setDelegate (id anObject) 193 public void setDelegate (id anObject)
194 { 194 {
195 OS.objc_msgSend(this.id, OS.sel_setDelegate_1, anObject !is null ? anObject.id : null); 195 OS.objc_msgSend(this.id_, OS.sel_setDelegate_1, anObject !is null ? anObject.id_ : null);
196 } 196 }
197 197
198 public void setDrawsBackground (bool flag) 198 public void setDrawsBackground (bool flag)
199 { 199 {
200 OS.objc_msgSend(this.id, OS.sel_setDrawsBackground_1, flag); 200 OS.objc_msgSend(this.id_, OS.sel_setDrawsBackground_1, flag);
201 } 201 }
202 202
203 public void setFont (NSFont font) 203 public void setFont (NSFont font)
204 { 204 {
205 OS.objc_msgSend(this.id, OS.sel_setFont_1, font !is null ? font.id : null); 205 OS.objc_msgSend(this.id_, OS.sel_setFont_1, font !is null ? font.id_ : null);
206 } 206 }
207 207
208 public void setTabViewType (NSTabViewType tabViewType) 208 public void setTabViewType (NSTabViewType tabViewType)
209 { 209 {
210 OS.objc_msgSend(this.id, OS.sel_setTabViewType_1, tabViewType); 210 OS.objc_msgSend(this.id_, OS.sel_setTabViewType_1, tabViewType);
211 } 211 }
212 212
213 public NSTabViewItem tabViewItemAtIndex (NSInteger index) 213 public NSTabViewItem tabViewItemAtIndex (NSInteger index)
214 { 214 {
215 objc.id result = OS.objc_msgSend(this.id, OS.sel_tabViewItemAtIndex_1, index); 215 objc.id result = OS.objc_msgSend(this.id_, OS.sel_tabViewItemAtIndex_1, index);
216 return result !is null ? new NSTabViewItem(result) : null; 216 return result !is null ? new NSTabViewItem(result) : null;
217 } 217 }
218 218
219 public NSTabViewItem tabViewItemAtPoint (NSPoint point) 219 public NSTabViewItem tabViewItemAtPoint (NSPoint point)
220 { 220 {
221 objc.id result = OS.objc_msgSend(this.id, OS.sel_tabViewItemAtPoint_1, point); 221 objc.id result = OS.objc_msgSend(this.id_, OS.sel_tabViewItemAtPoint_1, point);
222 return result !is null ? new NSTabViewItem(result) : null; 222 return result !is null ? new NSTabViewItem(result) : null;
223 } 223 }
224 224
225 public NSArray tabViewItems () 225 public NSArray tabViewItems ()
226 { 226 {
227 objc.id result = OS.objc_msgSend(this.id, OS.sel_tabViewItems); 227 objc.id result = OS.objc_msgSend(this.id_, OS.sel_tabViewItems);
228 return result !is null ? new NSArray(result) : null; 228 return result !is null ? new NSArray(result) : null;
229 } 229 }
230 230
231 public NSTabViewType tabViewType () 231 public NSTabViewType tabViewType ()
232 { 232 {
233 return cast(NSTabViewType) OS.objc_msgSend(this.id, OS.sel_tabViewType); 233 return cast(NSTabViewType) OS.objc_msgSend(this.id_, OS.sel_tabViewType);
234 } 234 }
235 235
236 public void takeSelectedTabViewItemFromSender (id sender) 236 public void takeSelectedTabViewItemFromSender (id sender)
237 { 237 {
238 OS.objc_msgSend(this.id, OS.sel_takeSelectedTabViewItemFromSender_1, sender !is null ? sender.id : null); 238 OS.objc_msgSend(this.id_, OS.sel_takeSelectedTabViewItemFromSender_1, sender !is null ? sender.id_ : null);
239 } 239 }
240 240
241 } 241 }