FlashPlaceObject Class Reference

Contains the information necessary to do a PlaceObject tag. More...

#include <swfplace.h>

Inheritance diagram for FlashPlaceObject:

CCObject SimpleCCObject List of all members.

Public Member Functions

 FlashPlaceObject ()
 Default constructor. Ensure that all the variables are set to values that won't cause problems.
 ~FlashPlaceObject ()
 Default destructor.
FlashPlaceObjectGetNext (void)
 Gets a pointer to the next item in the list.
void SetNext (FlashPlaceObject *pNext)
 Sets mpNext (the pointer to the next item in the list) to the FlashPlaceObject pointed to by pNext.
FlashPlaceObjectAddNext (void)
 Creates a new item, adds it to the list after this node, and returns a pointer to this item.
FlashPlaceObjectGetLast (void)
 Gets a pointer to the previous item in the list.
void SetLast (FlashPlaceObject *pLast)
 Sets mpLast (the pointer to the previous item in the list) to the FlashPlaceObject pointed to by pLast.
void SetType (FlashType Type)
 Sets mToRender, a record of what kind of Flash record to write to the file.
FlashType GetType (void)
 Reveals whether this place object is being used to display a particular kind of Flash file record.
void SetPosition (DocCoord Point)
 Sets the position at which the image should be rendered.
DocCoord GetPosition (void)
 Sets the initial position to render the object at.
void SetID (WORD ID)
 Sets mID.
WORD GetID (void)
 Returns the ID of the object to be placed.
WORD GetRawID (void)
 Returns the raw ID of the object to be placed. (i.e. the value contained in mID.).
void SetDoTransform (BOOL State)
 The way the Flash render region code for buttons has been set up mean that buttons with roll-over states must be placed at (0,0). Unfortunately, if I set the co-ordinates to this value, they are transformed when this class is processed, so I'm putting this value in to alert the filter that I want to use THIS value in the final image.
BOOL GetDoTransform (void)
 Allows the filter to determine whether or not a transform should be applied to the position co-ordinates for this PlaceObject tag.

Static Public Member Functions

static void ResetStatics (void)
 Sets all the static member variables to zero.
static void IncBitmapCount (void)
 Increases mBitmapCount.
static void IncFontCount (void)
 Increases mFontCount.
static void IncTextCount (void)
 Increases mTextCount.
static void IncShapeCount (void)
 Increases mShapeCount.
static void IncSpriteCount (void)
 Increases mSpriteCount.
static void DecSpriteCount (void)
 Decreases mSpriteCount.
static void IncButtonCount (void)
 Increases mButtonCount.
static WORD GetBitmapCount (void)
 Access function to the static member variable mBitmapCount.
static WORD GetFontCount (void)
 Access function to the static member variable mFontCount.
static WORD GetTextCount (void)
 Access function to the static member variable mTextCount.
static WORD GetShapeCount (void)
 Access function to the static member variable mShapeCount.
static WORD GetSpriteCount (void)
 Access function to the static member variable mSpriteCount.
static WORD GetButtonCount (void)
 Access function to the static member variable mButtonCount.

Private Attributes

WORD mID
DocCoord mPosition
FlashPlaceObjectmpNext
FlashPlaceObjectmpLast
FlashType mToRender
BOOL mDoTransform

Static Private Attributes

static WORD mBitmapCount = 0
static WORD mFontCount = 0
static WORD mTextCount = 0
static WORD mShapeCount = 0
static WORD mSpriteCount = 0
static WORD mButtonCount = 0

Detailed Description

Contains the information necessary to do a PlaceObject tag.

Author:
Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
Date:
13/10/99

Definition at line 134 of file swfplace.h.


Constructor & Destructor Documentation

FlashPlaceObject::FlashPlaceObject void   ) 
 

Default constructor. Ensure that all the variables are set to values that won't cause problems.

Author:
Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
Date:
13/10/99
Parameters:
- [INPUTS]
Returns:
-

Definition at line 125 of file swfplace.cpp.

00126 {
00127     // Generate initial settings.
00128     DocCoord DefaultPosition ( 0, 0 );
00129 
00130     // And set them.
00131     mToRender = FLASH_SHAPE;
00132     mID = 0;
00133     mPosition = DefaultPosition;
00134     mpNext = NULL;
00135     mpLast = NULL;
00136     mDoTransform = FALSE;
00137 }

FlashPlaceObject::~FlashPlaceObject  ) 
 

Default destructor.

Author:
Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
Date:
13/10/99
Parameters:
- [INPUTS]
Returns:
-

Definition at line 151 of file swfplace.cpp.

00152 {
00153     // Nothing needed at the present.
00154 }


Member Function Documentation

FlashPlaceObject * FlashPlaceObject::AddNext void   ) 
 

Creates a new item, adds it to the list after this node, and returns a pointer to this item.

Author:
Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
Date:
13/10/99
Parameters:
- [INPUTS]
Returns:
A pointer to the next item in the list.

Definition at line 204 of file swfplace.cpp.

00205 {
00206     // Do a recursive call: If there is a next object, call the AddNext function within this,
00207     // and attempt to create the new object there.
00208     if ( mpNext != NULL )
00209     {
00210         return mpNext->AddNext ();
00211     }
00212     else
00213     {
00214         mpNext = new FlashPlaceObject;
00215         ASSERT ( mpNext != NULL );
00216         mpNext->SetLast ( this );
00217         return mpNext;
00218     }
00219 }

void FlashPlaceObject::DecSpriteCount void   )  [static]
 

Decreases mSpriteCount.

Author:
Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
Date:
18/1/00
Parameters:
- [INPUTS]
Returns:
-

Definition at line 557 of file swfplace.cpp.

00558 {
00559     // Only decrease the sprite count if it is greated than zero, since it is an unsigned
00560     // value.
00561     if ( mSpriteCount > 0 )
00562         mSpriteCount --;
00563 }

WORD FlashPlaceObject::GetBitmapCount void   )  [static]
 

Access function to the static member variable mBitmapCount.

Author:
Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
Date:
22/10/99
Parameters:
- [INPUTS]
Returns:
The current value of mBitmapCount.

Definition at line 594 of file swfplace.cpp.

00595 {
00596     return mBitmapCount;
00597 }

WORD FlashPlaceObject::GetButtonCount void   )  [static]
 

Access function to the static member variable mButtonCount.

Author:
Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
Date:
22/10/99
Parameters:
- [INPUTS]
Returns:
The current value of mButtonCount.

Definition at line 679 of file swfplace.cpp.

00680 {
00681     return mButtonCount;
00682 }

BOOL FlashPlaceObject::GetDoTransform void   ) 
 

Allows the filter to determine whether or not a transform should be applied to the position co-ordinates for this PlaceObject tag.

Author:
Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
Date:
17/1/00
Parameters:
- [INPUTS]
Returns:
TRUE if the transform should be done, otherwise FALSE.

Definition at line 432 of file swfplace.cpp.

00433 {
00434     return mDoTransform;
00435 }

WORD FlashPlaceObject::GetFontCount void   )  [static]
 

Access function to the static member variable mFontCount.

Author:
Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
Date:
22/10/99
Parameters:
- [INPUTS]
Returns:
The current value of mFontCount.

Definition at line 611 of file swfplace.cpp.

00612 {
00613     return mFontCount;
00614 }

WORD FlashPlaceObject::GetID void   ) 
 

Returns the ID of the object to be placed.

Author:
Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
Date:
23/10/99
Parameters:
- [INPUTS]
Returns:
The ID number of the current record.

Definition at line 354 of file swfplace.cpp.

00355 {
00356     WORD ID = mID;
00357 
00358     // Use a switch to determine what the ID value should be.
00359     if ( mToRender == FLASH_TEXT )
00360     {
00361         ID += FLASH_FIRST_ID + mBitmapCount + mFontCount;
00362     }
00363     else if ( mToRender == FLASH_SHAPE )
00364     {
00365         ID += FLASH_FIRST_ID + mBitmapCount + mFontCount + mTextCount;
00366     }
00367     else if ( mToRender == FLASH_SPRITE )
00368     {
00369         ID += FLASH_FIRST_ID + mBitmapCount + mFontCount + mTextCount + mShapeCount;
00370     }
00371     else if ( mToRender == FLASH_BUTTON )
00372     {
00373         ID += FLASH_FIRST_ID + mBitmapCount + mFontCount + mTextCount + mShapeCount
00374               + mSpriteCount;
00375     }
00376 
00377     return ID;
00378 }

FlashPlaceObject * FlashPlaceObject::GetLast void   ) 
 

Gets a pointer to the previous item in the list.

Author:
Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
Date:
13/1/00
Parameters:
- [INPUTS]
Returns:
A pointer to the previous item in the list.

Definition at line 233 of file swfplace.cpp.

00234 {
00235     return mpLast;
00236 }

FlashPlaceObject * FlashPlaceObject::GetNext void   ) 
 

Gets a pointer to the next item in the list.

Author:
Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
Date:
13/10/99
Parameters:
- [INPUTS]
Returns:
A pointer to the next item in the list.

Definition at line 168 of file swfplace.cpp.

00169 {
00170     return mpNext;
00171 }

DocCoord FlashPlaceObject::GetPosition void   ) 
 

Sets the initial position to render the object at.

Author:
Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
Date:
13/10/99
Parameters:
- [INPUTS]
Returns:
DocCoord - The position of the object.

Definition at line 320 of file swfplace.cpp.

00321 {
00322     return mPosition;
00323 }

WORD FlashPlaceObject::GetRawID void   ) 
 

Returns the raw ID of the object to be placed. (i.e. the value contained in mID.).

Author:
Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
Date:
14/1/00
Parameters:
- [INPUTS]
Returns:
The ID number of the current record.

Definition at line 393 of file swfplace.cpp.

00394 {
00395     return mID;
00396 }

WORD FlashPlaceObject::GetShapeCount void   )  [static]
 

Access function to the static member variable mShapeCount.

Author:
Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
Date:
22/10/99
Parameters:
- [INPUTS]
Returns:
The current value of mShapeCount.

Definition at line 645 of file swfplace.cpp.

00646 {
00647     return mShapeCount;
00648 }

WORD FlashPlaceObject::GetSpriteCount void   )  [static]
 

Access function to the static member variable mSpriteCount.

Author:
Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
Date:
22/10/99
Parameters:
- [INPUTS]
Returns:
The current value of mSpriteCount.

Definition at line 662 of file swfplace.cpp.

00663 {
00664     return mSpriteCount;
00665 }

WORD FlashPlaceObject::GetTextCount void   )  [static]
 

Access function to the static member variable mTextCount.

Author:
Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
Date:
22/10/99
Parameters:
- [INPUTS]
Returns:
The current value of mTextCount.

Definition at line 628 of file swfplace.cpp.

00629 {
00630     return mTextCount;
00631 }

FlashType FlashPlaceObject::GetType void   ) 
 

Reveals whether this place object is being used to display a particular kind of Flash file record.

Author:
Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
Date:
23/10/99
Parameters:
- [INPUTS]
Returns:
The type of shape to be rendered.

Definition at line 286 of file swfplace.cpp.

00287 {
00288     return mToRender;
00289 }

void FlashPlaceObject::IncBitmapCount void   )  [static]
 

Increases mBitmapCount.

Author:
Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
Date:
22/10/99
Parameters:
- [INPUTS]
Returns:
-

Definition at line 472 of file swfplace.cpp.

00473 {
00474     mBitmapCount ++;
00475 }

void FlashPlaceObject::IncButtonCount void   )  [static]
 

Increases mButtonCount.

Author:
Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
Date:
9/12/99
Parameters:
- [INPUTS]
Returns:
-

Definition at line 577 of file swfplace.cpp.

00578 {
00579     mButtonCount ++;
00580 }

void FlashPlaceObject::IncFontCount void   )  [static]
 

Increases mFontCount.

Author:
Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
Date:
22/10/99
Parameters:
- [INPUTS]
Returns:
-

Definition at line 489 of file swfplace.cpp.

00490 {
00491     mFontCount ++;
00492 }

void FlashPlaceObject::IncShapeCount void   )  [static]
 

Increases mShapeCount.

Author:
Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
Date:
22/10/99
Parameters:
- [INPUTS]
Returns:
-

Definition at line 523 of file swfplace.cpp.

00524 {
00525     mShapeCount ++;
00526 }

void FlashPlaceObject::IncSpriteCount void   )  [static]
 

Increases mSpriteCount.

Author:
Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
Date:
22/12/99
Parameters:
- [INPUTS]
Returns:
-

Definition at line 540 of file swfplace.cpp.

00541 {
00542     mSpriteCount ++;
00543 }

void FlashPlaceObject::IncTextCount void   )  [static]
 

Increases mTextCount.

Author:
Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
Date:
22/10/99
Parameters:
- [INPUTS]
Returns:
-

Definition at line 506 of file swfplace.cpp.

00507 {
00508     mTextCount ++;
00509 }

void FlashPlaceObject::ResetStatics void   )  [static]
 

Sets all the static member variables to zero.

Author:
Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
Date:
22/10/99
Parameters:
- [INPUTS]
Returns:
-

Definition at line 449 of file swfplace.cpp.

00450 {
00451     // Reset the counter variables.
00452     mBitmapCount    = 0;
00453     mFontCount      = 0;
00454     mTextCount      = 0;
00455     mShapeCount     = 0;
00456     mSpriteCount    = 0;
00457     mButtonCount    = 0;
00458 }

void FlashPlaceObject::SetDoTransform BOOL  State  ) 
 

The way the Flash render region code for buttons has been set up mean that buttons with roll-over states must be placed at (0,0). Unfortunately, if I set the co-ordinates to this value, they are transformed when this class is processed, so I'm putting this value in to alert the filter that I want to use THIS value in the final image.

Author:
Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
Date:
17/1/00
Parameters:
State - Should a transform be applied to the place object co-ordinates? [INPUTS]
Returns:
-

Definition at line 414 of file swfplace.cpp.

00415 {
00416     mDoTransform = State;
00417 }

void FlashPlaceObject::SetID WORD  ID  ) 
 

Sets mID.

Author:
Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
Date:
13/10/99
Parameters:
WORD ID - The ID value shape to be displayed. [INPUTS]
Returns:
-

Definition at line 337 of file swfplace.cpp.

00338 {
00339     mID = ID;
00340 }

void FlashPlaceObject::SetLast FlashPlaceObject pLast  ) 
 

Sets mpLast (the pointer to the previous item in the list) to the FlashPlaceObject pointed to by pLast.

Author:
Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
Date:
13/1/00
Parameters:
pLast - A pointer to a FlashPlaceObject. [INPUTS]
Returns:
void

Definition at line 251 of file swfplace.cpp.

00252 {
00253     mpLast = pLast;
00254 }

void FlashPlaceObject::SetNext FlashPlaceObject pNext  ) 
 

Sets mpNext (the pointer to the next item in the list) to the FlashPlaceObject pointed to by pNext.

Author:
Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
Date:
13/10/99
Parameters:
pNext - A pointer to a FlashPlaceObject. [INPUTS]
Returns:
void

Definition at line 186 of file swfplace.cpp.

00187 {
00188     mpNext = pNext;
00189 }

void FlashPlaceObject::SetPosition DocCoord  Point  ) 
 

Sets the position at which the image should be rendered.

Author:
Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
Date:
13/10/99
Parameters:
Point - The position to place the object on screen. (Typically lox, loy.) [INPUTS]
Returns:
-

Definition at line 303 of file swfplace.cpp.

00304 {
00305     mPosition = Point;
00306 }

void FlashPlaceObject::SetType FlashType  Type  ) 
 

Sets mToRender, a record of what kind of Flash record to write to the file.

Author:
Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
Date:
23/10/99
Parameters:
Type - The kind of Flash record to be rendered. [INPUTS]
Returns:
-

Definition at line 268 of file swfplace.cpp.

00269 {
00270     mToRender = Type;
00271 }


Member Data Documentation

WORD FlashPlaceObject::mBitmapCount = 0 [static, private]
 

Definition at line 188 of file swfplace.h.

WORD FlashPlaceObject::mButtonCount = 0 [static, private]
 

Definition at line 193 of file swfplace.h.

BOOL FlashPlaceObject::mDoTransform [private]
 

Definition at line 185 of file swfplace.h.

WORD FlashPlaceObject::mFontCount = 0 [static, private]
 

Definition at line 189 of file swfplace.h.

WORD FlashPlaceObject::mID [private]
 

Definition at line 180 of file swfplace.h.

FlashPlaceObject* FlashPlaceObject::mpLast [private]
 

Definition at line 183 of file swfplace.h.

FlashPlaceObject* FlashPlaceObject::mpNext [private]
 

Definition at line 182 of file swfplace.h.

DocCoord FlashPlaceObject::mPosition [private]
 

Definition at line 181 of file swfplace.h.

WORD FlashPlaceObject::mShapeCount = 0 [static, private]
 

Definition at line 191 of file swfplace.h.

WORD FlashPlaceObject::mSpriteCount = 0 [static, private]
 

Definition at line 192 of file swfplace.h.

WORD FlashPlaceObject::mTextCount = 0 [static, private]
 

Definition at line 190 of file swfplace.h.

FlashType FlashPlaceObject::mToRender [private]
 

Definition at line 184 of file swfplace.h.


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