#include <txtattr.h>
Inheritance diagram for AttrTxtRuler:
Public Member Functions | |
AttrTxtRuler () | |
AttrTxtRuler (Node *ContextNode, AttachNodeDirection Direction, BOOL Locked=FALSE, BOOL Mangled=FALSE, BOOL Marked=FALSE, BOOL Selected=FALSE) | |
Creates a AttrTxtRuler Attribute. | |
void | Render (RenderRegion *pRender) |
'Renders' a ruler 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 BOOL | IsALineLevelAttrib () |
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 baseline attribute to the new file format filter. | |
virtual BOOL | WritePreChildrenNative (BaseCamelotFilter *pFilter) |
Public Attributes | |
TxtRulerAttribute | Value |
Private Member Functions | |
void | CopyNodeContents (AttrTxtRuler *NodeCopy) |
This method copies the node's contents to the node pointed to by NodeCopy. |
Definition at line 1586 of file txtattr.h.
|
Definition at line 1592 of file txtattr.h.
|
|
Creates a AttrTxtRuler Attribute.
Definition at line 7541 of file txtattr.cpp. 07547 : AttrTxtBase(ContextNode, Direction, Locked, Mangled, Marked, Selected) 07548 { 07549 }
|
|
Transform the attribute using the baseline relative scale and aspect.
Reimplemented from AttrTxtBase. Definition at line 7767 of file txtattr.cpp. 07768 { 07769 TxtRulerAttribute* pRulerAttrVal=(TxtRulerAttribute*)GetAttributeValue(); 07770 TxtRuler* pRuler = pRulerAttrVal->Value; 07771 07772 for (TxtTabStopIterator it = pRuler->begin(); it != pRuler->end(); ++it) 07773 { 07774 MILLIPOINT pos = (*it).GetPosition(); 07775 (*it).SetPosition(XLONG(pos) * Scale); 07776 } 07777 }
|
|
This method copies the node's contents to the node pointed to by NodeCopy.
Definition at line 7663 of file txtattr.cpp. 07664 { 07665 // Let the base class do its bit 07666 NodeAttribute::CopyNodeContents( NodeCopy ); 07667 07668 //Copy contents specific to derived class here 07669 NodeCopy->Value = Value; 07670 }
|
|
Reimplemented from NodeAttribute. Definition at line 1607 of file txtattr.h. 01607 { return ATTR_TXTRULER; }
|
|
Reimplemented from NodeAttribute. Definition at line 1613 of file txtattr.h. 01613 { return &Value; }
|
|
Returns back a string resource ID describing the attribute.
Reimplemented from NodeAttribute. Definition at line 7639 of file txtattr.cpp. 07640 { 07641 return (_R(IDS_RULER)); 07642 }
|
|
Used for debugging purposes during developement. Override in your own class and output suitable debugging details.
Reimplemented from NodeRenderable. Definition at line 7727 of file txtattr.cpp. 07728 { 07729 NodeAttribute::GetDebugDetails( Str ); 07730 07731 String_256 TempStr; 07732 TempStr._MakeMsg( TEXT("\r\nRuler(#1%08x)="), Value.Value); 07733 (*Str) += TempStr; 07734 for (TxtTabStopIterator It = Value.begin(); It != Value.end(); ++It) 07735 { 07736 switch((*It).GetType()) 07737 { 07738 case LeftTab: 07739 TempStr._MakeMsg( TEXT("L(#1%ld)"), (*It).GetPosition()); 07740 break; 07741 case RightTab: 07742 TempStr._MakeMsg( TEXT("R(#1%ld)"), (*It).GetPosition()); 07743 break; 07744 case CentreTab: 07745 TempStr._MakeMsg( TEXT("C(#1%ld)"), (*It).GetPosition()); 07746 break; 07747 case DecimalTab: 07748 TempStr._MakeMsg( TEXT("D(#1%ld)"), (*It).GetPosition()); 07749 break; 07750 } 07751 (*Str) += TempStr; 07752 } 07753 (*Str) += _T("\r\n"); 07754 }
|
|
For finding the size of the node.
Reimplemented from Node. Definition at line 7709 of file txtattr.cpp. 07710 { 07711 return (sizeof(AttrTxtRuler)); 07712 }
|
|
Reimplemented from NodeAttribute. Definition at line 1614 of file txtattr.h. 01614 { return TRUE; }
|
|
A virtual comparison operator. See NodeAttribute::operator== for a description of why it's required.
Reimplemented from NodeAttribute. Definition at line 7613 of file txtattr.cpp. 07614 { 07615 ENSURE(Attrib.IsKindOf(CC_RUNTIME_CLASS(AttrTxtRuler)), 07616 "Trying to compare two objects with different types"); 07617 AttrTxtRuler* Attr = (AttrTxtRuler*) &Attrib; 07618 07619 return (Attr->Value == Value); 07620 }
|
|
Polymorphically copies the contents of this node to another.
Reimplemented from NodeRenderable. Definition at line 7685 of file txtattr.cpp. 07686 { 07687 ENSURE(pNodeCopy, "Trying to copy a node's contents into a NULL node"); 07688 ENSURE(IS_A(pNodeCopy, AttrTxtRuler), "PolyCopyNodeContents given wrong dest node type"); 07689 07690 if (IS_A(pNodeCopy, AttrTxtRuler)) 07691 CopyNodeContents((AttrTxtRuler*)pNodeCopy); 07692 }
|
|
'Renders' a ruler attribute
Reimplemented from NodeAttribute. Definition at line 7562 of file txtattr.cpp. 07563 { 07564 pRegion->SetTxtRuler(&Value, FALSE); 07565 }
|
|
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 7586 of file txtattr.cpp. 07587 { 07588 AttrTxtRuler* NodeCopy = new AttrTxtRuler(); 07589 ERRORIF(NodeCopy == NULL, _R(IDE_NOMORE_MEMORY), NULL); 07590 CopyNodeContents(NodeCopy); 07591 return NodeCopy; 07592 }
|
|
Reimplemented from Node. Definition at line 7804 of file txtattr.cpp. 07805 { 07806 #ifdef DO_EXPORT 07807 ERROR2IF(pFilter==NULL, FALSE, "Parameter pFilter == NULL."); 07808 07809 return CXaraFileTxtRuler::WritePreChildrenNative(pFilter, this); 07810 #else 07811 return FALSE; 07812 #endif 07813 }
|
|
Saves the text baseline attribute to the new file format filter.
Reimplemented from Node. Definition at line 7793 of file txtattr.cpp. 07794 { 07795 #ifdef DO_EXPORT 07796 ERROR2IF(pFilter==NULL, FALSE, "Parameter pFilter == NULL."); 07797 07798 return CXaraFileTxtRuler::WritePreChildrenWeb(pFilter, this); 07799 #else 07800 return FALSE; 07801 #endif 07802 }
|
|
|