Mercurial > projects > dwt-mac
view 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 |
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.NSDatePicker; import dwt.internal.cocoa.id; import dwt.internal.cocoa.NSCalendar; import dwt.internal.cocoa.NSColor; import dwt.internal.cocoa.NSControl; 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 NSDatePicker : NSControl { 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 bool isBezeled () { return OS.objc_msgSend(this.id_, OS.sel_isBezeled) !is null; } public bool isBordered () { return OS.objc_msgSend(this.id_, OS.sel_isBordered) !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 setBezeled (bool flag) { OS.objc_msgSend(this.id_, OS.sel_setBezeled_1, flag); } public void setBordered (bool flag) { OS.objc_msgSend(this.id_, OS.sel_setBordered_1, flag); } 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; } }