Mercurial > projects > dwt-mac
comparison dwt/internal/cocoa/NSDatePicker.d @ 0:380af2bdd8e5
Upload of whole dwt tree
author | Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com> |
---|---|
date | Sat, 09 Aug 2008 17:00:02 +0200 |
parents | |
children | 8b48be5454ce |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:380af2bdd8e5 |
---|---|
1 /******************************************************************************* | |
2 * Copyright (c) 2007 IBM Corporation and others. | |
3 * All rights reserved. This program and the accompanying materials | |
4 * are made available under the terms of the Eclipse Public License v1.0 | |
5 * which accompanies this distribution, and is available at | |
6 * http://www.eclipse.org/legal/epl-v10.html | |
7 * | |
8 * Contributors: | |
9 * IBM Corporation - initial API and implementation | |
10 * | |
11 * Port to the D Programming language: | |
12 * Jacob Carlborg <jacob.carlborg@gmail.com> | |
13 *******************************************************************************/ | |
14 module dwt.internal.cocoa.NSDatePicker; | |
15 | |
16 import dwt.internal.cocoa.NSCalendar; | |
17 import dwt.internal.cocoa.NSColor; | |
18 import dwt.internal.cocoa.NSControl; | |
19 import dwt.internal.cocoa.NSDate; | |
20 import dwt.internal.cocoa.NSLocale; | |
21 import dwt.internal.cocoa.NSTimeZone; | |
22 import dwt.internal.cocoa.OS; | |
23 import objc = dwt.internal.objc.runtime; | |
24 | |
25 public class NSDatePicker : NSControl | |
26 { | |
27 | |
28 public this () | |
29 { | |
30 super(); | |
31 } | |
32 | |
33 public this (objc.id id) | |
34 { | |
35 super(id); | |
36 } | |
37 | |
38 public NSColor backgroundColor () | |
39 { | |
40 objc.id result = OS.objc_msgSend(this.id, OS.sel_backgroundColor); | |
41 return result !is null ? new NSColor(result) : null; | |
42 } | |
43 | |
44 public NSCalendar calendar () | |
45 { | |
46 objc.id result = OS.objc_msgSend(this.id, OS.sel_calendar); | |
47 return result !is null ? new NSCalendar(result) : null; | |
48 } | |
49 | |
50 public objc.id datePickerElements () | |
51 { | |
52 return OS.objc_msgSend(this.id, OS.sel_datePickerElements); | |
53 } | |
54 | |
55 public objc.id datePickerMode () | |
56 { | |
57 return OS.objc_msgSend(this.id, OS.sel_datePickerMode); | |
58 } | |
59 | |
60 public objc.id datePickerStyle () | |
61 { | |
62 return OS.objc_msgSend(this.id, OS.sel_datePickerStyle); | |
63 } | |
64 | |
65 public NSDate dateValue () | |
66 { | |
67 objc.id result = OS.objc_msgSend(this.id, OS.sel_dateValue); | |
68 return result !is null ? new NSDate(result) : null; | |
69 } | |
70 | |
71 public id delegatee () | |
72 { | |
73 objc.id result = OS.objc_msgSend(this.id, OS.sel_delegate); | |
74 return result !is null ? new id(result) : null; | |
75 } | |
76 | |
77 public bool drawsBackground () | |
78 { | |
79 return OS.objc_msgSend(this.id, OS.sel_drawsBackground) !is null; | |
80 } | |
81 | |
82 public bool isBezeled () | |
83 { | |
84 return OS.objc_msgSend(this.id, OS.sel_isBezeled) !is null; | |
85 } | |
86 | |
87 public bool isBordered () | |
88 { | |
89 return OS.objc_msgSend(this.id, OS.sel_isBordered) !is null; | |
90 } | |
91 | |
92 public NSLocale locale () | |
93 { | |
94 objc.id result = OS.objc_msgSend(this.id, OS.sel_locale); | |
95 return result !is null ? new NSLocale(result) : null; | |
96 } | |
97 | |
98 public NSDate maxDate () | |
99 { | |
100 objc.id result = OS.objc_msgSend(this.id, OS.sel_maxDate); | |
101 return result !is null ? new NSDate(result) : null; | |
102 } | |
103 | |
104 public NSDate minDate () | |
105 { | |
106 objc.id result = OS.objc_msgSend(this.id, OS.sel_minDate); | |
107 return result !is null ? new NSDate(result) : null; | |
108 } | |
109 | |
110 public void setBackgroundColor (NSColor color) | |
111 { | |
112 OS.objc_msgSend(this.id, OS.sel_setBackgroundColor_1, color !is null ? color.id : null); | |
113 } | |
114 | |
115 public void setBezeled (bool flag) | |
116 { | |
117 OS.objc_msgSend(this.id, OS.sel_setBezeled_1, flag); | |
118 } | |
119 | |
120 public void setBordered (bool flag) | |
121 { | |
122 OS.objc_msgSend(this.id, OS.sel_setBordered_1, flag); | |
123 } | |
124 | |
125 public void setCalendar (NSCalendar newCalendar) | |
126 { | |
127 OS.objc_msgSend(this.id, OS.sel_setCalendar_1, newCalendar !is null ? newCalendar.id : null); | |
128 } | |
129 | |
130 public void setDatePickerElements (objc.id elementFlags) | |
131 { | |
132 OS.objc_msgSend(this.id, OS.sel_setDatePickerElements_1, elementFlags); | |
133 } | |
134 | |
135 public void setDatePickerMode (objc.id newMode) | |
136 { | |
137 OS.objc_msgSend(this.id, OS.sel_setDatePickerMode_1, newMode); | |
138 } | |
139 | |
140 public void setDatePickerStyle (objc.id newStyle) | |
141 { | |
142 OS.objc_msgSend(this.id, OS.sel_setDatePickerStyle_1, newStyle); | |
143 } | |
144 | |
145 public void setDateValue (NSDate newStartDate) | |
146 { | |
147 OS.objc_msgSend(this.id, OS.sel_setDateValue_1, newStartDate !is null ? newStartDate.id : null); | |
148 } | |
149 | |
150 public void setDelegate (id anObject) | |
151 { | |
152 OS.objc_msgSend(this.id, OS.sel_setDelegate_1, anObject !is null ? anObject.id : null); | |
153 } | |
154 | |
155 public void setDrawsBackground (bool flag) | |
156 { | |
157 OS.objc_msgSend(this.id, OS.sel_setDrawsBackground_1, flag); | |
158 } | |
159 | |
160 public void setLocale (NSLocale newLocale) | |
161 { | |
162 OS.objc_msgSend(this.id, OS.sel_setLocale_1, newLocale !is null ? newLocale.id : null); | |
163 } | |
164 | |
165 public void setMaxDate (NSDate date) | |
166 { | |
167 OS.objc_msgSend(this.id, OS.sel_setMaxDate_1, date !is null ? date.id : null); | |
168 } | |
169 | |
170 public void setMinDate (NSDate date) | |
171 { | |
172 OS.objc_msgSend(this.id, OS.sel_setMinDate_1, date !is null ? date.id : null); | |
173 } | |
174 | |
175 public void setTextColor (NSColor color) | |
176 { | |
177 OS.objc_msgSend(this.id, OS.sel_setTextColor_1, color !is null ? color.id : null); | |
178 } | |
179 | |
180 public void setTimeInterval (double newTimeInterval) | |
181 { | |
182 OS.objc_msgSend(this.id, OS.sel_setTimeInterval_1, newTimeInterval); | |
183 } | |
184 | |
185 public void setTimeZone (NSTimeZone newTimeZone) | |
186 { | |
187 OS.objc_msgSend(this.id, OS.sel_setTimeZone_1, newTimeZone !is null ? newTimeZone.id : null); | |
188 } | |
189 | |
190 public NSColor textColor () | |
191 { | |
192 objc.id result = OS.objc_msgSend(this.id, OS.sel_textColor); | |
193 return result !is null ? new NSColor(result) : null; | |
194 } | |
195 | |
196 public double timeInterval () | |
197 { | |
198 return OS.objc_msgSend_fpret(this.id, OS.sel_timeInterval); | |
199 } | |
200 | |
201 public NSTimeZone timeZone () | |
202 { | |
203 objc.id result = OS.objc_msgSend(this.id, OS.sel_timeZone); | |
204 return result !is null ? new NSTimeZone(result) : null; | |
205 } | |
206 | |
207 } |