comparison dwt/printing/PrintDialog.d @ 7:e831403a80a9

Add 'cast' to casts
author Frank Benoit <benoit@tionex.de>
date Wed, 27 Aug 2008 14:30:35 +0200
parents 1a8b3cb347e0
children d8635bb48c7c
comparison
equal deleted inserted replaced
6:b903c16b6f48 7:e831403a80a9
124 * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> 124 * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
125 * </ul> 125 * </ul>
126 */ 126 */
127 public PrinterData open() { 127 public PrinterData open() {
128 NSPrintPanel panel = NSPrintPanel.printPanel(); 128 NSPrintPanel panel = NSPrintPanel.printPanel();
129 NSPrintInfo printInfo =(NSPrintInfo)new NSPrintInfo().alloc(); 129 NSPrintInfo printInfo =cast(NSPrintInfo)new NSPrintInfo().alloc();
130 printInfo.initWithDictionary(null); 130 printInfo.initWithDictionary(null);
131 panel.runModalWithPrintInfo(printInfo); 131 panel.runModalWithPrintInfo(printInfo);
132 printInfo.release(); 132 printInfo.release();
133 // int[] buffer = new int[1]; 133 // int[] buffer = new int[1];
134 // if (OS.PMCreateSession(buffer) is OS.noErr) { 134 // if (OS.PMCreateSession(buffer) is OS.noErr) {
137 // int printSettings = buffer[0]; 137 // int printSettings = buffer[0];
138 // OS.PMSessionDefaultPrintSettings(printSession, printSettings); 138 // OS.PMSessionDefaultPrintSettings(printSession, printSettings);
139 // if (OS.PMCreatePageFormat(buffer) is OS.noErr) { 139 // if (OS.PMCreatePageFormat(buffer) is OS.noErr) {
140 // int pageFormat = buffer[0]; 140 // int pageFormat = buffer[0];
141 // OS.PMSessionDefaultPageFormat(printSession, pageFormat); 141 // OS.PMSessionDefaultPageFormat(printSession, pageFormat);
142 // OS.PMSessionSetDestination(printSession, printSettings, (short) (printToFile ? OS.kPMDestinationFile : OS.kPMDestinationPrinter), 0, 0); 142 // OS.PMSessionSetDestination(printSession, printSettings, cast(short) (printToFile ? OS.kPMDestinationFile : OS.kPMDestinationPrinter), 0, 0);
143 // if (scope is PrinterData.PAGE_RANGE) { 143 // if (scope is PrinterData.PAGE_RANGE) {
144 // OS.PMSetFirstPage(printSettings, startPage, false); 144 // OS.PMSetFirstPage(printSettings, startPage, false);
145 // OS.PMSetLastPage(printSettings, endPage, false); 145 // OS.PMSetLastPage(printSettings, endPage, false);
146 // OS.PMSetPageRange(printSettings, startPage, endPage); 146 // OS.PMSetPageRange(printSettings, startPage, endPage);
147 // } else { 147 // } else {