Inherits from | |
Conforms to | |
Framework | /System/Library/Frameworks/AppKit.framework |
Availability | Available in Mac OS X v10.0 and later. |
Companion guide | |
Declared in | NSPageLayout.h |
Related sample code |
NSPageLayout
is a panel that queries the user for information such as paper type and orientation. It is normally displayed in response to the user selecting the Page Setup menu item. You obtain an instance with the pageLayout
class method. The pane can then be run as a sheet using beginSheetWithPrintInfo:modalForWindow:delegate:didEndSelector:contextInfo:
or modally using runModal
or runModalWithPrintInfo:
.
– beginSheetWithPrintInfo:modalForWindow:delegate:didEndSelector:contextInfo:
– runModal
– runModalWithPrintInfo:
– accessoryView
Deprecated in Mac OS X v10.5
– readPrintInfo
Deprecated in Mac OS X v10.5
– setAccessoryView:
Deprecated in Mac OS X v10.5
– writePrintInfo
Deprecated in Mac OS X v10.5
Returns a newly created NSPageLayout
object.
+ (NSPageLayout *)pageLayout
NSPageLayout.h
Returns an array of accessory view controllers belonging to the receiver.
- (NSArray *)accessoryControllers
The NSViewController
instances representing the accessory view controllers belonging to the receiver.
NSPageLayout.h
Adds the given controller of an accessory view to be presented in the page setup panel.
- (void)addAccessoryController:(NSViewController *)accessoryController
The controller to add.
NSPageLayout.h
Presents a page setup sheet for the given NSPrintInfo
object, document-modal relative to the given window.
- (void)beginSheetWithPrintInfo:(NSPrintInfo *)printInfo modalForWindow:(NSWindow *)docWindow delegate:(id)delegate didEndSelector:(SEL)didEndSelector contextInfo:(void *)contextInfo
The NSPrintInfo
object to use.
The window to which the sheet is attached.
The delegate to which didEndSelector is sent. Can be nil
.
The selector sent to the delegate. Can be nil
.
Context information object passed with didEndSelector.
The didEndSelector argument must have the same signature as:
- (void)pageLayoutDidEnd:(NSPageLayout *)pageLayout returnCode:(int)returnCode contextInfo: (void *)contextInfo; |
The value passed as returnCode is either NSCancelButton
or NSOKButton
.
NSPageLayout.h
Returns the NSPrintInfo
object used when the receiver is run.
- (NSPrintInfo *)printInfo
The NSPrintInfo object is set using the beginSheetWithPrintInfo:modalForWindow:delegate:didEndSelector:contextInfo:
or runModalWithPrintInfo:
method. The shared NSPrintInfo object is used if the receiver is run using runModal
.
NSPageLayout.h
Removes the given controller of an accessory view.
- (void)removeAccessoryController:(NSViewController *)accessoryController
The controller to remove.
NSPageLayout.h
Displays the receiver and begins the modal loop using the shared NSPrintInfo
object.
- (NSInteger)runModal
NSCancelButton
if the user clicks the Cancel button; otherwise, NSOKButton
.
The receiver’s values are recorded in the shared NSPrintInfo
object.
NSPageLayout.h
Displays the receiver and begins the modal loop using the given NSPrintInfo
object.
- (NSInteger)runModalWithPrintInfo:(NSPrintInfo *)printInfo
The NSPrintInfo
object to use.
NSCancelButton
if the user clicks the Cancel button; otherwise, NSOKButton
.
The receiver’s values are recorded in printInfo.
NSPageLayout.h
© 2007 Apple Inc. All Rights Reserved. (Last updated: 2007-04-11)