Mercurial > projects > dwt-mac
comparison dwt/internal/cocoa/NSDatePickerCell.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.NSDatePickerCell; | |
15 | |
16 import dwt.internal.cocoa.NSActionCell; | |
17 import dwt.internal.cocoa.NSCalendar; | |
18 import dwt.internal.cocoa.NSColor; | |
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 NSDatePickerCell : NSActionCell | |
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 NSLocale locale () | |
83 { | |
84 objc.id result = OS.objc_msgSend(this.id, OS.sel_locale); | |
85 return result !is null ? new NSLocale(result) : null; | |
86 } | |
87 | |
88 public NSDate maxDate () | |
89 { | |
90 objc.id result = OS.objc_msgSend(this.id, OS.sel_maxDate); | |
91 return result !is null ? new NSDate(result) : null; | |
92 } | |
93 | |
94 public NSDate minDate () | |
95 { | |
96 objc.id result = OS.objc_msgSend(this.id, OS.sel_minDate); | |
97 return result !is null ? new NSDate(result) : null; | |
98 } | |
99 | |
100 public void setBackgroundColor (NSColor color) | |
101 { | |
102 OS.objc_msgSend(this.id, OS.sel_setBackgroundColor_1, color !is null ? color.id : null); | |
103 } | |
104 | |
105 public void setCalendar (NSCalendar newCalendar) | |
106 { | |
107 OS.objc_msgSend(this.id, OS.sel_setCalendar_1, newCalendar !is null ? newCalendar.id : null); | |
108 } | |
109 | |
110 public void setDatePickerElements (objc.id elementFlags) | |
111 { | |
112 OS.objc_msgSend(this.id, OS.sel_setDatePickerElements_1, elementFlags); | |
113 } | |
114 | |
115 public void setDatePickerMode (objc.id newMode) | |
116 { | |
117 OS.objc_msgSend(this.id, OS.sel_setDatePickerMode_1, newMode); | |
118 } | |
119 | |
120 public void setDatePickerStyle (objc.id newStyle) | |
121 { | |
122 OS.objc_msgSend(this.id, OS.sel_setDatePickerStyle_1, newStyle); | |
123 } | |
124 | |
125 public void setDateValue (NSDate newStartDate) | |
126 { | |
127 OS.objc_msgSend(this.id, OS.sel_setDateValue_1, newStartDate !is null ? newStartDate.id : null); | |
128 } | |
129 | |
130 public void setDelegate (id anObject) | |
131 { | |
132 OS.objc_msgSend(this.id, OS.sel_setDelegate_1, anObject !is null ? anObject.id : null); | |
133 } | |
134 | |
135 public void setDrawsBackground (bool flag) | |
136 { | |
137 OS.objc_msgSend(this.id, OS.sel_setDrawsBackground_1, flag); | |
138 } | |
139 | |
140 public void setLocale (NSLocale newLocale) | |
141 { | |
142 OS.objc_msgSend(this.id, OS.sel_setLocale_1, newLocale !is null ? newLocale.id : null); | |
143 } | |
144 | |
145 public void setMaxDate (NSDate date) | |
146 { | |
147 OS.objc_msgSend(this.id, OS.sel_setMaxDate_1, date !is null ? date.id : null); | |
148 } | |
149 | |
150 public void setMinDate (NSDate date) | |
151 { | |
152 OS.objc_msgSend(this.id, OS.sel_setMinDate_1, date !is null ? date.id : null); | |
153 } | |
154 | |
155 public void setTextColor (NSColor color) | |
156 { | |
157 OS.objc_msgSend(this.id, OS.sel_setTextColor_1, color !is null ? color.id : null); | |
158 } | |
159 | |
160 public void setTimeInterval (double newTimeInterval) | |
161 { | |
162 OS.objc_msgSend(this.id, OS.sel_setTimeInterval_1, newTimeInterval); | |
163 } | |
164 | |
165 public void setTimeZone (NSTimeZone newTimeZone) | |
166 { | |
167 OS.objc_msgSend(this.id, OS.sel_setTimeZone_1, newTimeZone !is null ? newTimeZone.id : null); | |
168 } | |
169 | |
170 public NSColor textColor () | |
171 { | |
172 objc.id result = OS.objc_msgSend(this.id, OS.sel_textColor); | |
173 return result !is null ? new NSColor(result) : null; | |
174 } | |
175 | |
176 public double timeInterval () | |
177 { | |
178 return OS.objc_msgSend_fpret(this.id, OS.sel_timeInterval); | |
179 } | |
180 | |
181 public NSTimeZone timeZone () | |
182 { | |
183 objc.id result = OS.objc_msgSend(this.id, OS.sel_timeZone); | |
184 return result !is null ? new NSTimeZone(result) : null; | |
185 } | |
186 | |
187 } |