Mercurial > projects > dwt-mac
comparison dwt/internal/cocoa/NSStatusItem.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 |
---|---|
40 super(id); | 40 super(id); |
41 } | 41 } |
42 | 42 |
43 public objc.SEL action () | 43 public objc.SEL action () |
44 { | 44 { |
45 return cast(objc.SEL) OS.objc_msgSend(this.id, OS.sel_action); | 45 return cast(objc.SEL) OS.objc_msgSend(this.id_, OS.sel_action); |
46 } | 46 } |
47 | 47 |
48 public NSImage alternateImage () | 48 public NSImage alternateImage () |
49 { | 49 { |
50 objc.id result = OS.objc_msgSend(this.id, OS.sel_alternateImage); | 50 objc.id result = OS.objc_msgSend(this.id_, OS.sel_alternateImage); |
51 return result !is null ? new NSImage(result) : null; | 51 return result !is null ? new NSImage(result) : null; |
52 } | 52 } |
53 | 53 |
54 public NSAttributedString attributedTitle () | 54 public NSAttributedString attributedTitle () |
55 { | 55 { |
56 objc.id result = OS.objc_msgSend(this.id, OS.sel_attributedTitle); | 56 objc.id result = OS.objc_msgSend(this.id_, OS.sel_attributedTitle); |
57 return result !is null ? new NSAttributedString(result) : null; | 57 return result !is null ? new NSAttributedString(result) : null; |
58 } | 58 } |
59 | 59 |
60 public objc.SEL doubleAction () | 60 public objc.SEL doubleAction () |
61 { | 61 { |
62 return cast(objc.SEL) OS.objc_msgSend(this.id, OS.sel_doubleAction); | 62 return cast(objc.SEL) OS.objc_msgSend(this.id_, OS.sel_doubleAction); |
63 } | 63 } |
64 | 64 |
65 public void drawStatusBarBackgroundInRect (NSRect rect, bool highlight) | 65 public void drawStatusBarBackgroundInRect (NSRect rect, bool highlight) |
66 { | 66 { |
67 OS.objc_msgSend(this.id, OS.sel_drawStatusBarBackgroundInRect_1withHighlight_1, rect, highlight); | 67 OS.objc_msgSend(this.id_, OS.sel_drawStatusBarBackgroundInRect_1withHighlight_1, rect, highlight); |
68 } | 68 } |
69 | 69 |
70 public bool highlightMode () | 70 public bool highlightMode () |
71 { | 71 { |
72 return OS.objc_msgSend(this.id, OS.sel_highlightMode) !is null; | 72 return OS.objc_msgSend(this.id_, OS.sel_highlightMode) !is null; |
73 } | 73 } |
74 | 74 |
75 public NSImage image () | 75 public NSImage image () |
76 { | 76 { |
77 objc.id result = OS.objc_msgSend(this.id, OS.sel_image); | 77 objc.id result = OS.objc_msgSend(this.id_, OS.sel_image); |
78 return result !is null ? new NSImage(result) : null; | 78 return result !is null ? new NSImage(result) : null; |
79 } | 79 } |
80 | 80 |
81 public bool isEnabled () | 81 public bool isEnabled () |
82 { | 82 { |
83 return OS.objc_msgSend(this.id, OS.sel_isEnabled) !is null; | 83 return OS.objc_msgSend(this.id_, OS.sel_isEnabled) !is null; |
84 } | 84 } |
85 | 85 |
86 public CGFloat length () | 86 public CGFloat length () |
87 { | 87 { |
88 return cast(CGFloat) OS.objc_msgSend_fpret(this.id, OS.sel_length); | 88 return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_length); |
89 } | 89 } |
90 | 90 |
91 public NSMenu menu () | 91 public NSMenu menu () |
92 { | 92 { |
93 objc.id result = OS.objc_msgSend(this.id, OS.sel_menu); | 93 objc.id result = OS.objc_msgSend(this.id_, OS.sel_menu); |
94 return result !is null ? new NSMenu(result) : null; | 94 return result !is null ? new NSMenu(result) : null; |
95 } | 95 } |
96 | 96 |
97 public void popUpStatusItemMenu (NSMenu menu) | 97 public void popUpStatusItemMenu (NSMenu menu) |
98 { | 98 { |
99 OS.objc_msgSend(this.id, OS.sel_popUpStatusItemMenu_1, menu !is null ? menu.id : null); | 99 OS.objc_msgSend(this.id_, OS.sel_popUpStatusItemMenu_1, menu !is null ? menu.id_ : null); |
100 } | 100 } |
101 | 101 |
102 public NSInteger sendActionOn (NSInteger mask) | 102 public NSInteger sendActionOn (NSInteger mask) |
103 { | 103 { |
104 return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_sendActionOn_1, mask); | 104 return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_sendActionOn_1, mask); |
105 } | 105 } |
106 | 106 |
107 public void setAction (objc.SEL action) | 107 public void setAction (objc.SEL action) |
108 { | 108 { |
109 OS.objc_msgSend(this.id, OS.sel_setAction_1, action); | 109 OS.objc_msgSend(this.id_, OS.sel_setAction_1, action); |
110 } | 110 } |
111 | 111 |
112 public void setAlternateImage (NSImage image) | 112 public void setAlternateImage (NSImage image) |
113 { | 113 { |
114 OS.objc_msgSend(this.id, OS.sel_setAlternateImage_1, image !is null ? image.id : null); | 114 OS.objc_msgSend(this.id_, OS.sel_setAlternateImage_1, image !is null ? image.id_ : null); |
115 } | 115 } |
116 | 116 |
117 public void setAttributedTitle (NSAttributedString title) | 117 public void setAttributedTitle (NSAttributedString title) |
118 { | 118 { |
119 OS.objc_msgSend(this.id, OS.sel_setAttributedTitle_1, title !is null ? title.id : null); | 119 OS.objc_msgSend(this.id_, OS.sel_setAttributedTitle_1, title !is null ? title.id_ : null); |
120 } | 120 } |
121 | 121 |
122 public void setDoubleAction (objc.SEL action) | 122 public void setDoubleAction (objc.SEL action) |
123 { | 123 { |
124 OS.objc_msgSend(this.id, OS.sel_setDoubleAction_1, action); | 124 OS.objc_msgSend(this.id_, OS.sel_setDoubleAction_1, action); |
125 } | 125 } |
126 | 126 |
127 public void setEnabled (bool enabled) | 127 public void setEnabled (bool enabled) |
128 { | 128 { |
129 OS.objc_msgSend(this.id, OS.sel_setEnabled_1, enabled); | 129 OS.objc_msgSend(this.id_, OS.sel_setEnabled_1, enabled); |
130 } | 130 } |
131 | 131 |
132 public void setHighlightMode (bool highlightMode) | 132 public void setHighlightMode (bool highlightMode) |
133 { | 133 { |
134 OS.objc_msgSend(this.id, OS.sel_setHighlightMode_1, highlightMode); | 134 OS.objc_msgSend(this.id_, OS.sel_setHighlightMode_1, highlightMode); |
135 } | 135 } |
136 | 136 |
137 public void setImage (NSImage image) | 137 public void setImage (NSImage image) |
138 { | 138 { |
139 OS.objc_msgSend(this.id, OS.sel_setImage_1, image !is null ? image.id : null); | 139 OS.objc_msgSend(this.id_, OS.sel_setImage_1, image !is null ? image.id_ : null); |
140 } | 140 } |
141 | 141 |
142 public void setLength (CGFloat length) | 142 public void setLength (CGFloat length) |
143 { | 143 { |
144 OS.objc_msgSend(this.id, OS.sel_setLength_1, length); | 144 OS.objc_msgSend(this.id_, OS.sel_setLength_1, length); |
145 } | 145 } |
146 | 146 |
147 public void setMenu (NSMenu menu) | 147 public void setMenu (NSMenu menu) |
148 { | 148 { |
149 OS.objc_msgSend(this.id, OS.sel_setMenu_1, menu !is null ? menu.id : null); | 149 OS.objc_msgSend(this.id_, OS.sel_setMenu_1, menu !is null ? menu.id_ : null); |
150 } | 150 } |
151 | 151 |
152 public void setTarget (id target) | 152 public void setTarget (id target) |
153 { | 153 { |
154 OS.objc_msgSend(this.id, OS.sel_setTarget_1, target !is null ? target.id : null); | 154 OS.objc_msgSend(this.id_, OS.sel_setTarget_1, target !is null ? target.id_ : null); |
155 } | 155 } |
156 | 156 |
157 public void setTitle (NSString title) | 157 public void setTitle (NSString title) |
158 { | 158 { |
159 OS.objc_msgSend(this.id, OS.sel_setTitle_1, title !is null ? title.id : null); | 159 OS.objc_msgSend(this.id_, OS.sel_setTitle_1, title !is null ? title.id_ : null); |
160 } | 160 } |
161 | 161 |
162 public void setToolTip (NSString toolTip) | 162 public void setToolTip (NSString toolTip) |
163 { | 163 { |
164 OS.objc_msgSend(this.id, OS.sel_setToolTip_1, toolTip !is null ? toolTip.id : null); | 164 OS.objc_msgSend(this.id_, OS.sel_setToolTip_1, toolTip !is null ? toolTip.id_ : null); |
165 } | 165 } |
166 | 166 |
167 public void setView (NSView view) | 167 public void setView (NSView view) |
168 { | 168 { |
169 OS.objc_msgSend(this.id, OS.sel_setView_1, view !is null ? view.id : null); | 169 OS.objc_msgSend(this.id_, OS.sel_setView_1, view !is null ? view.id_ : null); |
170 } | 170 } |
171 | 171 |
172 public NSStatusBar statusBar () | 172 public NSStatusBar statusBar () |
173 { | 173 { |
174 objc.id result = OS.objc_msgSend(this.id, OS.sel_statusBar); | 174 objc.id result = OS.objc_msgSend(this.id_, OS.sel_statusBar); |
175 return result !is null ? new NSStatusBar(result) : null; | 175 return result !is null ? new NSStatusBar(result) : null; |
176 } | 176 } |
177 | 177 |
178 public id target () | 178 public id target () |
179 { | 179 { |
180 objc.id result = OS.objc_msgSend(this.id, OS.sel_target); | 180 objc.id result = OS.objc_msgSend(this.id_, OS.sel_target); |
181 return result !is null ? new id(result) : null; | 181 return result !is null ? new id(result) : null; |
182 } | 182 } |
183 | 183 |
184 public NSString title () | 184 public NSString title () |
185 { | 185 { |
186 objc.id result = OS.objc_msgSend(this.id, OS.sel_title); | 186 objc.id result = OS.objc_msgSend(this.id_, OS.sel_title); |
187 return result !is null ? new NSString(result) : null; | 187 return result !is null ? new NSString(result) : null; |
188 } | 188 } |
189 | 189 |
190 public NSString toolTip () | 190 public NSString toolTip () |
191 { | 191 { |
192 objc.id result = OS.objc_msgSend(this.id, OS.sel_toolTip); | 192 objc.id result = OS.objc_msgSend(this.id_, OS.sel_toolTip); |
193 return result !is null ? new NSString(result) : null; | 193 return result !is null ? new NSString(result) : null; |
194 } | 194 } |
195 | 195 |
196 public NSView view () | 196 public NSView view () |
197 { | 197 { |
198 objc.id result = OS.objc_msgSend(this.id, OS.sel_view); | 198 objc.id result = OS.objc_msgSend(this.id_, OS.sel_view); |
199 return result !is null ? new NSView(result) : null; | 199 return result !is null ? new NSView(result) : null; |
200 } | 200 } |
201 | 201 |
202 } | 202 } |