Mercurial > projects > dwt-mac
comparison dwt/internal/cocoa/NSDatePicker.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.NSDatePicker; | 14 module dwt.internal.cocoa.NSDatePicker; |
15 | 15 |
16 import dwt.internal.cocoa.id; | |
16 import dwt.internal.cocoa.NSCalendar; | 17 import dwt.internal.cocoa.NSCalendar; |
17 import dwt.internal.cocoa.NSColor; | 18 import dwt.internal.cocoa.NSColor; |
18 import dwt.internal.cocoa.NSControl; | 19 import dwt.internal.cocoa.NSControl; |
19 import dwt.internal.cocoa.NSDate; | 20 import dwt.internal.cocoa.NSDate; |
20 import dwt.internal.cocoa.NSLocale; | 21 import dwt.internal.cocoa.NSLocale; |
35 super(id); | 36 super(id); |
36 } | 37 } |
37 | 38 |
38 public NSColor backgroundColor () | 39 public NSColor backgroundColor () |
39 { | 40 { |
40 objc.id result = OS.objc_msgSend(this.id, OS.sel_backgroundColor); | 41 objc.id result = OS.objc_msgSend(this.id_, OS.sel_backgroundColor); |
41 return result !is null ? new NSColor(result) : null; | 42 return result !is null ? new NSColor(result) : null; |
42 } | 43 } |
43 | 44 |
44 public NSCalendar calendar () | 45 public NSCalendar calendar () |
45 { | 46 { |
46 objc.id result = OS.objc_msgSend(this.id, OS.sel_calendar); | 47 objc.id result = OS.objc_msgSend(this.id_, OS.sel_calendar); |
47 return result !is null ? new NSCalendar(result) : null; | 48 return result !is null ? new NSCalendar(result) : null; |
48 } | 49 } |
49 | 50 |
50 public objc.id datePickerElements () | 51 public objc.id datePickerElements () |
51 { | 52 { |
52 return OS.objc_msgSend(this.id, OS.sel_datePickerElements); | 53 return OS.objc_msgSend(this.id_, OS.sel_datePickerElements); |
53 } | 54 } |
54 | 55 |
55 public objc.id datePickerMode () | 56 public objc.id datePickerMode () |
56 { | 57 { |
57 return OS.objc_msgSend(this.id, OS.sel_datePickerMode); | 58 return OS.objc_msgSend(this.id_, OS.sel_datePickerMode); |
58 } | 59 } |
59 | 60 |
60 public objc.id datePickerStyle () | 61 public objc.id datePickerStyle () |
61 { | 62 { |
62 return OS.objc_msgSend(this.id, OS.sel_datePickerStyle); | 63 return OS.objc_msgSend(this.id_, OS.sel_datePickerStyle); |
63 } | 64 } |
64 | 65 |
65 public NSDate dateValue () | 66 public NSDate dateValue () |
66 { | 67 { |
67 objc.id result = OS.objc_msgSend(this.id, OS.sel_dateValue); | 68 objc.id result = OS.objc_msgSend(this.id_, OS.sel_dateValue); |
68 return result !is null ? new NSDate(result) : null; | 69 return result !is null ? new NSDate(result) : null; |
69 } | 70 } |
70 | 71 |
71 public id delegatee () | 72 public id delegatee () |
72 { | 73 { |
73 objc.id result = OS.objc_msgSend(this.id, OS.sel_delegate); | 74 objc.id result = OS.objc_msgSend(this.id_, OS.sel_delegate); |
74 return result !is null ? new id(result) : null; | 75 return result !is null ? new id(result) : null; |
75 } | 76 } |
76 | 77 |
77 public bool drawsBackground () | 78 public bool drawsBackground () |
78 { | 79 { |
79 return OS.objc_msgSend(this.id, OS.sel_drawsBackground) !is null; | 80 return OS.objc_msgSend(this.id_, OS.sel_drawsBackground) !is null; |
80 } | 81 } |
81 | 82 |
82 public bool isBezeled () | 83 public bool isBezeled () |
83 { | 84 { |
84 return OS.objc_msgSend(this.id, OS.sel_isBezeled) !is null; | 85 return OS.objc_msgSend(this.id_, OS.sel_isBezeled) !is null; |
85 } | 86 } |
86 | 87 |
87 public bool isBordered () | 88 public bool isBordered () |
88 { | 89 { |
89 return OS.objc_msgSend(this.id, OS.sel_isBordered) !is null; | 90 return OS.objc_msgSend(this.id_, OS.sel_isBordered) !is null; |
90 } | 91 } |
91 | 92 |
92 public NSLocale locale () | 93 public NSLocale locale () |
93 { | 94 { |
94 objc.id result = OS.objc_msgSend(this.id, OS.sel_locale); | 95 objc.id result = OS.objc_msgSend(this.id_, OS.sel_locale); |
95 return result !is null ? new NSLocale(result) : null; | 96 return result !is null ? new NSLocale(result) : null; |
96 } | 97 } |
97 | 98 |
98 public NSDate maxDate () | 99 public NSDate maxDate () |
99 { | 100 { |
100 objc.id result = OS.objc_msgSend(this.id, OS.sel_maxDate); | 101 objc.id result = OS.objc_msgSend(this.id_, OS.sel_maxDate); |
101 return result !is null ? new NSDate(result) : null; | 102 return result !is null ? new NSDate(result) : null; |
102 } | 103 } |
103 | 104 |
104 public NSDate minDate () | 105 public NSDate minDate () |
105 { | 106 { |
106 objc.id result = OS.objc_msgSend(this.id, OS.sel_minDate); | 107 objc.id result = OS.objc_msgSend(this.id_, OS.sel_minDate); |
107 return result !is null ? new NSDate(result) : null; | 108 return result !is null ? new NSDate(result) : null; |
108 } | 109 } |
109 | 110 |
110 public void setBackgroundColor (NSColor color) | 111 public void setBackgroundColor (NSColor color) |
111 { | 112 { |
112 OS.objc_msgSend(this.id, OS.sel_setBackgroundColor_1, color !is null ? color.id : null); | 113 OS.objc_msgSend(this.id_, OS.sel_setBackgroundColor_1, color !is null ? color.id_ : null); |
113 } | 114 } |
114 | 115 |
115 public void setBezeled (bool flag) | 116 public void setBezeled (bool flag) |
116 { | 117 { |
117 OS.objc_msgSend(this.id, OS.sel_setBezeled_1, flag); | 118 OS.objc_msgSend(this.id_, OS.sel_setBezeled_1, flag); |
118 } | 119 } |
119 | 120 |
120 public void setBordered (bool flag) | 121 public void setBordered (bool flag) |
121 { | 122 { |
122 OS.objc_msgSend(this.id, OS.sel_setBordered_1, flag); | 123 OS.objc_msgSend(this.id_, OS.sel_setBordered_1, flag); |
123 } | 124 } |
124 | 125 |
125 public void setCalendar (NSCalendar newCalendar) | 126 public void setCalendar (NSCalendar newCalendar) |
126 { | 127 { |
127 OS.objc_msgSend(this.id, OS.sel_setCalendar_1, newCalendar !is null ? newCalendar.id : null); | 128 OS.objc_msgSend(this.id_, OS.sel_setCalendar_1, newCalendar !is null ? newCalendar.id_ : null); |
128 } | 129 } |
129 | 130 |
130 public void setDatePickerElements (objc.id elementFlags) | 131 public void setDatePickerElements (objc.id elementFlags) |
131 { | 132 { |
132 OS.objc_msgSend(this.id, OS.sel_setDatePickerElements_1, elementFlags); | 133 OS.objc_msgSend(this.id_, OS.sel_setDatePickerElements_1, elementFlags); |
133 } | 134 } |
134 | 135 |
135 public void setDatePickerMode (objc.id newMode) | 136 public void setDatePickerMode (objc.id newMode) |
136 { | 137 { |
137 OS.objc_msgSend(this.id, OS.sel_setDatePickerMode_1, newMode); | 138 OS.objc_msgSend(this.id_, OS.sel_setDatePickerMode_1, newMode); |
138 } | 139 } |
139 | 140 |
140 public void setDatePickerStyle (objc.id newStyle) | 141 public void setDatePickerStyle (objc.id newStyle) |
141 { | 142 { |
142 OS.objc_msgSend(this.id, OS.sel_setDatePickerStyle_1, newStyle); | 143 OS.objc_msgSend(this.id_, OS.sel_setDatePickerStyle_1, newStyle); |
143 } | 144 } |
144 | 145 |
145 public void setDateValue (NSDate newStartDate) | 146 public void setDateValue (NSDate newStartDate) |
146 { | 147 { |
147 OS.objc_msgSend(this.id, OS.sel_setDateValue_1, newStartDate !is null ? newStartDate.id : null); | 148 OS.objc_msgSend(this.id_, OS.sel_setDateValue_1, newStartDate !is null ? newStartDate.id_ : null); |
148 } | 149 } |
149 | 150 |
150 public void setDelegate (id anObject) | 151 public void setDelegate (id anObject) |
151 { | 152 { |
152 OS.objc_msgSend(this.id, OS.sel_setDelegate_1, anObject !is null ? anObject.id : null); | 153 OS.objc_msgSend(this.id_, OS.sel_setDelegate_1, anObject !is null ? anObject.id_ : null); |
153 } | 154 } |
154 | 155 |
155 public void setDrawsBackground (bool flag) | 156 public void setDrawsBackground (bool flag) |
156 { | 157 { |
157 OS.objc_msgSend(this.id, OS.sel_setDrawsBackground_1, flag); | 158 OS.objc_msgSend(this.id_, OS.sel_setDrawsBackground_1, flag); |
158 } | 159 } |
159 | 160 |
160 public void setLocale (NSLocale newLocale) | 161 public void setLocale (NSLocale newLocale) |
161 { | 162 { |
162 OS.objc_msgSend(this.id, OS.sel_setLocale_1, newLocale !is null ? newLocale.id : null); | 163 OS.objc_msgSend(this.id_, OS.sel_setLocale_1, newLocale !is null ? newLocale.id_ : null); |
163 } | 164 } |
164 | 165 |
165 public void setMaxDate (NSDate date) | 166 public void setMaxDate (NSDate date) |
166 { | 167 { |
167 OS.objc_msgSend(this.id, OS.sel_setMaxDate_1, date !is null ? date.id : null); | 168 OS.objc_msgSend(this.id_, OS.sel_setMaxDate_1, date !is null ? date.id_ : null); |
168 } | 169 } |
169 | 170 |
170 public void setMinDate (NSDate date) | 171 public void setMinDate (NSDate date) |
171 { | 172 { |
172 OS.objc_msgSend(this.id, OS.sel_setMinDate_1, date !is null ? date.id : null); | 173 OS.objc_msgSend(this.id_, OS.sel_setMinDate_1, date !is null ? date.id_ : null); |
173 } | 174 } |
174 | 175 |
175 public void setTextColor (NSColor color) | 176 public void setTextColor (NSColor color) |
176 { | 177 { |
177 OS.objc_msgSend(this.id, OS.sel_setTextColor_1, color !is null ? color.id : null); | 178 OS.objc_msgSend(this.id_, OS.sel_setTextColor_1, color !is null ? color.id_ : null); |
178 } | 179 } |
179 | 180 |
180 public void setTimeInterval (double newTimeInterval) | 181 public void setTimeInterval (double newTimeInterval) |
181 { | 182 { |
182 OS.objc_msgSend(this.id, OS.sel_setTimeInterval_1, newTimeInterval); | 183 OS.objc_msgSend(this.id_, OS.sel_setTimeInterval_1, newTimeInterval); |
183 } | 184 } |
184 | 185 |
185 public void setTimeZone (NSTimeZone newTimeZone) | 186 public void setTimeZone (NSTimeZone newTimeZone) |
186 { | 187 { |
187 OS.objc_msgSend(this.id, OS.sel_setTimeZone_1, newTimeZone !is null ? newTimeZone.id : null); | 188 OS.objc_msgSend(this.id_, OS.sel_setTimeZone_1, newTimeZone !is null ? newTimeZone.id_ : null); |
188 } | 189 } |
189 | 190 |
190 public NSColor textColor () | 191 public NSColor textColor () |
191 { | 192 { |
192 objc.id result = OS.objc_msgSend(this.id, OS.sel_textColor); | 193 objc.id result = OS.objc_msgSend(this.id_, OS.sel_textColor); |
193 return result !is null ? new NSColor(result) : null; | 194 return result !is null ? new NSColor(result) : null; |
194 } | 195 } |
195 | 196 |
196 public double timeInterval () | 197 public double timeInterval () |
197 { | 198 { |
198 return OS.objc_msgSend_fpret(this.id, OS.sel_timeInterval); | 199 return OS.objc_msgSend_fpret(this.id_, OS.sel_timeInterval); |
199 } | 200 } |
200 | 201 |
201 public NSTimeZone timeZone () | 202 public NSTimeZone timeZone () |
202 { | 203 { |
203 objc.id result = OS.objc_msgSend(this.id, OS.sel_timeZone); | 204 objc.id result = OS.objc_msgSend(this.id_, OS.sel_timeZone); |
204 return result !is null ? new NSTimeZone(result) : null; | 205 return result !is null ? new NSTimeZone(result) : null; |
205 } | 206 } |
206 | 207 |
207 } | 208 } |