TxtBaseLineAttribute Class Reference

This text attribute specifies the aspect ratio of characters. More...

#include <txtattr.h>

Inheritance diagram for TxtBaseLineAttribute:

TxtBaseClassAttribute AttributeValue CCObject SimpleCCObject List of all members.

Public Member Functions

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

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

Definition at line 517 of file txtattr.h.


Constructor & Destructor Documentation

TxtBaseLineAttribute::TxtBaseLineAttribute  ) 
 

Default Constuctor for TxtBaseLineAttribute 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 2193 of file txtattr.cpp.

02194 {
02195     Value = 0; 
02196 } 

TxtBaseLineAttribute::TxtBaseLineAttribute MILLIPOINT  value  ) 
 

TxtBaseLineAttribute constructor.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
13/3/95
Parameters:
Value,: The absolute offset from base line [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
-

Definition at line 2214 of file txtattr.cpp.

02215 { 
02216     Value = value;
02217 }


Member Function Documentation

BOOL TxtBaseLineAttribute::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 2350 of file txtattr.cpp.

02351 {
02352     TxtBaseLineAttribute *pAttr = new TxtBaseLineAttribute;
02353     if (pAttr==NULL)
02354         // error message has already been set by new
02355         return FALSE;
02356 
02357     UINT32 ID = AttributeManager::RegisterDefaultAttribute(CC_RUNTIME_CLASS(BaseTextClass), 
02358                                                          pAttr);
02359 
02360     ERROR2IF(ID == ATTR_BAD_ID, FALSE, "Bad ID when Initialising TxtBaseLineAttribute");
02361 
02362     return TRUE;
02363 }

BOOL TxtBaseLineAttribute::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 2327 of file txtattr.cpp.

02328 {
02329     // This must be at least a FillGeometryAttribute...
02330     ERROR3IF(!pAttr->IsKindOf(CC_RUNTIME_CLASS(TxtBaseLineAttribute)), 
02331                 "Different attribute types in TxtBaseLineAttribute::IsDifferent()");
02332 
02333     // Check they are NOT the same.
02334     return ( !(*((TxtBaseLineAttribute *)pAttr) == *this) ); 
02335 }

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

02379 {
02380     // Create new attribute node
02381     AttrTxtBaseLine*  pAttr = new AttrTxtBaseLine();
02382     if (pAttr==NULL)      
02383         // error message has already been set by new
02384         return NULL;
02385 
02386     // Copy attribute value into the new node.
02387     pAttr->Value.SimpleCopy(this);
02388 
02389     // Return the new node
02390     return pAttr;
02391 }

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

02271 {    
02272     Value = Attrib.Value;
02273     return *this;
02274 }

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

02291 {
02292     return (Attrib.Value == Value); 
02293 }

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

Sets the TxtBaseLineAttribute 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 2233 of file txtattr.cpp.

02234 {
02235     pRegion->SetTxtBaseLine(this, Temp);
02236 }

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

Restores the TxtBaseLineAttribute 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 2252 of file txtattr.cpp.

02253 {
02254     pRegion->RestoreTxtBaseLine(this, Temp);
02255 }

void TxtBaseLineAttribute::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 2306 of file txtattr.cpp.

02307 {
02308     ERROR3IF(!IS_A(pValue, TxtBaseLineAttribute), 
02309         "Invalid Attribute value passed to TxtBaseLineAttribute::SimpleCopy");
02310     // We may as well just use our assignment operator.
02311     *this = *((TxtBaseLineAttribute*)pValue);
02312 }


Member Data Documentation

MILLIPOINT TxtBaseLineAttribute::Value
 

Definition at line 538 of file txtattr.h.


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