DekGenius.com
[ Team LiB ] Previous Section Next Section

NSPrintPanel Mac OS X 10.0

This class provides the Mac OS X Print panel interface for Cocoa applications. To obtain an instance of NSPrintPanel, use the class method printPanel. The panel is displayed and run when the runModal method is invoked, which will display the print panel as a window. It is also possible to display the print panel as a sheet attached to the document window; this is done with the method beginSheetWithPrintInfo:modalFor-Window: delegate:didEndSelector:contextInfo:.

Cocoa allows you to attach an accessory view to the print panel, providing an interface for users to configure options related to how your application handles printing. To set the accessory view, use the method setAccessoryView:.

figs/cocn_1573.gif

@interface NSPrintPanel : NSObject
 // Accessor Methods
   - (void)setAccessoryView:(NSView *)aView;
   - (NSView *)accessoryView;
   - (void)setJobStyleHint:(NSString *)hint;
   - (NSString *)jobStyleHint;
 // Class Methods
   + (NSPrintPanel *)printPanel;
 // Instance Methods
   - (void)beginSheetWithPrintInfo:(NSPrintInfo *)printInfo modalForWindow:(NSWindow *)docWindow
        delegate:(id)delegate didEndSelector:(SEL)didEndSelector contextInfo:(void *)contextInfo;
   - (void)finalWritePrintInfo;
   - (void)pickedAllPages:(id)sender;
   - (void)pickedButton:(id)sender;
   - (void)pickedLayoutList:(id)sender;
   - (int)runModal;
   - (void)updateFromPrintInfo;

    [ Team LiB ] Previous Section Next Section