AttrTxtFirstIndent Class Reference

AttrTxtFirstIndent: specifies the first line indent. More...

#include <txtattr.h>

Inheritance diagram for AttrTxtFirstIndent:

AttrTxtBase NodeAttribute NodeRenderable Node CCObject SimpleCCObject List of all members.

Public Member Functions

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

TxtFirstIndentAttribute Value

Private Member Functions

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

Detailed Description

AttrTxtFirstIndent: specifies the first line indent.

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

Definition at line 1530 of file txtattr.h.


Constructor & Destructor Documentation

AttrTxtFirstIndent::AttrTxtFirstIndent (   )  [inline]
 

Definition at line 1536 of file txtattr.h.

01536 {}

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

Creates a AttrTxtFirstIndent Attribute.

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

Errors: -

See also:
-

Definition at line 7268 of file txtattr.cpp.

07274              : AttrTxtBase(ContextNode, Direction, Locked, Mangled, Marked, Selected)  
07275 {                         
07276 } 


Member Function Documentation

void AttrTxtFirstIndent::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 7473 of file txtattr.cpp.

07474 {
07475     TxtFirstIndentAttribute* pFirstIndentAttrVal=(TxtFirstIndentAttribute*)GetAttributeValue();
07476     pFirstIndentAttrVal->Value = XLONG(pFirstIndentAttrVal->Value) * Scale;
07477 }

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

07390 {
07391     // Let the base class do its bit
07392     NodeAttribute::CopyNodeContents( NodeCopy );
07393     
07394     //Copy contents specific to derived class here
07395     NodeCopy->Value.Value = Value.Value;
07396 } 

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

Reimplemented from NodeAttribute.

Definition at line 1551 of file txtattr.h.

01551 { return ATTR_TXTFIRSTINDENT; }

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

Reimplemented from NodeAttribute.

Definition at line 1557 of file txtattr.h.

01557 { return &Value; }

UINT32 AttrTxtFirstIndent::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 7365 of file txtattr.cpp.

07366 {
07367     return (_R(IDS_FIRSTINDENT)); 
07368 }  

void AttrTxtFirstIndent::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 7453 of file txtattr.cpp.

07454 {
07455     NodeAttribute::GetDebugDetails( Str );
07456 
07457     String_256 TempStr;
07458     TempStr._MakeMsg( TEXT("\r\nLeft margin=#1%ld\r\n"), Value.Value);
07459     (*Str) += TempStr;
07460 }

UINT32 AttrTxtFirstIndent::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 7435 of file txtattr.cpp.

07436 {     
07437     return (sizeof(AttrTxtFirstIndent)); 
07438 }

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

Reimplemented from NodeAttribute.

Definition at line 1558 of file txtattr.h.

01558 { return TRUE; }

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

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

See also:
NodeAttribute::operator==

Reimplemented from NodeAttribute.

Definition at line 7340 of file txtattr.cpp.

07341 {
07342     ENSURE(Attrib.IsKindOf(CC_RUNTIME_CLASS(AttrTxtFirstIndent)), 
07343         "Trying to compare two objects with different types"); 
07344     AttrTxtFirstIndent* Attr = (AttrTxtFirstIndent*) &Attrib;
07345     return (Attr->Value.Value == Value.Value); 
07346 } 

void AttrTxtFirstIndent::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 7411 of file txtattr.cpp.

07412 {
07413     ENSURE(pNodeCopy, "Trying to copy a node's contents into a NULL node");
07414     ENSURE(IS_A(pNodeCopy, AttrTxtFirstIndent), "PolyCopyNodeContents given wrong dest node type");
07415 
07416     if (IS_A(pNodeCopy, AttrTxtFirstIndent))
07417         CopyNodeContents((AttrTxtFirstIndent*)pNodeCopy);
07418 }

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

'Renders' a left indent 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 7289 of file txtattr.cpp.

07290 {
07291     pRegion->SetTxtFirstIndent(&Value, FALSE);
07292 }

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

07314 {
07315     AttrTxtFirstIndent* NodeCopy = new AttrTxtFirstIndent();
07316     ERRORIF(NodeCopy == NULL, _R(IDE_NOMORE_MEMORY), NULL); 
07317     CopyNodeContents(NodeCopy);
07318     return NodeCopy;
07319 } 

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

Reimplemented from Node.

Definition at line 7504 of file txtattr.cpp.

07505 {
07506 #ifdef DO_EXPORT
07507     ERROR2IF(pFilter==NULL, FALSE, "Parameter pFilter == NULL.");
07508 
07509     return CXaraFileTxtFirstIndent::WritePreChildrenNative(pFilter, this);
07510 #else
07511     return FALSE;
07512 #endif
07513 }

BOOL AttrTxtFirstIndent::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 7493 of file txtattr.cpp.

07494 {
07495 #ifdef DO_EXPORT
07496     ERROR2IF(pFilter==NULL, FALSE, "Parameter pFilter == NULL.");
07497 
07498     return CXaraFileTxtFirstIndent::WritePreChildrenWeb(pFilter, this);
07499 #else
07500     return FALSE;
07501 #endif
07502 }


Member Data Documentation

TxtFirstIndentAttribute AttrTxtFirstIndent::Value
 

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