#include <txtattr.h>
Inheritance diagram for AttrTxtAspectRatio:
Public Member Functions | |
AttrTxtAspectRatio () | |
Default constructor for AttrTxtAspectRatio class. | |
AttrTxtAspectRatio (Node *ContextNode, AttachNodeDirection Direction, BOOL Locked=FALSE, BOOL Mangled=FALSE, BOOL Marked=FALSE, BOOL Selected=FALSE) | |
Creates a AttrTxtAspectRatio Attribute. | |
void | Render (RenderRegion *pRender) |
'Renders' a Line Width attribute. | |
Node * | SimpleCopy () |
This method returns a shallow copy of the node with all Node pointers NULL. The function is virtual, and must be defined for all derived classes. | |
virtual INT32 | operator== (const NodeAttribute &NodeAttrib) |
A virtual comparison operator. See NodeAttribute::operator== for a description of why it's required. | |
virtual UINT32 | GetAttrNameID (void) |
Returns back a string resource ID describing the attribute. | |
virtual AttrIndex | GetAttributeIndex () |
void | GetDebugDetails (StringBase *Str) |
Used for debugging purposes during developement. Override in your own class and output suitable debugging details. | |
virtual UINT32 | GetNodeSize () const |
For finding the size of the node. | |
virtual AttributeValue * | GetAttributeValue () |
virtual void | BaseLineRelativeTransform (FIXED16 Scale, FIXED16 Aspect) |
Transform the attribute using the baseline relative scale and aspect. | |
virtual void | PolyCopyNodeContents (NodeRenderable *pNodeCopy) |
Polymorphically copies the contents of this node to another. | |
virtual BOOL | WritePreChildrenWeb (BaseCamelotFilter *pFilter) |
Saves the text aspect ratio attribute to the new file format filter. | |
virtual BOOL | WritePreChildrenNative (BaseCamelotFilter *pFilter) |
Public Attributes | |
TxtAspectRatioAttribute | Value |
Private Member Functions | |
void | CopyNodeContents (AttrTxtAspectRatio *NodeCopy) |
This method copies the node's contents to the node pointed to by NodeCopy. |
Definition at line 1070 of file txtattr.h.
|
Default constructor for AttrTxtAspectRatio class.
Definition at line 5295 of file txtattr.cpp.
|
|
Creates a AttrTxtAspectRatio Attribute.
Definition at line 5275 of file txtattr.cpp. 05281 : AttrTxtBase(ContextNode, Direction, Locked, Mangled, Marked, Selected) 05282 { 05283 }
|
|
Transform the attribute using the baseline relative scale and aspect.
Reimplemented from AttrTxtBase. Definition at line 5492 of file txtattr.cpp. 05493 { 05494 TxtAspectRatioAttribute* pAspectRatioAttrVal=(TxtAspectRatioAttribute*)GetAttributeValue(); 05495 pAspectRatioAttrVal->AspectRatio = pAspectRatioAttrVal->AspectRatio * Aspect; 05496 }
|
|
This method copies the node's contents to the node pointed to by NodeCopy.
Definition at line 5402 of file txtattr.cpp. 05403 { 05404 // Let the base class do its bit 05405 AttrTxtBase::CopyNodeContents( NodeCopy ); 05406 05407 //Copy contents specific to derived class here 05408 NodeCopy->Value.AspectRatio = Value.AspectRatio; 05409 }
|
|
Reimplemented from NodeAttribute. Definition at line 1092 of file txtattr.h. 01092 { return ATTR_TXTASPECTRATIO; }
|
|
Reimplemented from NodeAttribute. Definition at line 1100 of file txtattr.h. 01100 { return &Value; }
|
|
Returns back a string resource ID describing the attribute.
Reimplemented from NodeAttribute. Definition at line 5379 of file txtattr.cpp. 05380 { 05381 return (_R(IDS_ASPECTRATIO)); 05382 }
|
|
Used for debugging purposes during developement. Override in your own class and output suitable debugging details.
Reimplemented from NodeRenderable. Definition at line 5468 of file txtattr.cpp. 05469 { 05470 #if DEBUG_TREE 05471 NodeAttribute::GetDebugDetails( Str ); 05472 05473 String_256 TempStr; 05474 TCHAR floatStr[20]; 05475 camSnprintf( floatStr, 20, _T("%f"), Value.AspectRatio.MakeDouble() ); 05476 TempStr._MakeMsg( TEXT("\r\nAspect ratio :\t#1%s\r\n"), floatStr); 05477 (*Str) += TempStr; 05478 #endif 05479 }
|
|
For finding the size of the node.
Reimplemented from Node. Definition at line 5450 of file txtattr.cpp. 05451 { 05452 return (sizeof(AttrTxtAspectRatio)); 05453 }
|
|
A virtual comparison operator. See NodeAttribute::operator== for a description of why it's required.
Reimplemented from NodeAttribute. Definition at line 5359 of file txtattr.cpp. 05360 { 05361 ENSURE(Attrib.IsKindOf(CC_RUNTIME_CLASS(AttrTxtAspectRatio)), 05362 "Trying to compare two objects with different types"); 05363 AttrTxtAspectRatio* Attr = (AttrTxtAspectRatio*) &Attrib; 05364 return (Attr->Value.AspectRatio == Value.AspectRatio); 05365 }
|
|
Polymorphically copies the contents of this node to another.
Reimplemented from NodeRenderable. Definition at line 5424 of file txtattr.cpp. 05425 { 05426 ENSURE(pNodeCopy, "Trying to copy a node's contents into a NULL node"); 05427 ENSURE(IS_A(pNodeCopy, AttrTxtAspectRatio), "PolyCopyNodeContents given wrong dest node type"); 05428 05429 if (IS_A(pNodeCopy, AttrTxtAspectRatio)) 05430 CopyNodeContents((AttrTxtAspectRatio*)pNodeCopy); 05431 }
|
|
'Renders' a Line Width attribute.
Reimplemented from NodeAttribute. Definition at line 5310 of file txtattr.cpp. 05311 { 05312 pRegion->SetTxtAspectRatio(&Value, FALSE); 05313 }
|
|
This method returns a shallow copy of the node with all Node pointers NULL. The function is virtual, and must be defined for all derived classes.
Reimplemented from NodeAttribute. Definition at line 5334 of file txtattr.cpp. 05335 { 05336 AttrTxtAspectRatio* NodeCopy = new AttrTxtAspectRatio(); 05337 ERRORIF(NodeCopy == NULL, _R(IDE_NOMORE_MEMORY), NULL); 05338 CopyNodeContents(NodeCopy); 05339 return NodeCopy; 05340 }
|
|
Reimplemented from Node. Definition at line 5522 of file txtattr.cpp. 05523 { 05524 #ifdef DO_EXPORT 05525 ERROR2IF(pFilter==NULL, FALSE, "Parameter pFilter == NULL."); 05526 05527 return CXaraFileTxtAspectRatio::WritePreChildrenNative(pFilter, this); 05528 #else 05529 return FALSE; 05530 #endif 05531 }
|
|
Saves the text aspect ratio attribute to the new file format filter.
Reimplemented from Node. Definition at line 5511 of file txtattr.cpp. 05512 { 05513 #ifdef DO_EXPORT 05514 ERROR2IF(pFilter==NULL, FALSE, "Parameter pFilter == NULL."); 05515 05516 return CXaraFileTxtAspectRatio::WritePreChildrenWeb(pFilter, this); 05517 #else 05518 return FALSE; 05519 #endif 05520 }
|
|
|