#include <txtattr.h>
Inheritance diagram for TxtJustificationAttribute:
Public Member Functions | |
TxtJustificationAttribute () | |
Default Constuctor for TxtJustificationAttribute It defaults to LEFT justify. | |
TxtJustificationAttribute (Justification Value) | |
TxtJustificationAttribute constructor. | |
virtual void | Restore (RenderRegion *, BOOL) |
Restores the TxtJustificationAttribute attribute for the given render region. | |
virtual void | Render (RenderRegion *pRegion, BOOL Temp=FALSE) |
Sets the TxtJustificationAttribute attribute for the given render region. | |
virtual void | SimpleCopy (AttributeValue *) |
See AttributeValue::SimpleCopy. | |
virtual NodeAttribute * | MakeNode () |
Make a AttrTxtJustification node, see base class. | |
BOOL | IsDifferent (AttributeValue *pAttr) |
See base class version. | |
virtual TxtJustificationAttribute & | operator= (TxtJustificationAttribute &Attrib) |
Make the Attribute the same as the other. | |
INT32 | operator== (const TxtJustificationAttribute &Attrib) |
Comparison operator. See NodeAttribute::operator== for a description of why it's required. | |
Static Public Member Functions | |
static BOOL | Init () |
Registers default attribute. | |
Public Attributes | |
Justification | justification |
Definition at line 368 of file txtattr.h.
|
Default Constuctor for TxtJustificationAttribute It defaults to LEFT justify.
Definition at line 1534 of file txtattr.cpp. 01535 { 01536 justification = JLEFT; 01537 }
|
|
TxtJustificationAttribute constructor.
Definition at line 1555 of file txtattr.cpp. 01556 { 01557 justification = Justify; 01558 }
|
|
Registers default attribute.
Reimplemented from SimpleCCObject. Definition at line 1691 of file txtattr.cpp. 01692 { 01693 TxtJustificationAttribute *pAttr = new TxtJustificationAttribute; 01694 if (pAttr==NULL) 01695 // error message has already been set by new 01696 return FALSE; 01697 01698 UINT32 ID = AttributeManager::RegisterDefaultAttribute(CC_RUNTIME_CLASS(BaseTextClass), 01699 pAttr); 01700 01701 ERROR2IF(ID == ATTR_BAD_ID, FALSE, "Bad ID when Initialising TxtJustificationAttribute"); 01702 01703 return TRUE; 01704 }
|
|
See base class version.
Reimplemented from AttributeValue. Definition at line 1668 of file txtattr.cpp. 01669 { 01670 // This must be at least a FillGeometryAttribute... 01671 ERROR3IF(!pAttr->IsKindOf(CC_RUNTIME_CLASS(TxtJustificationAttribute)), 01672 "Different attribute types in TxtJustificationAttribute::IsDifferent()"); 01673 01674 // Check they are NOT the same. 01675 return ( !(*((TxtJustificationAttribute *)pAttr) == *this) ); 01676 }
|
|
Make a AttrTxtJustification node, see base class.
Reimplemented from AttributeValue. Definition at line 1719 of file txtattr.cpp. 01720 { 01721 // Create new attribute node 01722 AttrTxtJustification* pAttr = new AttrTxtJustification(); 01723 if (pAttr==NULL) 01724 // error message has already been set by new 01725 return NULL; 01726 01727 // Copy attribute value into the new node. 01728 pAttr->Value.SimpleCopy(this); 01729 01730 // Return the new node 01731 return pAttr; 01732 }
|
|
Make the Attribute the same as the other.
Definition at line 1611 of file txtattr.cpp. 01612 { 01613 justification = Attrib.justification; 01614 return *this; 01615 }
|
|
Comparison operator. See NodeAttribute::operator== for a description of why it's required.
Definition at line 1631 of file txtattr.cpp. 01632 { 01633 return (Attrib.justification == justification); 01634 }
|
|
Sets the TxtJustificationAttribute attribute for the given render region.
Implements AttributeValue. Definition at line 1574 of file txtattr.cpp. 01575 { 01576 pRegion->SetTxtJustification(this, Temp); 01577 }
|
|
Restores the TxtJustificationAttribute attribute for the given render region.
Implements TxtBaseClassAttribute. Definition at line 1593 of file txtattr.cpp. 01594 { 01595 pRegion->RestoreTxtJustification(this, Temp); 01596 }
|
|
See AttributeValue::SimpleCopy.
Implements AttributeValue. Definition at line 1647 of file txtattr.cpp. 01648 { 01649 ERROR3IF(!IS_A(pValue, TxtJustificationAttribute), 01650 "Invalid Attribute value passed to TxtJustificationAttribute::SimpleCopy"); 01651 // We may as well just use our assignment operator. 01652 *this = *((TxtJustificationAttribute*)pValue); 01653 }
|
|
|