OpPrint Class Reference

This class represents all the Printing operations. More...

#include <printing.h>

Inheritance diagram for OpPrint:

Operation MessageHandler ListItem CCObject SimpleCCObject List of all members.

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 ()

Detailed Description

This class represents all the Printing operations.

Author:
Mario_Shamtani (Xara Group Ltd) <camelotdev@xara.com>
Date:
12/8/93
See also:
OpPrint

Definition at line 123 of file printing.h.


Constructor & Destructor Documentation

OpPrint::OpPrint  ) 
 

Constructs a new OpPrint object: setting default operation flags, and adding it to the Live list.

Author:
Mario_Shamtani (Xara Group Ltd) <camelotdev@xara.com>
Date:
1/11/93
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
-

Definition at line 141 of file printing.cpp.

00141                 : Operation()
00142 {                 
00143 }


Member Function Documentation

static void OpPrint::Deinitialise  )  [inline, static]
 

Definition at line 135 of file printing.h.

00135 {}

void OpPrint::Do OpDescriptor WhichOp  )  [virtual]
 

Actually do appropriate print function. Print Functions available include Print, Print setup and Print preview.

Author:
Andy_Pennell (Xara Group Ltd) <camelotdev@xara.com>
Date:
16/7/93
Parameters:
A pointer to OpDescriptor - allows selection of appropriate print routine. [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

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 }

OpState OpPrint::GetState String_256 ,
OpDescriptor WhichOp
[static]
 

Menu state for Print item.

Author:
Andy_Pennell (Xara Group Ltd) <camelotdev@xara.com>
Date:
16/7/93
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
Not ticked and not greyed

Errors: -

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 }

BOOL OpPrint::Init void   )  [static]
 

Initialises all the print operation OpDescriptors..

Author:
Andy_Pennell (Xara Group Ltd) <camelotdev@xara.com>
Date:
16/7/93
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
TRUE if successully created all necessary opdescriptors.

Errors: -

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 }


The documentation for this class was generated from the following files:
Generated on Sat Nov 10 03:58:41 2007 for Camelot by  doxygen 1.4.4