AttrTxtLeftMargin Class Reference

AttrTxtLeftMargin: specifies the left margin. More...

#include <txtattr.h>

Inheritance diagram for AttrTxtLeftMargin:

AttrTxtBase NodeAttribute NodeRenderable Node CCObject SimpleCCObject List of all members.

Public Member Functions

 AttrTxtLeftMargin ()
 AttrTxtLeftMargin (Node *ContextNode, AttachNodeDirection Direction, BOOL Locked=FALSE, BOOL Mangled=FALSE, BOOL Marked=FALSE, BOOL Selected=FALSE)
 Creates a AttrTxtLeftMargin Attribute.
void Render (RenderRegion *pRender)
 'Renders' a left margin 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 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

TxtLeftMarginAttribute Value

Private Member Functions

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

Detailed Description

AttrTxtLeftMargin: specifies the left margin.

Author:
Martin Wuerthner <xara@mw-software.com>
Date:
13/06/06

Definition at line 1418 of file txtattr.h.


Constructor & Destructor Documentation

AttrTxtLeftMargin::AttrTxtLeftMargin  )  [inline]
 

Definition at line 1424 of file txtattr.h.

01424 {}

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

Creates a AttrTxtLeftMargin Attribute.

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

Definition at line 6726 of file txtattr.cpp.

06732              : AttrTxtBase(ContextNode, Direction, Locked, Mangled, Marked, Selected)  
06733 {                         
06734 } 


Member Function Documentation

void AttrTxtLeftMargin::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 6928 of file txtattr.cpp.

06929 {
06930     TxtLeftMarginAttribute* pLeftMarginAttrVal=(TxtLeftMarginAttribute*)GetAttributeValue();
06931     pLeftMarginAttrVal->Value = XLONG(pLeftMarginAttrVal->Value) * Scale;
06932 }

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

06845 {
06846     // Let the base class do its bit
06847     NodeAttribute::CopyNodeContents( NodeCopy );
06848     
06849     //Copy contents specific to derived class here
06850     NodeCopy->Value.Value = Value.Value;
06851 } 

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

Reimplemented from NodeAttribute.

Definition at line 1439 of file txtattr.h.

01439 { return ATTR_TXTLEFTMARGIN; }

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

Reimplemented from NodeAttribute.

Definition at line 1445 of file txtattr.h.

01445 { return &Value; }

UINT32 AttrTxtLeftMargin::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 6820 of file txtattr.cpp.

06821 {
06822     return (_R(IDS_LEFTMARGIN)); 
06823 }  

void AttrTxtLeftMargin::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 6908 of file txtattr.cpp.

06909 {
06910     NodeAttribute::GetDebugDetails( Str );
06911 
06912     String_256 TempStr;
06913     TempStr._MakeMsg( TEXT("\r\nLeft margin=#1%ld\r\n"), Value.Value);
06914     (*Str) += TempStr;
06915 }

UINT32 AttrTxtLeftMargin::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 6890 of file txtattr.cpp.

06891 {     
06892     return (sizeof(AttrTxtLeftMargin)); 
06893 }

virtual BOOL AttrTxtLeftMargin::IsALineLevelAttrib  )  [inline, virtual]
 

Reimplemented from NodeAttribute.

Definition at line 1446 of file txtattr.h.

01446 { return TRUE; }

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

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

See also:
NodeAttribute::operator==

Reimplemented from NodeAttribute.

Definition at line 6795 of file txtattr.cpp.

06796 {
06797     ENSURE(Attrib.IsKindOf(CC_RUNTIME_CLASS(AttrTxtLeftMargin)), 
06798         "Trying to compare two objects with different types"); 
06799     AttrTxtLeftMargin* Attr = (AttrTxtLeftMargin*) &Attrib;
06800     return (Attr->Value.Value == Value.Value); 
06801 } 

void AttrTxtLeftMargin::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 6866 of file txtattr.cpp.

06867 {
06868     ENSURE(pNodeCopy, "Trying to copy a node's contents into a NULL node");
06869     ENSURE(IS_A(pNodeCopy, AttrTxtLeftMargin), "PolyCopyNodeContents given wrong dest node type");
06870 
06871     if (IS_A(pNodeCopy, AttrTxtLeftMargin))
06872         CopyNodeContents((AttrTxtLeftMargin*)pNodeCopy);
06873 }

void AttrTxtLeftMargin::Render RenderRegion pRegion  )  [virtual]
 

'Renders' a left margin attribute

Author:
Martin Wuerthner <xara@mw-software.com>
Date:
19/06/06
Parameters:
pRenderRegion = the render region to which the attribute should be rendered [INPUTS]

Reimplemented from NodeAttribute.

Definition at line 6747 of file txtattr.cpp.

06748 {
06749     pRegion->SetTxtLeftMargin(&Value, FALSE);
06750 }

Node * AttrTxtLeftMargin::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
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.

Reimplemented from NodeAttribute.

Definition at line 6768 of file txtattr.cpp.

06769 {
06770     AttrTxtLeftMargin* NodeCopy = new AttrTxtLeftMargin();
06771     ERRORIF(NodeCopy == NULL, _R(IDE_NOMORE_MEMORY), NULL); 
06772     CopyNodeContents(NodeCopy);
06773     return NodeCopy;
06774 } 

BOOL AttrTxtLeftMargin::WritePreChildrenNative BaseCamelotFilter pFilter  )  [virtual]
 

Reimplemented from Node.

Definition at line 6959 of file txtattr.cpp.

06960 {
06961 #ifdef DO_EXPORT
06962     ERROR2IF(pFilter==NULL, FALSE, "Parameter pFilter == NULL.");
06963 
06964     return CXaraFileTxtLeftMargin::WritePreChildrenNative(pFilter, this);
06965 #else
06966     return FALSE;
06967 #endif
06968 }

BOOL AttrTxtLeftMargin::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 6948 of file txtattr.cpp.

06949 {
06950 #ifdef DO_EXPORT
06951     ERROR2IF(pFilter==NULL, FALSE, "Parameter pFilter == NULL.");
06952 
06953     return CXaraFileTxtLeftMargin::WritePreChildrenWeb(pFilter, this);
06954 #else
06955     return FALSE;
06956 #endif
06957 }


Member Data Documentation

TxtLeftMarginAttribute AttrTxtLeftMargin::Value
 

Definition at line 1461 of file txtattr.h.


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