#include <swffont.h>
Inheritance diagram for FlashFontRecord:
Public Member Functions | |
FlashFontRecord (void) | |
Creates a FlashFontRecord list node, and initialises any values. | |
~FlashFontRecord (void) | |
Destroys this instance of FlashFontRecord. | |
FlashFontRecord * | AddElement (void) |
Adds an element to the tail of the list. | |
void | DeleteLastElement (void) |
Deletes the previous item in the list. | |
void | DeleteNextElement (void) |
Deletes the next item in the list. | |
WORD | GetTypeface (void) |
Gets the value of mFontID. | |
WORD | GetFontID (void) |
Gets the value of mFontID. | |
BOOL | GetIsBold (void) |
Gets the value of mIsBold. | |
BOOL | GetIsItalic (void) |
Gets the value of mIsItalic. | |
WCHAR * | GetGlyphs (void) |
Gets a pointer to mGlyphs. | |
Path ** | GetPaths (void) |
Gets a pointer to mpPaths. | |
FlashFontRecord * | GetLast (void) |
Gets mpLast. | |
FlashFontRecord * | GetNext (void) |
Gets mpNext. | |
void | SetTypeface (WORD Typeface) |
Sets the value of mTypeface. This is a handle to a font name that is stored within the Camelot font manager. | |
void | SetFontID (WORD FontID) |
Sets the value of mFontID, which is the number used to relate a DefineFont entry to a DefineText entry. | |
void | SetIsBold (BOOL IsBold) |
Sets the value of mIsBold. | |
void | SetIsItalic (BOOL IsItalic) |
Sets the value of mIsItalic. | |
BOOL | AddGlyph (WCHAR Glyph, INT32 &Code) |
Adds a glyph to mGlyphs. | |
void | AddPath (Path *ToAdd, INT32 Index) |
Adds a path reference to mpPaths. | |
void | SetLast (FlashFontRecord *pLast) |
Sets the value of mpLast. | |
void | SetNext (FlashFontRecord *pNext) |
Sets the value of mpNext. | |
Private Attributes | |
WORD | mTypeface |
WORD | mFontID |
BOOL | mIsBold |
BOOL | mIsItalic |
WCHAR | mGlyphs [256] |
Path * | mPaths [256] |
FlashFontRecord * | mpLast |
FlashFontRecord * | mpNext |
Definition at line 117 of file swffont.h.
|
Creates a FlashFontRecord list node, and initialises any values.
Definition at line 118 of file swffont.cpp. 00119 { 00120 // Initialise the member variables, so as to avoid any unpleasentness later. 00121 mFontID = 0; // Set as 0. 00122 mTypeface = 0; // Default to 0. 00123 mIsBold = FALSE; // Initially the font isn't bold. 00124 mIsItalic = FALSE; // Initially the font isn't italic. 00125 00126 // Pointers should always be initialised to NULL when created. 00127 mpLast = NULL; // No previous nodes. 00128 mpNext = NULL; // No subsequent nodes. 00129 00130 // Ensure that the arrays are full of 0s. 00131 for ( UINT32 i = 0; i < FLASH_TEXT_ARRAY_SIZE; i++ ) 00132 { 00133 mGlyphs [i] = 0; 00134 mPaths [i] = NULL; 00135 } 00136 }
|
|
Destroys this instance of FlashFontRecord.
Definition at line 150 of file swffont.cpp. 00151 { 00152 // Clean up any stray values. 00153 for ( UINT32 i = 0; i < FLASH_TEXT_ARRAY_SIZE; i++ ) 00154 { 00155 Path* pPath = mPaths[i]; 00156 00157 if(pPath) 00158 delete pPath; 00159 } 00160 }
|
|
Adds an element to the tail of the list.
Definition at line 174 of file swffont.cpp. 00175 { 00176 FlashFontRecord *pTail = new FlashFontRecord; 00177 00178 // Set the appropriate pointers. 00179 pTail->SetLast ( this ); // Ensure that a reference exists to this object... 00180 pTail->SetNext ( mpNext ); // Avoids any problems if mpLast isn't NULL. 00181 mpNext = pTail; // ... and a reference exists to the new one. 00182 00183 return pTail; 00184 }
|
|
Adds a glyph to mGlyphs.
Definition at line 451 of file swffont.cpp. 00453 { 00454 // Set up the return values. 00455 BOOL bResult = TRUE; 00456 Code = 0; 00457 00458 // Compare the value of the new character to the entries in the array. 00459 while ( mGlyphs [Code] != 0 ) 00460 { 00461 if ( mGlyphs [Code] == Glyph ) 00462 { 00463 // The character is already present within the listing, so quit out. 00464 bResult = FALSE; 00465 break; 00466 } 00467 00468 // Increment the value of Code so that it points to the next element in the array. 00469 Code++; 00470 } 00471 00472 mGlyphs[Code] = Glyph; // Write the new value into the array. 00473 00474 return bResult; 00475 }
|
|
Adds a path reference to mpPaths.
Definition at line 490 of file swffont.cpp.
|
|
Deletes the previous item in the list.
Definition at line 198 of file swffont.cpp. 00199 { 00200 FlashFontRecord *pToDelete = mpLast; 00201 00202 // Reset mpLast to be mpLast->GetLast (), so that the list isn't broken. 00203 mpLast = mpLast->GetLast (); 00204 00205 delete pToDelete; 00206 }
|
|
Deletes the next item in the list.
Definition at line 220 of file swffont.cpp. 00221 { 00222 FlashFontRecord *pToDelete = mpNext; 00223 00224 // Reset mpNext to be mpNext->GetNext (), so that the list isn't broken. 00225 mpNext = mpNext->GetNext (); 00226 00227 delete pToDelete; 00228 }
|
|
Gets the value of mFontID.
Definition at line 259 of file swffont.cpp. 00260 { 00261 return mFontID; 00262 }
|
|
Gets a pointer to mGlyphs.
Definition at line 311 of file swffont.cpp. 00312 { 00313 return mGlyphs; 00314 }
|
|
Gets the value of mIsBold.
Definition at line 277 of file swffont.cpp. 00278 { 00279 return mIsBold; 00280 }
|
|
Gets the value of mIsItalic.
Definition at line 294 of file swffont.cpp. 00295 { 00296 return mIsItalic; 00297 }
|
|
Gets mpLast.
Definition at line 345 of file swffont.cpp. 00346 { 00347 return mpLast; 00348 }
|
|
Gets mpNext.
Definition at line 362 of file swffont.cpp. 00363 { 00364 return mpNext; 00365 }
|
|
Gets a pointer to mpPaths.
Definition at line 328 of file swffont.cpp. 00329 { 00330 return mPaths; 00331 }
|
|
Gets the value of mFontID.
Definition at line 242 of file swffont.cpp. 00243 { 00244 return mTypeface; 00245 }
|
|
Sets the value of mFontID, which is the number used to relate a DefineFont entry to a DefineText entry.
Definition at line 398 of file swffont.cpp. 00399 { 00400 mFontID = FontID; 00401 }
|
|
Sets the value of mIsBold.
Definition at line 415 of file swffont.cpp. 00416 { 00417 mIsBold = IsBold; 00418 }
|
|
Sets the value of mIsItalic.
Definition at line 432 of file swffont.cpp. 00433 { 00434 mIsItalic = IsItalic; 00435 }
|
|
Sets the value of mpLast.
Definition at line 507 of file swffont.cpp. 00508 { 00509 mpLast = pLast; 00510 }
|
|
Sets the value of mpNext.
Definition at line 524 of file swffont.cpp. 00525 { 00526 mpNext = pNext; 00527 }
|
|
Sets the value of mTypeface. This is a handle to a font name that is stored within the Camelot font manager.
Definition at line 380 of file swffont.cpp. 00381 { 00382 mTypeface = Typeface; 00383 }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|