Mercurial > projects > dwt-mac
view dwt/internal/cocoa/NSPrintPanel.d @ 123:63a09873578e
Fixed compile errors
author | Jacob Carlborg <doob@me.com> |
---|---|
date | Thu, 15 Jan 2009 23:08:54 +0100 |
parents | d8635bb48c7c |
children |
line wrap: on
line source
/******************************************************************************* * Copyright (c) 2000, 2008 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 <doob@me.com> *******************************************************************************/ module dwt.internal.cocoa.NSPrintPanel; import dwt.dwthelper.utils; import cocoa = dwt.internal.cocoa.id; import dwt.internal.cocoa.NSObject; import dwt.internal.cocoa.NSPrintInfo; import dwt.internal.cocoa.OS; import dwt.internal.objc.cocoa.Cocoa; import objc = dwt.internal.objc.runtime; public class NSPrintPanel : NSObject { public this() { super(); } public this(objc.id id) { super(id); } public this(cocoa.id id) { super(id); } public NSPrintPanelOptions options() { return cast(NSPrintPanelOptions) OS.objc_msgSend(this.id, OS.sel_options); } public static NSPrintPanel printPanel() { objc.id result = OS.objc_msgSend(OS.class_NSPrintPanel, OS.sel_printPanel); return result !is null ? new NSPrintPanel(result) : null; } public NSInteger runModalWithPrintInfo(NSPrintInfo printInfo) { return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_runModalWithPrintInfo_, printInfo !is null ? printInfo.id : null); } public void setOptions(NSPrintPanelOptions options) { OS.objc_msgSend(this.id, OS.sel_setOptions_, options); } }