Mercurial > projects > dwt-mac
view 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 |
line wrap: on
line source
/******************************************************************************* * Copyright (c) 2007 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation * * Port to the D Programming language: * Jacob Carlborg <jacob.carlborg@gmail.com> *******************************************************************************/ module dwt.internal.cocoa.NSDatePickerCell; import dwt.internal.cocoa.NSActionCell; import dwt.internal.cocoa.NSCalendar; import dwt.internal.cocoa.NSColor; import dwt.internal.cocoa.NSDate; import dwt.internal.cocoa.NSLocale; import dwt.internal.cocoa.NSTimeZone; import dwt.internal.cocoa.OS; import objc = dwt.internal.objc.runtime; public class NSDatePickerCell : NSActionCell { public this () { super(); } public this (objc.id id) { super(id); } public NSColor backgroundColor () { objc.id result = OS.objc_msgSend(this.id, OS.sel_backgroundColor); return result !is null ? new NSColor(result) : null; } public NSCalendar calendar () { objc.id result = OS.objc_msgSend(this.id, OS.sel_calendar); return result !is null ? new NSCalendar(result) : null; } public objc.id datePickerElements () { return OS.objc_msgSend(this.id, OS.sel_datePickerElements); } public objc.id datePickerMode () { return OS.objc_msgSend(this.id, OS.sel_datePickerMode); } public objc.id datePickerStyle () { return OS.objc_msgSend(this.id, OS.sel_datePickerStyle); } public NSDate dateValue () { objc.id result = OS.objc_msgSend(this.id, OS.sel_dateValue); return result !is null ? new NSDate(result) : null; } public id delegatee () { objc.id result = OS.objc_msgSend(this.id, OS.sel_delegate); return result !is null ? new id(result) : null; } public bool drawsBackground () { return OS.objc_msgSend(this.id, OS.sel_drawsBackground) !is null; } public NSLocale locale () { objc.id result = OS.objc_msgSend(this.id, OS.sel_locale); return result !is null ? new NSLocale(result) : null; } public NSDate maxDate () { objc.id result = OS.objc_msgSend(this.id, OS.sel_maxDate); return result !is null ? new NSDate(result) : null; } public NSDate minDate () { objc.id result = OS.objc_msgSend(this.id, OS.sel_minDate); return result !is null ? new NSDate(result) : null; } public void setBackgroundColor (NSColor color) { OS.objc_msgSend(this.id, OS.sel_setBackgroundColor_1, color !is null ? color.id : null); } public void setCalendar (NSCalendar newCalendar) { OS.objc_msgSend(this.id, OS.sel_setCalendar_1, newCalendar !is null ? newCalendar.id : null); } public void setDatePickerElements (objc.id elementFlags) { OS.objc_msgSend(this.id, OS.sel_setDatePickerElements_1, elementFlags); } public void setDatePickerMode (objc.id newMode) { OS.objc_msgSend(this.id, OS.sel_setDatePickerMode_1, newMode); } public void setDatePickerStyle (objc.id newStyle) { OS.objc_msgSend(this.id, OS.sel_setDatePickerStyle_1, newStyle); } public void setDateValue (NSDate newStartDate) { OS.objc_msgSend(this.id, OS.sel_setDateValue_1, newStartDate !is null ? newStartDate.id : null); } public void setDelegate (id anObject) { OS.objc_msgSend(this.id, OS.sel_setDelegate_1, anObject !is null ? anObject.id : null); } public void setDrawsBackground (bool flag) { OS.objc_msgSend(this.id, OS.sel_setDrawsBackground_1, flag); } public void setLocale (NSLocale newLocale) { OS.objc_msgSend(this.id, OS.sel_setLocale_1, newLocale !is null ? newLocale.id : null); } public void setMaxDate (NSDate date) { OS.objc_msgSend(this.id, OS.sel_setMaxDate_1, date !is null ? date.id : null); } public void setMinDate (NSDate date) { OS.objc_msgSend(this.id, OS.sel_setMinDate_1, date !is null ? date.id : null); } public void setTextColor (NSColor color) { OS.objc_msgSend(this.id, OS.sel_setTextColor_1, color !is null ? color.id : null); } public void setTimeInterval (double newTimeInterval) { OS.objc_msgSend(this.id, OS.sel_setTimeInterval_1, newTimeInterval); } public void setTimeZone (NSTimeZone newTimeZone) { OS.objc_msgSend(this.id, OS.sel_setTimeZone_1, newTimeZone !is null ? newTimeZone.id : null); } public NSColor textColor () { objc.id result = OS.objc_msgSend(this.id, OS.sel_textColor); return result !is null ? new NSColor(result) : null; } public double timeInterval () { return OS.objc_msgSend_fpret(this.id, OS.sel_timeInterval); } public NSTimeZone timeZone () { objc.id result = OS.objc_msgSend(this.id, OS.sel_timeZone); return result !is null ? new NSTimeZone(result) : null; } }