TxtLeftMarginAttribute Class Reference

This text attribute specifies the left margin. More...

#include <txtattr.h>

Inheritance diagram for TxtLeftMarginAttribute:

TxtBaseClassAttribute AttributeValue CCObject SimpleCCObject List of all members.

Public Member Functions

 TxtLeftMarginAttribute ()
 Default Constuctor for TxtLeftMarginAttribute.
 TxtLeftMarginAttribute (MILLIPOINT value)
 TxtLeftMarginAttribute constructor.
virtual void Restore (RenderRegion *, BOOL)
 Restores the TxtLeftMarginAttribute attribute for the given render region.
virtual void Render (RenderRegion *pRegion, BOOL Temp=FALSE)
 Sets the TxtLeftMarginAttribute attribute for the given render region.
virtual void SimpleCopy (AttributeValue *)
 See AttributeValue::SimpleCopy.
virtual NodeAttributeMakeNode ()
 Make a AttrTxtTracking node, see base class.
BOOL IsDifferent (AttributeValue *pAttr)
 See base class version.
virtual TxtLeftMarginAttributeoperator= (TxtLeftMarginAttribute &Attrib)
 Make the Attribute the same as the other.
INT32 operator== (const TxtLeftMarginAttribute &Attrib)
 Comparison operator. See NodeAttribute::operator== for a description of why it's required.

Static Public Member Functions

static BOOL Init ()
 Registers default attribute.

Public Attributes

MILLIPOINT Value

Detailed Description

This text attribute specifies the left margin.

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

Definition at line 695 of file txtattr.h.


Constructor & Destructor Documentation

TxtLeftMarginAttribute::TxtLeftMarginAttribute  ) 
 

Default Constuctor for TxtLeftMarginAttribute.

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

Definition at line 2416 of file txtattr.cpp.

02417 {
02418     Value = 0; 
02419 } 

TxtLeftMarginAttribute::TxtLeftMarginAttribute MILLIPOINT  value  ) 
 

TxtLeftMarginAttribute constructor.

Author:
Martin Wuerthner <xara@mw-software.com>
Date:
19/06/06
Parameters:
Value,: The left margin in millipoints [INPUTS]

Definition at line 2433 of file txtattr.cpp.

02434 { 
02435     Value = value;
02436 }


Member Function Documentation

BOOL TxtLeftMarginAttribute::Init void   )  [static]
 

Registers default attribute.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
13/03/95
Returns:
TRUE - initialised ok; FALSE if not.

Errors: Out of memory.

See also:
AttributeManager

Reimplemented from SimpleCCObject.

Definition at line 2566 of file txtattr.cpp.

02567 {
02568     TxtLeftMarginAttribute *pAttr = new TxtLeftMarginAttribute;
02569     if (pAttr==NULL)
02570         // error message has already been set by new
02571         return FALSE;
02572 
02573     UINT32 ID = AttributeManager::RegisterDefaultAttribute(CC_RUNTIME_CLASS(BaseTextClass), 
02574                                                          pAttr);
02575 
02576     ERROR2IF(ID == ATTR_BAD_ID, FALSE, "Bad ID when Initialising TxtLeftMarginAttribute");
02577 
02578     return TRUE;
02579 }

BOOL TxtLeftMarginAttribute::IsDifferent AttributeValue pAttr  )  [virtual]
 

See base class version.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
13/03/95
Returns:
Errors: The two attributes are not of the same type.
See also:
AttributeValue::IsDifferent

Reimplemented from AttributeValue.

Definition at line 2543 of file txtattr.cpp.

02544 {
02545     // This must be at least a FillGeometryAttribute...
02546     ERROR3IF(!pAttr->IsKindOf(CC_RUNTIME_CLASS(TxtLeftMarginAttribute)), 
02547                 "Different attribute types in TxtLeftMarginAttribute::IsDifferent()");
02548 
02549     // Check they are NOT the same.
02550     return ( !(*((TxtLeftMarginAttribute *)pAttr) == *this) ); 
02551 }

NodeAttribute * TxtLeftMarginAttribute::MakeNode  )  [virtual]
 

Make a AttrTxtTracking node, see base class.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
13/03/95
Returns:
Pointer to the new node, or NULL if out of memory.

Errors: Out of memory

See also:
AttributeValue::MakeNode

Reimplemented from AttributeValue.

Definition at line 2594 of file txtattr.cpp.

02595 {
02596     // Create new attribute node
02597     AttrTxtLeftMargin*  pAttr = new AttrTxtLeftMargin();
02598     if (pAttr==NULL)      
02599         // error message has already been set by new
02600         return NULL;
02601 
02602     // Copy attribute value into the new node.
02603     pAttr->Value.SimpleCopy(this);
02604 
02605     // Return the new node
02606     return pAttr;
02607 }

TxtLeftMarginAttribute & TxtLeftMarginAttribute::operator= TxtLeftMarginAttribute Attrib  )  [virtual]
 

Make the Attribute the same as the other.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
13/03/95
Parameters:
Attrib - the attribute to copy [INPUTS]
Returns:
Usual semantics for equality.

Definition at line 2486 of file txtattr.cpp.

02487 {    
02488     Value = Attrib.Value;
02489     return *this;
02490 }

INT32 TxtLeftMarginAttribute::operator== const TxtLeftMarginAttribute Attrib  ) 
 

Comparison operator. See NodeAttribute::operator== for a description of why it's required.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
23/8/94
Parameters:
Attrib - the attribute to compare this attribute with [INPUTS]
Returns:
Usual semantics for equality.
See also:
NodeAttribute::operator==

Definition at line 2506 of file txtattr.cpp.

02507 {
02508     return (Attrib.Value == Value); 
02509 }

void TxtLeftMarginAttribute::Render RenderRegion pRegion,
BOOL  Temp = FALSE
[virtual]
 

Sets the TxtLeftMarginAttribute attribute for the given render region.

Author:
Martin Wuerthner <xara@mw-software.com>
Date:
19/06/06
Parameters:
pRegion - the render region to render this attribute into. [INPUTS]

Implements AttributeValue.

Definition at line 2449 of file txtattr.cpp.

02450 {
02451     pRegion->SetTxtLeftMargin(this, Temp);
02452 }

void TxtLeftMarginAttribute::Restore RenderRegion pRegion,
BOOL  Temp
[virtual]
 

Restores the TxtLeftMarginAttribute attribute for the given render region.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
13/03/95
Parameters:
pRegion - the render region to restore the attribute into. [INPUTS] Temp - TRUE if this is a temporary attribute, FALSE if it is permanent (e.g. it's in a document tree).
See also:
-

Implements TxtBaseClassAttribute.

Definition at line 2468 of file txtattr.cpp.

02469 {
02470     pRegion->RestoreTxtLeftMargin(this, Temp);
02471 }

void TxtLeftMarginAttribute::SimpleCopy AttributeValue pValue  )  [virtual]
 

See AttributeValue::SimpleCopy.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
13/03/95
Parameters:
pAttr - pointer to the AttributeValue to copy. [INPUTS]

Implements AttributeValue.

Definition at line 2522 of file txtattr.cpp.

02523 {
02524     ERROR3IF(!IS_A(pValue, TxtLeftMarginAttribute), 
02525         "Invalid Attribute value passed to TxtLeftMarginAttribute::SimpleCopy");
02526     // We may as well just use our assignment operator.
02527     *this = *((TxtLeftMarginAttribute*)pValue);
02528 }


Member Data Documentation

MILLIPOINT TxtLeftMarginAttribute::Value
 

Definition at line 716 of file txtattr.h.


The documentation for this class was generated from the following files:
Generated on Sat Nov 10 04:02:32 2007 for Camelot by  doxygen 1.4.4