![]() |
PMSheetDoneProcPtr |
||||
Header: | PMApplication.h | Carbon status: | Under Evaluation | |
Defines a pointer to a sheet done function. The Carbon Printing Manager calls your sheet done function when the user dismisses a printing dialog that is being shown as a sheet.
typedef void(* PMSheetDoneProcPtr) ( PMPrintSession printSession, WindowRef documentWindow, Boolean accepted );
You would declare your function like this if you were to name it MyPMSheetDoneCallback:
void MyPMSheetDoneCallback ( PMPrintSession printSession, WindowRef documentWindow, Boolean accepted );
A PMPrintSession object.
The WindowRef object that the printing dialog sheet was attached to.
Set to true if the user accepted the dialog or false if the user clicked the Cancel button.
You pass a pointer to your sheet done function as a parameter to the PMSessionUseSheets function. The Carbon Printing Manager calls your sheet done function when the user dismisses the printing dialog. Your sheet done function should check to see if the dialog was accepted and, depending on whether the Page Setup or Print dialog was being shown, take appropriate action.
To provide a pointer to your sheet done function, you create a universal procedure pointer (UPP) of type PMSheetDoneUPP, using the function NewPMSheetDoneUPP. You can do so with code like the following:
PMSheetDoneUPP MyPrintSheetDoneUPP;MyPrintSheetDoneUPP =NewPMSheetDoneUPP ( &MyPrintSheetDoneProc );
If you wish to call your sheet done function directly, you can use the InvokePMSheetDoneUPP function.
When your print job is completed, you should use the DisposePMSheetDoneUPP function to dispose of the universal procedure pointer associated with your sheet done function. However, if you will use the same sheet done function in subsequent print jobs, you can reuse the same UPP, rather than dispose of it and later create a new UPP.
Valid within the context of a printing session.
© 2000 Apple Computer, Inc. (Last Updated 7/17/2000)