#include <rechcol.h>
Inheritance diagram for ColourRecordHandler:
Public Member Functions | |
ColourRecordHandler () | |
~ColourRecordHandler () | |
virtual BOOL | BeginImport () |
Initialises the colour record handler. | |
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. | |
Protected Attributes | |
ColourListComponent * | pColComponent |
Private Member Functions | |
CC_DECLARE_DYNAMIC (ColourRecordHandler) |
Definition at line 125 of file rechcol.h.
|
Definition at line 131 of file rechcol.h. 00131 : CamelotRecordHandler() { pColComponent = NULL; }
|
|
Definition at line 132 of file rechcol.h.
|
|
Initialises the colour record handler.
Reimplemented from CXaraFileRecordHandler. Definition at line 134 of file rechcol.cpp. 00135 { 00136 pColComponent = GetColourDocComponent(); 00137 00138 return (pColComponent != NULL); 00139 }
|
|
|
|
Provides the record handler system with a list of records handled by this handler.
Implements CXaraFileRecordHandler. Definition at line 155 of file rechcol.cpp. 00156 { 00157 static UINT32 TagList[] = {TAG_DEFINERGBCOLOUR,TAG_DEFINECOMPLEXCOLOUR,CXFRH_TAG_LIST_END}; 00158 00159 return (UINT32*)&TagList; 00160 }
|
|
Handles the given record.
Implements CXaraFileRecordHandler. Definition at line 176 of file rechcol.cpp. 00177 { 00178 ERROR2IF(pCXaraFileRecord == NULL,FALSE,"ColourRecordHandler::HandleRecord pCXaraFileRecord is NULL"); 00179 00180 BOOL ok = TRUE; 00181 00182 switch (pCXaraFileRecord->GetTag()) 00183 { 00184 case TAG_DEFINERGBCOLOUR: 00185 // Ask the colour document component class to import that colour for us 00186 if (pColComponent) 00187 ok = pColComponent->ImportSimpleColour(pCXaraFileRecord); 00188 else 00189 ERROR3("ColourRecordHandler::HandleRecord no pColComponent"); 00190 break; 00191 case TAG_DEFINECOMPLEXCOLOUR: 00192 // Ask the colour document component class to import that colour for us 00193 if (pColComponent) 00194 ok = pColComponent->ImportColourDefinition(pCXaraFileRecord); 00195 else 00196 ERROR3("ColourRecordHandler::HandleRecord no pColComponent"); 00197 break; 00198 00199 default: 00200 ok = FALSE; 00201 ERROR3_PF(("ColourRecordHandler::HandleRecord I don't handle records with the tag (%d)\n",pCXaraFileRecord->GetTag())); 00202 break; 00203 } 00204 00205 return ok; 00206 }
|
|
|