AttrTxtScript Class Reference

AttrTxtScript: Specifies sub/super script. More...

#include <txtattr.h>

Inheritance diagram for AttrTxtScript:

AttrTxtBase NodeAttribute NodeRenderable Node CCObject SimpleCCObject List of all members.

Public Member Functions

 AttrTxtScript ()
 Default constructor for AttrTxtScript class.
 AttrTxtScript (Node *ContextNode, AttachNodeDirection Direction, BOOL Locked=FALSE, BOOL Mangled=FALSE, BOOL Marked=FALSE, BOOL Selected=FALSE)
 Creates a AttrTxtScript 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 PolyCopyNodeContents (NodeRenderable *pNodeCopy)
 Polymorphically copies the contents of this node to another.
virtual BOOL WritePreChildrenWeb (BaseCamelotFilter *pFilter)
 Saves the text script attribute to the new file format filter.
virtual BOOL WritePreChildrenNative (BaseCamelotFilter *pFilter)

Public Attributes

TxtScriptAttribute Value

Private Member Functions

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

Detailed Description

AttrTxtScript: Specifies sub/super script.

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

Definition at line 1303 of file txtattr.h.


Constructor & Destructor Documentation

AttrTxtScript::AttrTxtScript  ) 
 

Default constructor for AttrTxtScript class.

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

Errors: -

See also:
-

Definition at line 6171 of file txtattr.cpp.

06172 {
06173 }

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

Creates a AttrTxtScript Attribute.

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

Errors: -

See also:
-

Definition at line 6146 of file txtattr.cpp.

06152              : AttrTxtBase(ContextNode, Direction, Locked, Mangled, Marked, Selected)  
06153 {                         
06154 } 


Member Function Documentation

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

06294 {
06295     // Let the base class do its bit
06296     NodeAttribute::CopyNodeContents( NodeCopy );
06297     
06298     //Copy contents specific to derived class here
06299     NodeCopy->Value.Size = Value.Size;
06300     NodeCopy->Value.Offset = Value.Offset;
06301 } 

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

Reimplemented from NodeAttribute.

Definition at line 1325 of file txtattr.h.

01325 { return ATTR_TXTSCRIPT; }

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

Reimplemented from NodeAttribute.

Definition at line 1333 of file txtattr.h.

01333 { return &Value; }

UINT32 AttrTxtScript::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 6269 of file txtattr.cpp.

06270 {
06271     return (_R(IDS_SCRIPT)); 
06272 }  

void AttrTxtScript::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 6360 of file txtattr.cpp.

06361 {
06362     NodeAttribute::GetDebugDetails( Str );
06363 
06364     String_256          TempStr;
06365     TempStr._MakeMsg( TEXT("\r\nSize=#1%ld\r\n"), Value.Size.GetRawLong() );
06366     (*Str) += TempStr;
06367     TempStr._MakeMsg( TEXT("Offset=#1%ld\r\n"), Value.Offset.GetRawLong() );
06368     (*Str) += TempStr;
06369 }

UINT32 AttrTxtScript::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 6342 of file txtattr.cpp.

06343 {     
06344     return (sizeof(AttrTxtScript)); 
06345 }

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

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

See also:
NodeAttribute::operator==

Reimplemented from NodeAttribute.

Definition at line 6244 of file txtattr.cpp.

06245 {
06246     ENSURE(Attrib.IsKindOf(CC_RUNTIME_CLASS(AttrTxtScript)), 
06247         "Trying to compare two objects with different types"); 
06248     AttrTxtScript* Attr = (AttrTxtScript*) &Attrib;
06249     return ((Attr->Value.Size == Value.Size) && (Attr->Value.Offset == Value.Offset)); 
06250 } 

void AttrTxtScript::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 6316 of file txtattr.cpp.

06317 {
06318     ENSURE(pNodeCopy, "Trying to copy a node's contents into a NULL node");
06319     ENSURE(IS_A(pNodeCopy, AttrTxtScript), "PolyCopyNodeContents given wrong dest node type");
06320 
06321     if (IS_A(pNodeCopy, AttrTxtScript))
06322         CopyNodeContents((AttrTxtScript*)pNodeCopy);
06323 }

void AttrTxtScript::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 6191 of file txtattr.cpp.

06192 {
06193     pRegion->SetTxtScript(&Value, FALSE);
06194 }

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

06218 {
06219     AttrTxtScript* NodeCopy = new AttrTxtScript();
06220     ERRORIF(NodeCopy == NULL, _R(IDE_NOMORE_MEMORY), NULL); 
06221     CopyNodeContents(NodeCopy);
06222     return NodeCopy;
06223 } 

BOOL AttrTxtScript::WritePreChildrenNative BaseCamelotFilter pFilter  )  [virtual]
 

Reimplemented from Node.

Definition at line 6395 of file txtattr.cpp.

06396 {
06397 #ifdef DO_EXPORT
06398     ERROR2IF(pFilter==NULL, FALSE, "Parameter pFilter == NULL.");
06399 
06400     return CXaraFileTxtScript::WritePreChildrenNative(pFilter, this);
06401 #else
06402     return FALSE;
06403 #endif
06404 }

BOOL AttrTxtScript::WritePreChildrenWeb BaseCamelotFilter pFilter  )  [virtual]
 

Saves the text script 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 6384 of file txtattr.cpp.

06385 {
06386 #ifdef DO_EXPORT
06387     ERROR2IF(pFilter==NULL, FALSE, "Parameter pFilter == NULL.");
06388 
06389     return CXaraFileTxtScript::WritePreChildrenWeb(pFilter, this);
06390 #else
06391     return FALSE;
06392 #endif
06393 }


Member Data Documentation

TxtScriptAttribute AttrTxtScript::Value
 

Definition at line 1346 of file txtattr.h.


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