AttrTxtBaseLine Class Reference

AttrTxtBaseLine: specifies an absolute offset from the base-line. More...

#include <txtattr.h>

Inheritance diagram for AttrTxtBaseLine:

AttrTxtBase NodeAttribute NodeRenderable Node CCObject SimpleCCObject List of all members.

Public Member Functions

 AttrTxtBaseLine ()
 Default constructor for AttrTxtBaseLine class.
 AttrTxtBaseLine (Node *ContextNode, AttachNodeDirection Direction, BOOL Locked=FALSE, BOOL Mangled=FALSE, BOOL Marked=FALSE, BOOL Selected=FALSE)
 Creates a AttrTxtBaseLine Attribute.
void Render (RenderRegion *pRender)
 'Renders' a Line Width attribute.
NodeSimpleCopy ()
 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 AttributeValueGetAttributeValue ()
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

TxtBaseLineAttribute Value

Private Member Functions

void CopyNodeContents (AttrTxtBaseLine *NodeCopy)
 This method copies the node's contents to the node pointed to by NodeCopy.

Detailed Description

AttrTxtBaseLine: specifies an absolute offset from the base-line.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
07/03/95

Definition at line 1360 of file txtattr.h.


Constructor & Destructor Documentation

AttrTxtBaseLine::AttrTxtBaseLine  ) 
 

Default constructor for AttrTxtBaseLine class.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
13/03/95
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
-

Definition at line 6456 of file txtattr.cpp.

06457 {
06458 }

AttrTxtBaseLine::AttrTxtBaseLine Node ContextNode,
AttachNodeDirection  Direction,
BOOL  Locked = FALSE,
BOOL  Mangled = FALSE,
BOOL  Marked = FALSE,
BOOL  Selected = FALSE
 

Creates a AttrTxtBaseLine Attribute.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
13/03/95
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
-

Definition at line 6431 of file txtattr.cpp.

06437              : AttrTxtBase(ContextNode, Direction, Locked, Mangled, Marked, Selected)  
06438 {                         
06439 } 


Member Function Documentation

void AttrTxtBaseLine::BaseLineRelativeTransform FIXED16  Scale,
FIXED16  Aspect
[virtual]
 

Transform the attribute using the baseline relative scale and aspect.

Author:
Ed_Cornes (Xara Group Ltd) <camelotdev@xara.com>
Date:
4/6/95
Parameters:
Scale - [INPUTS] Aspect -

Reimplemented from AttrTxtBase.

Definition at line 6664 of file txtattr.cpp.

06665 {
06666     TxtBaseLineAttribute* pBaseLineAttrVal=(TxtBaseLineAttribute*)GetAttributeValue();
06667     pBaseLineAttrVal->Value = XLONG(pBaseLineAttrVal->Value) * Scale;
06668 }

void AttrTxtBaseLine::CopyNodeContents AttrTxtBaseLine NodeCopy  )  [private]
 

This method copies the node's contents to the node pointed to by NodeCopy.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
28/4/93
Parameters:
[INPUTS] 
A copy of this node [OUTPUTS]
Returns:
-

Errors: An assertion failure will occur if NodeCopy is NULL

Scope: protected

Definition at line 6578 of file txtattr.cpp.

06579 {
06580     // Let the base class do its bit
06581     NodeAttribute::CopyNodeContents( NodeCopy );
06582     
06583     //Copy contents specific to derived class here
06584     NodeCopy->Value.Value = Value.Value;
06585 } 

virtual AttrIndex AttrTxtBaseLine::GetAttributeIndex  )  [inline, virtual]
 

Reimplemented from NodeAttribute.

Definition at line 1382 of file txtattr.h.

01382 { return ATTR_TXTBASELINE; }

virtual AttributeValue* AttrTxtBaseLine::GetAttributeValue  )  [inline, virtual]
 

Reimplemented from NodeAttribute.

Definition at line 1390 of file txtattr.h.

01390 { return &Value; }

UINT32 AttrTxtBaseLine::GetAttrNameID void   )  [virtual]
 

Returns back a string resource ID describing the attribute.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
22/2/94
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
Attribute description ID

Errors: -

See also:
-

Reimplemented from NodeAttribute.

Definition at line 6554 of file txtattr.cpp.

06555 {
06556     return (_R(IDS_BASELINE)); 
06557 }  

void AttrTxtBaseLine::GetDebugDetails StringBase Str  )  [virtual]
 

Used for debugging purposes during developement. Override in your own class and output suitable debugging details.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
24/04/94
Parameters:
- [INPUTS]

Reimplemented from NodeRenderable.

Definition at line 6644 of file txtattr.cpp.

06645 {
06646     NodeAttribute::GetDebugDetails( Str );
06647 
06648     String_256 TempStr;
06649     TempStr._MakeMsg( TEXT("\r\nRise=#1%ld\r\n"), Value.Value);
06650     (*Str) += TempStr;
06651 }

UINT32 AttrTxtBaseLine::GetNodeSize  )  const [virtual]
 

For finding the size of the node.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/93
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
The size of the node in bytes
See also:
Node::GetSubtreeSize

Reimplemented from Node.

Definition at line 6626 of file txtattr.cpp.

06627 {     
06628     return (sizeof(AttrTxtBaseLine)); 
06629 }

INT32 AttrTxtBaseLine::operator== const NodeAttribute Attrib  )  [virtual]
 

A virtual comparison operator. See NodeAttribute::operator== for a description of why it's required.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
13/03/95
Parameters:
Atrib,: The attribute to compare, which must be an AttrTxtBaseLine [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: An ENSURE failure will occur if Attrib does not have a AttrTxtBaseLine runtime class.

See also:
NodeAttribute::operator==

Reimplemented from NodeAttribute.

Definition at line 6529 of file txtattr.cpp.

06530 {
06531     ENSURE(Attrib.IsKindOf(CC_RUNTIME_CLASS(AttrTxtBaseLine)), 
06532         "Trying to compare two objects with different types"); 
06533     AttrTxtBaseLine* Attr = (AttrTxtBaseLine*) &Attrib;
06534     return (Attr->Value.Value == Value.Value); 
06535 } 

void AttrTxtBaseLine::PolyCopyNodeContents NodeRenderable pNodeCopy  )  [virtual]
 

Polymorphically copies the contents of this node to another.

Author:
Phil_Martin (Xara Group Ltd) <camelotdev@xara.com>
Date:
18/12/2003
Parameters:
- [OUTPUTS]
Returns:
Errors: An assertion failure will occur if NodeCopy is NULL Scope: protected

Reimplemented from NodeRenderable.

Definition at line 6600 of file txtattr.cpp.

06601 {
06602     ENSURE(pNodeCopy, "Trying to copy a node's contents into a NULL node");
06603     ENSURE(IS_A(pNodeCopy, AttrTxtBaseLine), "PolyCopyNodeContents given wrong dest node type");
06604 
06605     if (IS_A(pNodeCopy, AttrTxtBaseLine))
06606         CopyNodeContents((AttrTxtBaseLine*)pNodeCopy);
06607 }

void AttrTxtBaseLine::Render RenderRegion pRegion  )  [virtual]
 

'Renders' a Line Width attribute.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
13/03/95
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
-

Reimplemented from NodeAttribute.

Definition at line 6476 of file txtattr.cpp.

06477 {
06478     pRegion->SetTxtBaseLine(&Value, FALSE);
06479 }

Node * AttrTxtBaseLine::SimpleCopy void   )  [virtual]
 

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.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
13/03/95
Parameters:
- [INPUTS]
[OUTPUTS] 
Returns:
A copy of the node, or NULL if memory runs out

Errors: If memory runs out when trying to copy, then ERROR is called with an out of memory error and the function returns NULL.

Scope: protected

Reimplemented from NodeAttribute.

Definition at line 6502 of file txtattr.cpp.

06503 {
06504     AttrTxtBaseLine* NodeCopy = new AttrTxtBaseLine();
06505     ERRORIF(NodeCopy == NULL, _R(IDE_NOMORE_MEMORY), NULL); 
06506     CopyNodeContents(NodeCopy);
06507     return NodeCopy;
06508 } 

BOOL AttrTxtBaseLine::WritePreChildrenNative BaseCamelotFilter pFilter  )  [virtual]
 

Reimplemented from Node.

Definition at line 6695 of file txtattr.cpp.

06696 {
06697 #ifdef DO_EXPORT
06698     ERROR2IF(pFilter==NULL, FALSE, "Parameter pFilter == NULL.");
06699 
06700     return CXaraFileTxtBaseLine::WritePreChildrenNative(pFilter, this);
06701 #else
06702     return FALSE;
06703 #endif
06704 }

BOOL AttrTxtBaseLine::WritePreChildrenWeb BaseCamelotFilter pFilter  )  [virtual]
 

Saves the text baseline attribute to the new file format filter.

Author:
Andy_Hayward (Xara Group Ltd) <camelotdev@xara.com>
Date:
09/07/96
Parameters:
pFilter - new camelot filter to save to [INPUTS]
Returns:
TRUE if successful, FALSE otherwise

Reimplemented from Node.

Definition at line 6684 of file txtattr.cpp.

06685 {
06686 #ifdef DO_EXPORT
06687     ERROR2IF(pFilter==NULL, FALSE, "Parameter pFilter == NULL.");
06688 
06689     return CXaraFileTxtBaseLine::WritePreChildrenWeb(pFilter, this);
06690 #else
06691     return FALSE;
06692 #endif
06693 }


Member Data Documentation

TxtBaseLineAttribute AttrTxtBaseLine::Value
 

Definition at line 1405 of file txtattr.h.


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