Mercurial > projects > dwt-mac
comparison dwt/internal/cocoa/NSToolbarItem.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 |
---|---|
38 super(id); | 38 super(id); |
39 } | 39 } |
40 | 40 |
41 public objc.SEL action () | 41 public objc.SEL action () |
42 { | 42 { |
43 return cast(objc.SEL) OS.objc_msgSend(this.id, OS.sel_action); | 43 return cast(objc.SEL) OS.objc_msgSend(this.id_, OS.sel_action); |
44 } | 44 } |
45 | 45 |
46 public bool allowsDuplicatesInToolbar () | 46 public bool allowsDuplicatesInToolbar () |
47 { | 47 { |
48 return OS.objc_msgSend(this.id, OS.sel_allowsDuplicatesInToolbar) !is null; | 48 return OS.objc_msgSend(this.id_, OS.sel_allowsDuplicatesInToolbar) !is null; |
49 } | 49 } |
50 | 50 |
51 public bool autovalidates () | 51 public bool autovalidates () |
52 { | 52 { |
53 return OS.objc_msgSend(this.id, OS.sel_autovalidates) !is null; | 53 return OS.objc_msgSend(this.id_, OS.sel_autovalidates) !is null; |
54 } | 54 } |
55 | 55 |
56 public NSImage image () | 56 public NSImage image () |
57 { | 57 { |
58 objc.id result = OS.objc_msgSend(this.id, OS.sel_image); | 58 objc.id result = OS.objc_msgSend(this.id_, OS.sel_image); |
59 return result !is null ? new NSImage(result) : null; | 59 return result !is null ? new NSImage(result) : null; |
60 } | 60 } |
61 | 61 |
62 public id initWithItemIdentifier (NSString itemIdentifier) | 62 public id initWithItemIdentifier (NSString itemIdentifier) |
63 { | 63 { |
64 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithItemIdentifier_1, itemIdentifier !is null ? itemIdentifier.id : null); | 64 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithItemIdentifier_1, itemIdentifier !is null ? itemIdentifier.id_ : null); |
65 return result !is null ? new id(result) : null; | 65 return result !is null ? new id(result) : null; |
66 } | 66 } |
67 | 67 |
68 public bool isEnabled () | 68 public bool isEnabled () |
69 { | 69 { |
70 return OS.objc_msgSend(this.id, OS.sel_isEnabled) !is null; | 70 return OS.objc_msgSend(this.id_, OS.sel_isEnabled) !is null; |
71 } | 71 } |
72 | 72 |
73 public NSString itemIdentifier () | 73 public NSString itemIdentifier () |
74 { | 74 { |
75 objc.id result = OS.objc_msgSend(this.id, OS.sel_itemIdentifier); | 75 objc.id result = OS.objc_msgSend(this.id_, OS.sel_itemIdentifier); |
76 return result !is null ? new NSString(result) : null; | 76 return result !is null ? new NSString(result) : null; |
77 } | 77 } |
78 | 78 |
79 public NSString label () | 79 public NSString label () |
80 { | 80 { |
81 objc.id result = OS.objc_msgSend(this.id, OS.sel_label); | 81 objc.id result = OS.objc_msgSend(this.id_, OS.sel_label); |
82 return result !is null ? new NSString(result) : null; | 82 return result !is null ? new NSString(result) : null; |
83 } | 83 } |
84 | 84 |
85 public NSSize maxSize () | 85 public NSSize maxSize () |
86 { | 86 { |
87 NSSize result; | 87 NSSize result; |
88 OS.objc_msgSend_stret(result, this.id, OS.sel_maxSize); | 88 OS.objc_msgSend_stret(&result, this.id_, OS.sel_maxSize); |
89 return result; | 89 return result; |
90 } | 90 } |
91 | 91 |
92 public NSMenuItem menuFormRepresentation () | 92 public NSMenuItem menuFormRepresentation () |
93 { | 93 { |
94 objc.id result = OS.objc_msgSend(this.id, OS.sel_menuFormRepresentation); | 94 objc.id result = OS.objc_msgSend(this.id_, OS.sel_menuFormRepresentation); |
95 return result !is null ? new NSMenuItem(result) : null; | 95 return result !is null ? new NSMenuItem(result) : null; |
96 } | 96 } |
97 | 97 |
98 public NSSize minSize () | 98 public NSSize minSize () |
99 { | 99 { |
100 NSSize result; | 100 NSSize result; |
101 OS.objc_msgSend_stret(result, this.id, OS.sel_minSize); | 101 OS.objc_msgSend_stret(&result, this.id_, OS.sel_minSize); |
102 return result; | 102 return result; |
103 } | 103 } |
104 | 104 |
105 public NSString paletteLabel () | 105 public NSString paletteLabel () |
106 { | 106 { |
107 objc.id result = OS.objc_msgSend(this.id, OS.sel_paletteLabel); | 107 objc.id result = OS.objc_msgSend(this.id_, OS.sel_paletteLabel); |
108 return result !is null ? new NSString(result) : null; | 108 return result !is null ? new NSString(result) : null; |
109 } | 109 } |
110 | 110 |
111 public void setAction (objc.SEL action) | 111 public void setAction (objc.SEL action) |
112 { | 112 { |
113 OS.objc_msgSend(this.id, OS.sel_setAction_1, action); | 113 OS.objc_msgSend(this.id_, OS.sel_setAction_1, action); |
114 } | 114 } |
115 | 115 |
116 public void setAutovalidates (bool resistance) | 116 public void setAutovalidates (bool resistance) |
117 { | 117 { |
118 OS.objc_msgSend(this.id, OS.sel_setAutovalidates_1, resistance); | 118 OS.objc_msgSend(this.id_, OS.sel_setAutovalidates_1, resistance); |
119 } | 119 } |
120 | 120 |
121 public void setEnabled (bool enabled) | 121 public void setEnabled (bool enabled) |
122 { | 122 { |
123 OS.objc_msgSend(this.id, OS.sel_setEnabled_1, enabled); | 123 OS.objc_msgSend(this.id_, OS.sel_setEnabled_1, enabled); |
124 } | 124 } |
125 | 125 |
126 public void setImage (NSImage image) | 126 public void setImage (NSImage image) |
127 { | 127 { |
128 OS.objc_msgSend(this.id, OS.sel_setImage_1, image !is null ? image.id : null); | 128 OS.objc_msgSend(this.id_, OS.sel_setImage_1, image !is null ? image.id_ : null); |
129 } | 129 } |
130 | 130 |
131 public void setLabel (NSString label) | 131 public void setLabel (NSString label) |
132 { | 132 { |
133 OS.objc_msgSend(this.id, OS.sel_setLabel_1, label !is null ? label.id : null); | 133 OS.objc_msgSend(this.id_, OS.sel_setLabel_1, label !is null ? label.id_ : null); |
134 } | 134 } |
135 | 135 |
136 public void setMaxSize (NSSize size) | 136 public void setMaxSize (NSSize size) |
137 { | 137 { |
138 OS.objc_msgSend(this.id, OS.sel_setMaxSize_1, size); | 138 OS.objc_msgSend(this.id_, OS.sel_setMaxSize_1, size); |
139 } | 139 } |
140 | 140 |
141 public void setMenuFormRepresentation (NSMenuItem menuItem) | 141 public void setMenuFormRepresentation (NSMenuItem menuItem) |
142 { | 142 { |
143 OS.objc_msgSend(this.id, OS.sel_setMenuFormRepresentation_1, menuItem !is null ? menuItem.id : null); | 143 OS.objc_msgSend(this.id_, OS.sel_setMenuFormRepresentation_1, menuItem !is null ? menuItem.id_ : null); |
144 } | 144 } |
145 | 145 |
146 public void setMinSize (NSSize size) | 146 public void setMinSize (NSSize size) |
147 { | 147 { |
148 OS.objc_msgSend(this.id, OS.sel_setMinSize_1, size); | 148 OS.objc_msgSend(this.id_, OS.sel_setMinSize_1, size); |
149 } | 149 } |
150 | 150 |
151 public void setPaletteLabel (NSString paletteLabel) | 151 public void setPaletteLabel (NSString paletteLabel) |
152 { | 152 { |
153 OS.objc_msgSend(this.id, OS.sel_setPaletteLabel_1, paletteLabel !is null ? paletteLabel.id : null); | 153 OS.objc_msgSend(this.id_, OS.sel_setPaletteLabel_1, paletteLabel !is null ? paletteLabel.id_ : null); |
154 } | 154 } |
155 | 155 |
156 public void setTag (NSInteger tag) | 156 public void setTag (NSInteger tag) |
157 { | 157 { |
158 OS.objc_msgSend(this.id, OS.sel_setTag_1, tag); | 158 OS.objc_msgSend(this.id_, OS.sel_setTag_1, tag); |
159 } | 159 } |
160 | 160 |
161 public void setTarget (id target) | 161 public void setTarget (id target) |
162 { | 162 { |
163 OS.objc_msgSend(this.id, OS.sel_setTarget_1, target !is null ? target.id : null); | 163 OS.objc_msgSend(this.id_, OS.sel_setTarget_1, target !is null ? target.id_ : null); |
164 } | 164 } |
165 | 165 |
166 public void setToolTip (NSString toolTip) | 166 public void setToolTip (NSString toolTip) |
167 { | 167 { |
168 OS.objc_msgSend(this.id, OS.sel_setToolTip_1, toolTip !is null ? toolTip.id : null); | 168 OS.objc_msgSend(this.id_, OS.sel_setToolTip_1, toolTip !is null ? toolTip.id_ : null); |
169 } | 169 } |
170 | 170 |
171 public void setView (NSView view) | 171 public void setView (NSView view) |
172 { | 172 { |
173 OS.objc_msgSend(this.id, OS.sel_setView_1, view !is null ? view.id : null); | 173 OS.objc_msgSend(this.id_, OS.sel_setView_1, view !is null ? view.id_ : null); |
174 } | 174 } |
175 | 175 |
176 public void setVisibilityPriority (NSInteger visibilityPriority) | 176 public void setVisibilityPriority (NSInteger visibilityPriority) |
177 { | 177 { |
178 OS.objc_msgSend(this.id, OS.sel_setVisibilityPriority_1, visibilityPriority); | 178 OS.objc_msgSend(this.id_, OS.sel_setVisibilityPriority_1, visibilityPriority); |
179 } | 179 } |
180 | 180 |
181 public NSInteger tag () | 181 public NSInteger tag () |
182 { | 182 { |
183 return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_tag); | 183 return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_tag); |
184 } | 184 } |
185 | 185 |
186 public id target () | 186 public id target () |
187 { | 187 { |
188 objc.id result = OS.objc_msgSend(this.id, OS.sel_target); | 188 objc.id result = OS.objc_msgSend(this.id_, OS.sel_target); |
189 return result !is null ? new id(result) : null; | 189 return result !is null ? new id(result) : null; |
190 } | 190 } |
191 | 191 |
192 public NSString toolTip () | 192 public NSString toolTip () |
193 { | 193 { |
194 objc.id result = OS.objc_msgSend(this.id, OS.sel_toolTip); | 194 objc.id result = OS.objc_msgSend(this.id_, OS.sel_toolTip); |
195 return result !is null ? new NSString(result) : null; | 195 return result !is null ? new NSString(result) : null; |
196 } | 196 } |
197 | 197 |
198 public NSToolbar toolbar () | 198 public NSToolbar toolbar () |
199 { | 199 { |
200 objc.id result = OS.objc_msgSend(this.id, OS.sel_toolbar); | 200 objc.id result = OS.objc_msgSend(this.id_, OS.sel_toolbar); |
201 return result !is null ? new NSToolbar(result) : null; | 201 return result !is null ? new NSToolbar(result) : null; |
202 } | 202 } |
203 | 203 |
204 public void validate () | 204 public void validate () |
205 { | 205 { |
206 OS.objc_msgSend(this.id, OS.sel_validate); | 206 OS.objc_msgSend(this.id_, OS.sel_validate); |
207 } | 207 } |
208 | 208 |
209 public NSView view () | 209 public NSView view () |
210 { | 210 { |
211 objc.id result = OS.objc_msgSend(this.id, OS.sel_view); | 211 objc.id result = OS.objc_msgSend(this.id_, OS.sel_view); |
212 return result !is null ? new NSView(result) : null; | 212 return result !is null ? new NSView(result) : null; |
213 } | 213 } |
214 | 214 |
215 public NSInteger visibilityPriority () | 215 public NSInteger visibilityPriority () |
216 { | 216 { |
217 return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_visibilityPriority); | 217 return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_visibilityPriority); |
218 } | 218 } |
219 | 219 |
220 } | 220 } |