TxtTrackingAttribute Class Reference

This text attribute specifies a spacing between characters, it can be positive or negative. More...

#include <txtattr.h>

Inheritance diagram for TxtTrackingAttribute:

TxtBaseClassAttribute AttributeValue CCObject SimpleCCObject List of all members.

Public Member Functions

 TxtTrackingAttribute ()
 Default Constuctor for TxtTrackingAttribute The function sets the Tracking value to 0.
 TxtTrackingAttribute (MILLIPOINT tracking)
 TxtTrackingAttribute constructor.
virtual void Restore (RenderRegion *, BOOL)
 Restores the TxtTrackingAttribute attribute for the given render region.
virtual void Render (RenderRegion *pRegion, BOOL Temp=FALSE)
 Sets the TxtTrackingAttribute 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 TxtTrackingAttributeoperator= (TxtTrackingAttribute &Attrib)
 Make the Attribute the same as the other.
INT32 operator== (const TxtTrackingAttribute &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 Tracking

Detailed Description

This text attribute specifies a spacing between characters, it can be positive or negative.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
13/3/95
See also:
-

Definition at line 407 of file txtattr.h.


Constructor & Destructor Documentation

TxtTrackingAttribute::TxtTrackingAttribute  ) 
 

Default Constuctor for TxtTrackingAttribute The function sets the Tracking value to 0.

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

Definition at line 1754 of file txtattr.cpp.

01755 {
01756     Tracking = 0; 
01757 } 

TxtTrackingAttribute::TxtTrackingAttribute MILLIPOINT  tracking  ) 
 

TxtTrackingAttribute constructor.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
13/3/95
Parameters:
Tracking,: The tracking value [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
-

Definition at line 1775 of file txtattr.cpp.

01776 { 
01777     Tracking = tracking;
01778 }


Member Function Documentation

BOOL TxtTrackingAttribute::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 1911 of file txtattr.cpp.

01912 {
01913     TxtTrackingAttribute *pAttr = new TxtTrackingAttribute;
01914     if (pAttr==NULL)
01915         // error message has already been set by new
01916         return FALSE;
01917 
01918     UINT32 ID = AttributeManager::RegisterDefaultAttribute(CC_RUNTIME_CLASS(BaseTextClass), 
01919                                                          pAttr);
01920 
01921     ERROR2IF(ID == ATTR_BAD_ID, FALSE, "Bad ID when Initialising TxtTrackingAttribute");
01922 
01923     return TRUE;
01924 }

BOOL TxtTrackingAttribute::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 1888 of file txtattr.cpp.

01889 {
01890     // This must be at least a FillGeometryAttribute...
01891     ERROR3IF(!pAttr->IsKindOf(CC_RUNTIME_CLASS(TxtTrackingAttribute)), 
01892                 "Different attribute types in TxtTrackingAttribute::IsDifferent()");
01893 
01894     // Check they are NOT the same.
01895     return ( !(*((TxtTrackingAttribute *)pAttr) == *this) ); 
01896 }

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

01940 {
01941     // Create new attribute node
01942     AttrTxtTracking*  pAttr = new AttrTxtTracking();
01943     if (pAttr==NULL)      
01944         // error message has already been set by new
01945         return NULL;
01946 
01947     // Copy attribute value into the new node.
01948     pAttr->Value.SimpleCopy(this);
01949 
01950     // Return the new node
01951     return pAttr;
01952 }

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

01832 {    
01833     Tracking = Attrib.Tracking;
01834     return *this;
01835 }

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

01852 {
01853     return (Attrib.Tracking == Tracking); 
01854 }

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

Sets the TxtTrackingAttribute 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 1794 of file txtattr.cpp.

01795 {
01796     pRegion->SetTxtTracking(this, Temp);
01797 }

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

Restores the TxtTrackingAttribute 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 1813 of file txtattr.cpp.

01814 {
01815     pRegion->RestoreTxtTracking(this, Temp);
01816 }

void TxtTrackingAttribute::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 1867 of file txtattr.cpp.

01868 {
01869     ERROR3IF(!IS_A(pValue, TxtTrackingAttribute), 
01870         "Invalid Attribute value passed to TxtTrackingAttribute::SimpleCopy");
01871     // We may as well just use our assignment operator.
01872     *this = *((TxtTrackingAttribute*)pValue);
01873 }


Member Data Documentation

MILLIPOINT TxtTrackingAttribute::Tracking
 

Definition at line 429 of file txtattr.h.


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