#include <nodebev.h>
Inheritance diagram for BevelRecordHandler:
Public Member Functions | |
BevelRecordHandler () | |
Constructor. | |
~BevelRecordHandler () | |
Destructor. | |
virtual UINT32 * | GetTagList () |
Gets the tag list for this handler to handle. | |
virtual BOOL | HandleRecord (CXaraFileRecord *pCXaraFileRecord) |
Handles the bevel record - basically creates a BevelController node & creates all the attributes. | |
Private Member Functions | |
CC_DECLARE_DYNCREATE (BevelRecordHandler) | |
Private Attributes | |
NodeBevelController * | m_pBevelController |
NodeBevel * | m_pBevelInk |
Definition at line 401 of file nodebev.h.
|
Constructor.
Definition at line 3285 of file nodebev.cpp.
|
|
Destructor.
Definition at line 3298 of file nodebev.cpp.
|
|
|
|
Gets the tag list for this handler to handle.
Implements CXaraFileRecordHandler. Definition at line 3311 of file nodebev.cpp. 03312 { 03313 static const UINT32 TagList[] = {TAG_BEVEL, 03314 TAG_BEVATTR_INDENT, 03315 TAG_BEVATTR_LIGHTANGLE, 03316 TAG_BEVATTR_CONTRAST, 03317 TAG_BEVATTR_TYPE, 03318 TAG_BEVELINK, 03319 CXFRH_TAG_LIST_END}; 03320 return (UINT32*)&TagList; 03321 }
|
|
Handles the bevel record - basically creates a BevelController node & creates all the attributes.
Implements CXaraFileRecordHandler. Definition at line 3333 of file nodebev.cpp. 03334 { 03335 // load in the bevel information and the source path for the node 03336 // create the bevel node and include in the tree 03337 03338 // AttrBevelIndent * pBevIndent = NULL; 03339 // AttrBevelLightAngle * pBevLightAngle = NULL; 03340 // AttrBevelContrast * pBevContrast = NULL; 03341 // AttrBevelType * pBevType = NULL; 03342 03343 INT32 value = 0; 03344 03345 if (pCXaraFileRecord->GetTag() == TAG_BEVEL) 03346 { 03347 m_pBevelController = new NodeBevelController(); 03348 03349 if (!m_pBevelController) 03350 { 03351 ERROR(_R(IDE_NOMORE_MEMORY), FALSE); 03352 } 03353 03354 BOOL ok = m_pBevelController->LoadBevelFromRecord(pCXaraFileRecord); 03355 if (!ok) 03356 { 03357 delete m_pBevelController ; 03358 m_pBevelController = NULL; 03359 return FALSE; 03360 } 03361 03362 // insert it into the tree 03363 InsertNode(m_pBevelController); 03364 } 03365 else if (pCXaraFileRecord->GetTag() == TAG_BEVELINK) 03366 { 03367 // create the bevel node an insert it 03368 m_pBevelInk = new NodeBevel; 03369 03370 if (!m_pBevelInk) 03371 { 03372 ERROR(_R(IDE_NOMORE_MEMORY), FALSE); 03373 } 03374 03375 InsertNode(m_pBevelInk); 03376 m_pBevelInk->InvalidateMe(); 03377 } 03378 else if (pCXaraFileRecord->GetTag() == TAG_BEVATTR_INDENT) 03379 { 03380 // read the record 03381 if (!pCXaraFileRecord->ReadINT32(&value)) 03382 return FALSE; 03383 } 03384 else if (pCXaraFileRecord->GetTag() == TAG_BEVATTR_LIGHTANGLE) 03385 { 03386 // read the record 03387 if (!pCXaraFileRecord->ReadINT32(&value)) 03388 return FALSE; 03389 } 03390 else if (pCXaraFileRecord->GetTag() == TAG_BEVATTR_CONTRAST) 03391 { 03392 // read the record 03393 if (!pCXaraFileRecord->ReadINT32(&value)) 03394 return FALSE; 03395 } 03396 else if (pCXaraFileRecord->GetTag() == TAG_BEVATTR_TYPE) 03397 { 03398 // read the record 03399 if (!pCXaraFileRecord->ReadINT32(&value)) 03400 return FALSE; 03401 } 03402 03403 return TRUE; 03404 }
|
|
|
|
|