Return to the Alphabetic Index
Return to the Class Browser
Return to the Picture Browser
Copyright (c) 1994 by NeXT Computer, Inc. All Rights Reserved.

NSPageLayout

Inherits From: NSPanel : NSWindow : NSResponder : NSObject

Conforms To: NSCoding (NSResponder) NSObject (NSObject)

Declared In: AppKit/NSPageLayout.h

Class Description

NSPageLayout is a type of NSPanel that queries the user for information such as paper type and orientation. This information is stored in an NSPrintInfo object, and is later used when printing. The NSPageLayout panel is created, displayed, and run (in a modal loop) when a runPageLayout: message is sent to the NSApplication object. By default, this message is sent up the responder chain when the user clicks the Page Layout menu item.

Typically, you access an NSPageLayout panel by invoking the pageLayout method. When the class receives a pageLayout message, it tries to reuse an existing panel rather than create a new one. If a panel is reused, its attributes are reset to the default values so that the effect is the same as receiving a new panel. Because Page Layout panels may be reused, you shouldn't modify the instance returned by pageLayout, except through the methods listed below. If you must modify the Page Layout panel in other ways than those allowed by its methods, create and manage your own instance using the alloc... and init... methods rather than the pageLayout method.

You can add your own controls to the Page Layout panel through the setAccessoryView: method. The panel is automatically resized to accommodate the NSView that you've added. Note that you can't retrieve the NSPageLayout's settings through messages to the page layout panel objectNSPageLayout does not have accessor methods to obtain the state of its controls. If controls you add through an accessory view need to know the values of the existing controls in the page layout panel (or vice versa), access NSPageLayout's controls using the tags defined in AppKit/NSPageLayout.h as arguments to viewWithTag: messages to the page layout panel object. Controls thus returned can then be queried for their state.

Creating an NSPageLayout Instance

Running the Panel

Customizing the Panel

Updating the Panel's Display

Communicating with the NSPrintInfo Object