AttrTxtFontSize Class Reference

AttrTxtFontSize: specifies the size of a font (height). More...

#include <txtattr.h>

Inheritance diagram for AttrTxtFontSize:

AttrTxtBase NodeAttribute NodeRenderable Node CCObject SimpleCCObject List of all members.

Public Member Functions

 AttrTxtFontSize ()
 Default constructor for AttrTxtFontSize class.
 AttrTxtFontSize (Node *ContextNode, AttachNodeDirection Direction, BOOL Locked=FALSE, BOOL Mangled=FALSE, BOOL Marked=FALSE, BOOL Selected=FALSE)
 Creates a AttrTxtFontSize 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 font size attribute to the new file format filter.
virtual BOOL WritePreChildrenNative (BaseCamelotFilter *pFilter)

Public Attributes

TxtFontSizeAttribute Value

Private Member Functions

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

Detailed Description

AttrTxtFontSize: specifies the size of a font (height).

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

Definition at line 1244 of file txtattr.h.


Constructor & Destructor Documentation

AttrTxtFontSize::AttrTxtFontSize  ) 
 

Default constructor for AttrTxtFontSize class.

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

Errors: -

See also:
-

Definition at line 4723 of file txtattr.cpp.

04724 {
04725 }

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

Creates a AttrTxtFontSize Attribute.

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

Errors: -

See also:
-

Definition at line 4698 of file txtattr.cpp.

04704              : AttrTxtBase(ContextNode, Direction, Locked, Mangled, Marked, Selected)  
04705 {                         
04706 } 


Member Function Documentation

void AttrTxtFontSize::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 4931 of file txtattr.cpp.

04932 {
04933     TxtFontSizeAttribute* pFontSizeAttrVal=(TxtFontSizeAttribute*)GetAttributeValue();
04934     pFontSizeAttrVal->FontSize = XLONG(pFontSizeAttrVal->FontSize) * Scale;
04935 }

void AttrTxtFontSize::CopyNodeContents AttrTxtFontSize 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 4845 of file txtattr.cpp.

04846 {
04847     // Let the base class do its bit
04848     AttrTxtBase::CopyNodeContents( NodeCopy );
04849     
04850     //Copy contents specific to derived class here
04851     NodeCopy->Value.FontSize = Value.FontSize;
04852 } 

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

Reimplemented from NodeAttribute.

Definition at line 1266 of file txtattr.h.

01266 { return ATTR_TXTFONTSIZE; }

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

Reimplemented from NodeAttribute.

Definition at line 1274 of file txtattr.h.

01274 { return &Value; }

UINT32 AttrTxtFontSize::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 4821 of file txtattr.cpp.

04822 {
04823     return (_R(IDS_FONTSIZE)); 
04824 }  

void AttrTxtFontSize::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 4911 of file txtattr.cpp.

04912 {
04913     NodeAttribute::GetDebugDetails( Str );
04914 
04915     String_256 TempStr;
04916     TempStr._MakeMsg( TEXT("\r\nFontSize=#1%ld\r\n"), Value.FontSize);
04917     (*Str) += TempStr;
04918 }

UINT32 AttrTxtFontSize::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 4893 of file txtattr.cpp.

04894 {     
04895     return (sizeof(AttrTxtFontSize)); 
04896 }

INT32 AttrTxtFontSize::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 AttrTxtFontSize [INPUTS]
- [OUTPUTS]
Returns:
-

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

See also:
NodeAttribute::operator==

Reimplemented from NodeAttribute.

Definition at line 4796 of file txtattr.cpp.

04797 {
04798     ENSURE(Attrib.IsKindOf(CC_RUNTIME_CLASS(AttrTxtFontSize)), 
04799         "Trying to compare two objects with different types"); 
04800     AttrTxtFontSize* Attr = (AttrTxtFontSize*) &Attrib;
04801     return (Attr->Value.FontSize == Value.FontSize); 
04802 } 

void AttrTxtFontSize::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 4867 of file txtattr.cpp.

04868 {
04869     ENSURE(pNodeCopy, "Trying to copy a node's contents into a NULL node");
04870     ENSURE(IS_A(pNodeCopy, AttrTxtFontSize), "PolyCopyNodeContents given wrong dest node type");
04871 
04872     if (IS_A(pNodeCopy, AttrTxtFontSize))
04873         CopyNodeContents((AttrTxtFontSize*)pNodeCopy);
04874 }

void AttrTxtFontSize::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 4743 of file txtattr.cpp.

04744 {
04745     pRegion->SetTxtFontSize(&Value, FALSE);
04746 }

Node * AttrTxtFontSize::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 4769 of file txtattr.cpp.

04770 {
04771     AttrTxtFontSize* NodeCopy = new AttrTxtFontSize();
04772     ERRORIF(NodeCopy == NULL, _R(IDE_NOMORE_MEMORY), NULL); 
04773     CopyNodeContents(NodeCopy);
04774     return NodeCopy;
04775 } 

BOOL AttrTxtFontSize::WritePreChildrenNative BaseCamelotFilter pFilter  )  [virtual]
 

Reimplemented from Node.

Definition at line 4961 of file txtattr.cpp.

04962 {
04963 #ifdef DO_EXPORT
04964     ERROR2IF(pFilter==NULL, FALSE, "Parameter pFilter == NULL.");
04965 
04966     return CXaraFileTxtFontSize::WritePreChildrenNative(pFilter, this);
04967 #else
04968     return FALSE;
04969 #endif
04970 }

BOOL AttrTxtFontSize::WritePreChildrenWeb BaseCamelotFilter pFilter  )  [virtual]
 

Saves the text font size 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 4950 of file txtattr.cpp.

04951 {
04952 #ifdef DO_EXPORT
04953     ERROR2IF(pFilter==NULL, FALSE, "Parameter pFilter == NULL.");
04954 
04955     return CXaraFileTxtFontSize::WritePreChildrenWeb(pFilter, this);
04956 #else
04957     return FALSE;
04958 #endif
04959 }


Member Data Documentation

TxtFontSizeAttribute AttrTxtFontSize::Value
 

Definition at line 1289 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