Instance Method インスタンスメソッド

PDEPanelsForType:withHostInfo:

Returns an array of panes to be added to a printing dialog.

Declaration 宣言

- (NSArray *)PDEPanelsForType:(NSString *)pdeType 
                 withHostInfo:(id)host;

Parameters パラメータ

pdeType

A constant, provided by the printing system, that indicates the type of panes this method should return. The constants are defined in PMPrintingDialogExtensions.h. There are three possible values:

kAppPageSetupDialogTypeIDStr

This an application plug-in and the panes you return are added to the Page Setup dialog.

kAppPrintDialogTypeIDStr

This an application plug-in and the panes you return are added to the Print dialog.

kPrinterModuleTypeIDStr

This is a printer driver plug-in and the panes you return are added to the Print dialog.

host

An object, provided by the printing system, that implements the methods in the PDEPlugInCallbackProtocol informal protocol. A Cocoa PDE can use the host to obtain information about the current print job. For example: 例えば:

  • Your PDE can use the host to obtain the PMPrintSettings or PMPageFormat object to save a custom pane’s settings.

  • If your PDE has printer-specific panes, the PDE can use the host to obtain the PMPrinter object to aid in determining the panes that should be available.

Return Value 戻り値

An array of objects conforming to the PDEPanel informal protocol. Each object represents a pane to be added to the dialog. You may return either nil or an empty array if no panes should be used.

Discussion 解説

In this required method, your PDE should use the information provided in the parameters to determine which pane objects, if any, should be created and returned to the printing system. Your PDE should also retain the host object for later use.