TxtRightMarginAttribute Class Reference

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

#include <txtattr.h>

Inheritance diagram for TxtRightMarginAttribute:

TxtBaseClassAttribute AttributeValue CCObject SimpleCCObject List of all members.

Public Member Functions

 TxtRightMarginAttribute ()
 Default Constuctor for TxtLeftMarginAttribute.
 TxtRightMarginAttribute (MILLIPOINT value)
 TxtRightMarginAttribute constructor.
virtual void Restore (RenderRegion *, BOOL)
 Restores the TxtRightMarginAttribute attribute for the given render region.
virtual void Render (RenderRegion *pRegion, BOOL Temp=FALSE)
 Sets the TxtRightMarginAttribute 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 TxtRightMarginAttributeoperator= (TxtRightMarginAttribute &Attrib)
 Make the Attribute the same as the other.
INT32 operator== (const TxtRightMarginAttribute &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 right margin.

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

Definition at line 730 of file txtattr.h.


Constructor & Destructor Documentation

TxtRightMarginAttribute::TxtRightMarginAttribute  ) 
 

Default Constuctor for TxtLeftMarginAttribute.

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

Definition at line 2622 of file txtattr.cpp.

02623 {
02624     Value = 0; 
02625 } 

TxtRightMarginAttribute::TxtRightMarginAttribute MILLIPOINT  value  ) 
 

TxtRightMarginAttribute constructor.

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

Definition at line 2639 of file txtattr.cpp.

02640 { 
02641     Value = value;
02642 }


Member Function Documentation

BOOL TxtRightMarginAttribute::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 2773 of file txtattr.cpp.

02774 {
02775     TxtRightMarginAttribute *pAttr = new TxtRightMarginAttribute;
02776     if (pAttr==NULL)
02777         // error message has already been set by new
02778         return FALSE;
02779 
02780     UINT32 ID = AttributeManager::RegisterDefaultAttribute(CC_RUNTIME_CLASS(BaseTextClass), 
02781                                                          pAttr);
02782 
02783     ERROR2IF(ID == ATTR_BAD_ID, FALSE, "Bad ID when Initialising TxtRightMarginAttribute");
02784 
02785     return TRUE;
02786 }

BOOL TxtRightMarginAttribute::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 2750 of file txtattr.cpp.

02751 {
02752     // This must be at least a FillGeometryAttribute...
02753     ERROR3IF(!pAttr->IsKindOf(CC_RUNTIME_CLASS(TxtRightMarginAttribute)), 
02754                 "Different attribute types in TxtRightMarginAttribute::IsDifferent()");
02755 
02756     // Check they are NOT the same.
02757     return ( !(*((TxtRightMarginAttribute *)pAttr) == *this) ); 
02758 }

NodeAttribute * TxtRightMarginAttribute::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 2801 of file txtattr.cpp.

02802 {
02803     // Create new attribute node
02804     AttrTxtRightMargin*  pAttr = new AttrTxtRightMargin();
02805     if (pAttr==NULL)      
02806         // error message has already been set by new
02807         return NULL;
02808 
02809     // Copy attribute value into the new node.
02810     pAttr->Value.SimpleCopy(this);
02811 
02812     // Return the new node
02813     return pAttr;
02814 }

TxtRightMarginAttribute & TxtRightMarginAttribute::operator= TxtRightMarginAttribute 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 2693 of file txtattr.cpp.

02694 {    
02695     Value = Attrib.Value;
02696     return *this;
02697 }

INT32 TxtRightMarginAttribute::operator== const TxtRightMarginAttribute 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 2713 of file txtattr.cpp.

02714 {
02715     return (Attrib.Value == Value); 
02716 }

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

Sets the TxtRightMarginAttribute 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 render this attribute into. [INPUTS]
See also:
-

Implements AttributeValue.

Definition at line 2656 of file txtattr.cpp.

02657 {
02658     pRegion->SetTxtRightMargin(this, Temp);
02659 }

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

Restores the TxtRightMarginAttribute 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 2675 of file txtattr.cpp.

02676 {
02677     pRegion->RestoreTxtRightMargin(this, Temp);
02678 }

void TxtRightMarginAttribute::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 2729 of file txtattr.cpp.

02730 {
02731     ERROR3IF(!IS_A(pValue, TxtRightMarginAttribute), 
02732         "Invalid Attribute value passed to TxtRightMarginAttribute::SimpleCopy");
02733     // We may as well just use our assignment operator.
02734     *this = *((TxtRightMarginAttribute*)pValue);
02735 }


Member Data Documentation

MILLIPOINT TxtRightMarginAttribute::Value
 

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