AttrTxtRightMargin Class Reference

AttrTxtRightMargin: specifies the right margin. More...

#include <txtattr.h>

Inheritance diagram for AttrTxtRightMargin:

AttrTxtBase NodeAttribute NodeRenderable Node CCObject SimpleCCObject List of all members.

Public Member Functions

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

TxtRightMarginAttribute Value

Private Member Functions

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

Detailed Description

AttrTxtRightMargin: specifies the right margin.

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

Definition at line 1474 of file txtattr.h.


Constructor & Destructor Documentation

AttrTxtRightMargin::AttrTxtRightMargin (   )  [inline]
 

Definition at line 1480 of file txtattr.h.

01480 {}

AttrTxtRightMargin::AttrTxtRightMargin (  Node *  ContextNode,
AttachNodeDirection  Direction,
BOOL  Locked = FALSE,
BOOL  Mangled = FALSE,
BOOL  Marked = FALSE,
BOOL  Selected = FALSE
) 
 

Creates a AttrTxtRightMargin Attribute.

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

Errors: -

See also:
-

Definition at line 6995 of file txtattr.cpp.

07001              : AttrTxtBase(ContextNode, Direction, Locked, Mangled, Marked, Selected)  
07002 {                         
07003 } 


Member Function Documentation

void AttrTxtRightMargin::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 7200 of file txtattr.cpp.

07201 {
07202     TxtRightMarginAttribute* pRightMarginAttrVal=(TxtRightMarginAttribute*)GetAttributeValue();
07203     pRightMarginAttrVal->Value = XLONG(pRightMarginAttrVal->Value) * Scale;
07204 }

void AttrTxtRightMargin::CopyNodeContents (  AttrTxtRightMargin *  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 7116 of file txtattr.cpp.

07117 {
07118     // Let the base class do its bit
07119     NodeAttribute::CopyNodeContents( NodeCopy );
07120     
07121     //Copy contents specific to derived class here
07122     NodeCopy->Value.Value = Value.Value;
07123 } 

virtual AttrIndex AttrTxtRightMargin::GetAttributeIndex (   )  [inline, virtual]
 

Reimplemented from NodeAttribute.

Definition at line 1495 of file txtattr.h.

01495 { return ATTR_TXTRIGHTMARGIN; }

virtual AttributeValue* AttrTxtRightMargin::GetAttributeValue (   )  [inline, virtual]
 

Reimplemented from NodeAttribute.

Definition at line 1501 of file txtattr.h.

01501 { return &Value; }

UINT32 AttrTxtRightMargin::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 7092 of file txtattr.cpp.

07093 {
07094     return (_R(IDS_RIGHTMARGIN)); 
07095 }  

void AttrTxtRightMargin::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 7180 of file txtattr.cpp.

07181 {
07182     NodeAttribute::GetDebugDetails( Str );
07183 
07184     String_256 TempStr;
07185     TempStr._MakeMsg( TEXT("\r\nRight margin=#1%ld\r\n"), Value.Value);
07186     (*Str) += TempStr;
07187 }

UINT32 AttrTxtRightMargin::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 7162 of file txtattr.cpp.

07163 {     
07164     return (sizeof(AttrTxtRightMargin)); 
07165 }

virtual BOOL AttrTxtRightMargin::IsALineLevelAttrib (   )  [inline, virtual]
 

Reimplemented from NodeAttribute.

Definition at line 1502 of file txtattr.h.

01502 { return TRUE; }

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

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

See also:
NodeAttribute::operator==

Reimplemented from NodeAttribute.

Definition at line 7067 of file txtattr.cpp.

07068 {
07069     ENSURE(Attrib.IsKindOf(CC_RUNTIME_CLASS(AttrTxtRightMargin)), 
07070         "Trying to compare two objects with different types"); 
07071     AttrTxtRightMargin* Attr = (AttrTxtRightMargin*) &Attrib;
07072     return (Attr->Value.Value == Value.Value); 
07073 } 

void AttrTxtRightMargin::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 7138 of file txtattr.cpp.

07139 {
07140     ENSURE(pNodeCopy, "Trying to copy a node's contents into a NULL node");
07141     ENSURE(IS_A(pNodeCopy, AttrTxtRightMargin), "PolyCopyNodeContents given wrong dest node type");
07142 
07143     if (IS_A(pNodeCopy, AttrTxtRightMargin))
07144         CopyNodeContents((AttrTxtRightMargin*)pNodeCopy);
07145 }

void AttrTxtRightMargin::Render (  RenderRegion *  pRegion  )  [virtual]
 

'Renders' a right 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 7016 of file txtattr.cpp.

07017 {
07018     pRegion->SetTxtRightMargin(&Value, FALSE);
07019 }

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

07041 {
07042     AttrTxtRightMargin* NodeCopy = new AttrTxtRightMargin();
07043     ERRORIF(NodeCopy == NULL, _R(IDE_NOMORE_MEMORY), NULL); 
07044     CopyNodeContents(NodeCopy);
07045     return NodeCopy;
07046 } 

BOOL AttrTxtRightMargin::WritePreChildrenNative (  BaseCamelotFilter *  pFilter  )  [virtual]
 

Reimplemented from Node.

Definition at line 7231 of file txtattr.cpp.

07232 {
07233 #ifdef DO_EXPORT
07234     ERROR2IF(pFilter==NULL, FALSE, "Parameter pFilter == NULL.");
07235 
07236     return CXaraFileTxtRightMargin::WritePreChildrenNative(pFilter, this);
07237 #else
07238     return FALSE;
07239 #endif
07240 }

BOOL AttrTxtRightMargin::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 7220 of file txtattr.cpp.

07221 {
07222 #ifdef DO_EXPORT
07223     ERROR2IF(pFilter==NULL, FALSE, "Parameter pFilter == NULL.");
07224 
07225     return CXaraFileTxtRightMargin::WritePreChildrenWeb(pFilter, this);
07226 #else
07227     return FALSE;
07228 #endif
07229 }


Member Data Documentation

TxtRightMarginAttribute AttrTxtRightMargin::Value
 

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