#include <printing.h>
Inheritance diagram for OpPrint:
Public Member Functions | |
OpPrint () | |
Constructs a new OpPrint object: setting default operation flags, and adding it to the Live list. | |
void | Do (OpDescriptor *) |
Actually do appropriate print function. Print Functions available include Print, Print setup and Print preview. | |
Static Public Member Functions | |
static BOOL | Init () |
Initialises all the print operation OpDescriptors.. | |
static OpState | GetState (String_256 *, OpDescriptor *) |
Menu state for Print item. | |
static void | Deinitialise () |
Definition at line 123 of file printing.h.
|
Constructs a new OpPrint object: setting default operation flags, and adding it to the Live list.
Definition at line 141 of file printing.cpp. 00141 : Operation() 00142 { 00143 }
|
|
Definition at line 135 of file printing.h.
|
|
Actually do appropriate print function. Print Functions available include Print, Print setup and Print preview.
Reimplemented from Operation. Definition at line 186 of file printing.cpp. 00187 { 00188 if ((WhichOp->Token) == (String(OPTOKEN_PRINT))) 00189 PrintAction(); 00190 else if ((WhichOp->Token) == (String(OPTOKEN_PRINT_SETUP))) 00191 PrintSetupAction(); 00192 else if ((WhichOp->Token) == (String(OPTOKEN_PRINT_PREVIEW))) 00193 PrintPreviewAction(); 00194 00195 End(); 00196 }
|
|
Menu state for Print item.
Definition at line 161 of file printing.cpp. 00162 { 00163 BOOL ForceGreyed = FALSE; 00164 if ((WhichOp->Token) == (String(OPTOKEN_PRINT_SETUP))) 00165 ForceGreyed=!CCPrintInfo::HasPrintSetup(); 00166 // not ticked, greyed only if already printing (or the print dialog is open). 00167 return OpState( FALSE, PrintMonitor::IsPrintingActive() || ForceGreyed); 00168 }
|
|
Initialises all the print operation OpDescriptors..
Reimplemented from SimpleCCObject. Definition at line 213 of file printing.cpp. 00214 { 00215 BOOL InitOK = TRUE; 00216 00217 InitOK = RegisterOpDescriptor( 00218 0, // Tool ID 00219 _R(IDS_FILE_PRINT), // String resource ID 00220 CC_RUNTIME_CLASS(OpPrint), // Runtime class 00221 OPTOKEN_PRINT, // Token string 00222 OpPrint::GetState, // GetState function 00223 HID_FILE_PRINT, // help ID 00224 _R(IDBBL_PRINTOP), // bubble help 00225 _R(IDD_BARCONTROLSTORE), // resource ID 00226 _R(IDC_BTN_FILEPRINT), // control ID 00227 SYSTEMBAR_FILE, // Bar ID 00228 TRUE, // Recieve system messages 00229 FALSE, // Smart duplicate operation 00230 TRUE, // Clean operation 00231 0, // No vertical counterpart 00232 _R(IDS_FILE_PRINT_ONE), // String for one copy only error 00233 (DONT_GREY_WHEN_SELECT_INSIDE | GREY_WHEN_NO_CURRENT_DOC) // Auto state flags 00234 ); 00235 ERRORIF(!InitOK, _R(IDE_NOMORE_MEMORY), FALSE); 00236 00237 00238 InitOK = RegisterOpDescriptor( 00239 0, // Tool ID 00240 _R(IDS_FILE_PRINT_SETUP), // String resource ID 00241 CC_RUNTIME_CLASS(OpPrint), // Runtime class 00242 OPTOKEN_PRINT_SETUP, // Token string 00243 OpPrint::GetState, // GetState function 00244 HID_FILE_PRINT_SETUP, // help ID 00245 _R(IDBBL_PSETUPOP), // bubble help 00246 _R(IDD_BARCONTROLSTORE), // resource ID 00247 _R(IDC_PRINTSETUP), // control ID 00248 SYSTEMBAR_FILE, // Bar ID 00249 TRUE, // Recieve system messages 00250 FALSE, // Smart duplicate operation 00251 TRUE, // Clean operation 00252 0, // No vertical counterpart 00253 0, // String for one copy only error 00254 (DONT_GREY_WHEN_SELECT_INSIDE | GREY_WHEN_NO_CURRENT_DOC) // Auto state flags 00255 ); 00256 ERRORIF(!InitOK, _R(IDE_NOMORE_MEMORY), FALSE); 00257 00258 OpDescriptor* PPreviewOp = new OpDescriptor( 00259 0, 00260 _R(IDS_FILE_PRINT_PREVIEW), 00261 CC_RUNTIME_CLASS(OpPrint), 00262 OPTOKEN_PRINT_PREVIEW, 00263 OpPrint::GetState, 00264 HID_FILE_PRINT_PREVIEW, 00265 _R(IDBBL_PPREVIEWOP), 00266 0 /* bitmap ID */); 00267 00268 ERRORIF(!PPreviewOp, _R(IDE_NOMORE_MEMORY), FALSE); 00269 00270 return TRUE; 00271 }
|