#include <txtattr.h>
Inheritance diagram for TxtFontSizeAttribute:
Public Member Functions | |
TxtFontSizeAttribute () | |
Default Constuctor for TxtFontSizeAttribute The default FontSize attribute value is 16000mp (16pt). | |
TxtFontSizeAttribute (MILLIPOINT FontSize) | |
TextFontTypefaceAttribute constructor. | |
virtual void | Restore (RenderRegion *, BOOL) |
Restores the TxtFontSizeAttribute attribute for the given render region. | |
virtual void | Render (RenderRegion *pRegion, BOOL Temp=FALSE) |
Sets the TxtFontSizeAttribute attribute for the given render region. | |
virtual void | SimpleCopy (AttributeValue *) |
See AttributeValue::SimpleCopy. | |
virtual NodeAttribute * | MakeNode () |
Make a AttrTextFontTypeface node, see base class. | |
BOOL | IsDifferent (AttributeValue *pAttr) |
See base class version. | |
virtual TxtFontSizeAttribute & | operator= (TxtFontSizeAttribute &Attrib) |
Make the Attribute the same as the other. | |
INT32 | operator== (const TxtFontSizeAttribute &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 | |
MILLIPOINT | FontSize |
Definition at line 219 of file txtattr.h.
|
Default Constuctor for TxtFontSizeAttribute The default FontSize attribute value is 16000mp (16pt).
Definition at line 449 of file txtattr.cpp. 00450 { 00451 FontSize = 16000; // Default font 00452 }
|
|
TextFontTypefaceAttribute constructor.
Definition at line 470 of file txtattr.cpp. 00471 { 00472 FontSize = fontSize; 00473 }
|
|
Registers default attribute.
Reimplemented from SimpleCCObject. Definition at line 606 of file txtattr.cpp. 00607 { 00608 TxtFontSizeAttribute *pAttr = new TxtFontSizeAttribute; 00609 if (pAttr==NULL) 00610 // error message has already been set by new 00611 return FALSE; 00612 00613 UINT32 ID = AttributeManager::RegisterDefaultAttribute(CC_RUNTIME_CLASS(BaseTextClass), 00614 pAttr); 00615 00616 ERROR2IF(ID == ATTR_BAD_ID, FALSE, "Bad ID when Initialising TxtFontSizeAttribute"); 00617 00618 return TRUE; 00619 }
|
|
See base class version.
Reimplemented from AttributeValue. Definition at line 583 of file txtattr.cpp. 00584 { 00585 // This must be at least a FillGeometryAttribute... 00586 ERROR3IF(!pAttr->IsKindOf(CC_RUNTIME_CLASS(TxtFontSizeAttribute)), 00587 "Different attribute types in TxtFontSizeAttribute::IsDifferent()"); 00588 00589 // Check they are NOT the same. 00590 return ( !(*((TxtFontSizeAttribute *)pAttr) == *this) ); 00591 }
|
|
Make a AttrTextFontTypeface node, see base class.
Reimplemented from AttributeValue. Definition at line 634 of file txtattr.cpp. 00635 { 00636 // Create new attribute node 00637 AttrTxtFontSize* pAttr = new AttrTxtFontSize(); 00638 if (pAttr==NULL) 00639 // error message has already been set by new 00640 return NULL; 00641 00642 // Copy attribute value into the new node. 00643 pAttr->Value.SimpleCopy(this); 00644 00645 // Return the new node 00646 return pAttr; 00647 }
|
|
Make the Attribute the same as the other.
Definition at line 526 of file txtattr.cpp.
|
|
Comparison operator. See NodeAttribute::operator== for a description of why it's required.
Definition at line 546 of file txtattr.cpp.
|
|
Sets the TxtFontSizeAttribute attribute for the given render region.
Implements AttributeValue. Definition at line 489 of file txtattr.cpp. 00490 { 00491 pRegion->SetTxtFontSize(this, Temp); 00492 }
|
|
Restores the TxtFontSizeAttribute attribute for the given render region.
Implements TxtBaseClassAttribute. Definition at line 508 of file txtattr.cpp. 00509 { 00510 pRegion->RestoreTxtFontSize(this, Temp); 00511 }
|
|
See AttributeValue::SimpleCopy.
Implements AttributeValue. Definition at line 562 of file txtattr.cpp. 00563 { 00564 ERROR3IF(!IS_A(pValue, TxtFontSizeAttribute), 00565 "Invalid Attribute value passed to TxtFontSizeAttribute::SimpleCopy"); 00566 // We may as well just use our assignment operator. 00567 *this = *((TxtFontSizeAttribute*)pValue); 00568 }
|
|
|