#include <rechprnt.h>
Inheritance diagram for PrintingRecordHandler:
Public Member Functions | |
PrintingRecordHandler () | |
~PrintingRecordHandler () | |
virtual BOOL | BeginImport () |
Initialises the record handler ready for importing. | |
virtual UINT32 * | GetTagList () |
Provides the record handler system with a list of records handled by this handler. | |
virtual BOOL | HandleRecord (CXaraFileRecord *pCXaraFileRecord) |
Handles the given record. | |
virtual BOOL | BeginSubtree (UINT32 Tag) |
Informs the record handler that a subtree is following a tag of type 'Tag'. | |
virtual BOOL | EndSubtree (UINT32 Tag) |
Informs the record handler that a subtree that followed a tag of type 'Tag' has ended. | |
Private Member Functions | |
CC_DECLARE_DYNAMIC (PrintingRecordHandler) | |
Private Attributes | |
PrintComponent * | pPrintComponent |
PrintMarksComponent * | pPrintMarksComponent |
Definition at line 128 of file rechprnt.h.
|
Definition at line 133 of file rechprnt.h. 00133 : CamelotRecordHandler() { pPrintComponent = NULL; pPrintMarksComponent = NULL; }
|
|
Definition at line 134 of file rechprnt.h.
|
|
Initialises the record handler ready for importing.
Reimplemented from CXaraFileRecordHandler. Definition at line 132 of file rechprnt.cpp. 00133 { 00134 #if !defined(EXCLUDE_FROM_RALPH) && !defined(EXCLUDE_FROM_XARALX) 00135 pPrintComponent = GetPrintComponent(); 00136 00137 // Let's not faff around for the print marks component - just find it for ourselves 00138 Document *ScopeDoc = GetDocument(); 00139 if (ScopeDoc != NULL) 00140 { 00141 pPrintMarksComponent = (PrintMarksComponent *) 00142 ScopeDoc->GetDocComponent(CC_RUNTIME_CLASS(PrintMarksComponent)); 00143 } 00144 00145 return (pPrintComponent != NULL && pPrintMarksComponent != NULL); 00146 #else 00147 return TRUE; 00148 #endif 00149 }
|
|
Informs the record handler that a subtree is following a tag of type 'Tag'.
Reimplemented from CXaraFileRecordHandler. Definition at line 264 of file rechprnt.cpp. 00265 { 00266 // We only want to know about following subtrees when doing custom print mark records. 00267 // If we are doing one, then we grab the subtree so nobody else can faff about with it 00268 if (Tag != TAG_PRINTMARKCUSTOM) 00269 return(FALSE); 00270 00271 return(TRUE); 00272 }
|
|
|
|
Informs the record handler that a subtree that followed a tag of type 'Tag' has ended.
Reimplemented from CXaraFileRecordHandler. Definition at line 294 of file rechprnt.cpp. 00295 { 00296 // We only want to know about following subtrees when doing custom print mark records. 00297 // If we are doing one, then we grab the subtree so nobody else can faff about with it 00298 if (Tag != TAG_PRINTMARKCUSTOM) 00299 return(FALSE); 00300 00301 #if !defined(EXCLUDE_FROM_RALPH) && !defined(EXCLUDE_FROM_XARALX) 00302 // OK, it is the end of a custom print mark record, so complete the import 00303 if (pPrintMarksComponent && !IsImporting()) 00304 pPrintMarksComponent->EndImportCustomPrintMark(this); 00305 #endif 00306 00307 return(TRUE); 00308 }
|
|
Provides the record handler system with a list of records handled by this handler.
Implements CXaraFileRecordHandler. Definition at line 166 of file rechprnt.cpp. 00167 { 00168 static UINT32 TagList[] = 00169 { 00170 TAG_PRINTERSETTINGS, 00171 TAG_IMAGESETTING, 00172 TAG_COLOURPLATE, 00173 TAG_PRINTMARKDEFAULT, 00174 TAG_PRINTMARKCUSTOM, 00175 CXFRH_TAG_LIST_END 00176 }; 00177 00178 return(TagList); 00179 }
|
|
Handles the given record.
Implements CXaraFileRecordHandler. Definition at line 199 of file rechprnt.cpp. 00200 { 00201 ERROR2IF(pCXaraFileRecord == NULL, FALSE, "PrintingRecordHandler::HandleRecord pCXaraFileRecord is NULL"); 00202 00203 #if !defined(EXCLUDE_FROM_RALPH) && !defined(EXCLUDE_FROM_XARALX) 00204 // When we're "opening" a file, we load, but if we're "importing" then we ignore all 00205 // printing options from the imported file (we don't want to override the existing 00206 // settings when you import into a different document) 00207 if (IsImporting()) 00208 return(TRUE); 00209 00210 switch (pCXaraFileRecord->GetTag()) 00211 { 00212 case TAG_PRINTERSETTINGS: 00213 if (pPrintComponent) 00214 pPrintComponent->ImportPrintSettings(pCXaraFileRecord); 00215 break; 00216 00217 case TAG_IMAGESETTING: 00218 if (pPrintComponent) 00219 pPrintComponent->ImportImagesetting(pCXaraFileRecord); 00220 break; 00221 00222 case TAG_COLOURPLATE: 00223 if (pPrintComponent) 00224 pPrintComponent->ImportColourPlate(pCXaraFileRecord, this); 00225 break; 00226 00227 case TAG_PRINTMARKDEFAULT: 00228 if (pPrintMarksComponent) 00229 pPrintMarksComponent->ImportDefaultPrintMark(pCXaraFileRecord); 00230 break; 00231 00232 case TAG_PRINTMARKCUSTOM: 00233 if (pPrintMarksComponent) 00234 pPrintMarksComponent->StartImportCustomPrintMark(this, pCXaraFileRecord); 00235 break; 00236 00237 default: 00238 ERROR3_PF(("PrintingRecordHandler::HandleRecord doesn't handle records with the tag (%d)\n",pCXaraFileRecord->GetTag())); 00239 return(FALSE); 00240 } 00241 #endif 00242 return(TRUE); 00243 }
|
|
Definition at line 151 of file rechprnt.h. |
|
Definition at line 152 of file rechprnt.h. |