Mercurial > projects > dwt-mac
comparison dwt/internal/cocoa/NSPageLayout.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.NSPageLayout; | |
15 | |
16 import dwt.internal.cocoa.NSArray; | |
17 import dwt.internal.cocoa.NSObject; | |
18 import dwt.internal.cocoa.NSPageLayout; | |
19 import dwt.internal.cocoa.NSPrintInfo; | |
20 import dwt.internal.cocoa.NSView; | |
21 import dwt.internal.cocoa.NSViewController; | |
22 import dwt.internal.cocoa.NSWindow; | |
23 import dwt.internal.cocoa.OS; | |
24 import objc = dwt.internal.objc.runtime; | |
25 | |
26 public class NSPageLayout : NSObject | |
27 { | |
28 | |
29 public this () | |
30 { | |
31 super(); | |
32 } | |
33 | |
34 public this (objc.id id) | |
35 { | |
36 super(id); | |
37 } | |
38 | |
39 public NSArray accessoryControllers () | |
40 { | |
41 objc.id result = OS.objc_msgSend(this.id, OS.sel_accessoryControllers); | |
42 return result !is null ? new NSArray(result) : null; | |
43 } | |
44 | |
45 public NSView accessoryView () | |
46 { | |
47 objc.id result = OS.objc_msgSend(this.id, OS.sel_accessoryView); | |
48 return result !is null ? new NSView(result) : null; | |
49 } | |
50 | |
51 public void addAccessoryController (NSViewController accessoryController) | |
52 { | |
53 OS.objc_msgSend(this.id, OS.sel_addAccessoryController_1, accessoryController !is null ? accessoryController.id : null); | |
54 } | |
55 | |
56 public void beginSheetWithPrintInfo (NSPrintInfo printInfo, NSWindow docWindow, id delegatee, objc.SEL didEndSelector, void* contextInfo) | |
57 { | |
58 OS.objc_msgSend(this.id, OS.sel_beginSheetWithPrintInfo_1modalForWindow_1delegate_1didEndSelector_1contextInfo_1, | |
59 printInfo !is null ? printInfo.id : null, docWindow !is null ? docWindow.id : null, delegatee !is null ? delegatee.id : null, | |
60 didEndSelector, contextInfo); | |
61 } | |
62 | |
63 public static NSPageLayout pageLayout () | |
64 { | |
65 objc.id result = OS.objc_msgSend(OS.class_NSPageLayout, OS.sel_pageLayout); | |
66 return result !is null ? new NSPageLayout(result) : null; | |
67 } | |
68 | |
69 public NSPrintInfo printInfo () | |
70 { | |
71 objc.id result = OS.objc_msgSend(this.id, OS.sel_printInfo); | |
72 return result !is null ? new NSPrintInfo(result) : null; | |
73 } | |
74 | |
75 public void readPrintInfo () | |
76 { | |
77 OS.objc_msgSend(this.id, OS.sel_readPrintInfo); | |
78 } | |
79 | |
80 public void removeAccessoryController (NSViewController accessoryController) | |
81 { | |
82 OS.objc_msgSend(this.id, OS.sel_removeAccessoryController_1, accessoryController !is null ? accessoryController.id : null); | |
83 } | |
84 | |
85 public NSInteger runModal () | |
86 { | |
87 return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_runModal); | |
88 } | |
89 | |
90 public NSInteger runModalWithPrintInfo (NSPrintInfo printInfo) | |
91 { | |
92 return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_runModalWithPrintInfo_1, printInfo !is null ? printInfo.id : null); | |
93 } | |
94 | |
95 public void setAccessoryView (NSView accessoryView) | |
96 { | |
97 OS.objc_msgSend(this.id, OS.sel_setAccessoryView_1, accessoryView !is null ? accessoryView.id : null); | |
98 } | |
99 | |
100 public void writePrintInfo () | |
101 { | |
102 OS.objc_msgSend(this.id, OS.sel_writePrintInfo); | |
103 } | |
104 | |
105 } |