TxtUnderlineAttribute Class Reference

This text attribute specifies if text is underlined or not. More...

#include <txtattr.h>

Inheritance diagram for TxtUnderlineAttribute:

TxtBaseClassAttribute AttributeValue CCObject SimpleCCObject List of all members.

Public Member Functions

 TxtUnderlineAttribute ()
 Default Constuctor for TxtUnderlineAttribute The default Underline state is FALSE.
 TxtUnderlineAttribute (BOOL underlined)
 TxtUnderlineAttribute constructor.
virtual void Restore (RenderRegion *, BOOL)
 Restores the TxtUnderlineAttribute attribute for the given render region.
virtual void Render (RenderRegion *pRegion, BOOL Temp=FALSE)
 Sets the TxtUnderlineAttribute attribute for the given render region.
virtual void SimpleCopy (AttributeValue *)
 See AttributeValue::SimpleCopy.
virtual NodeAttributeMakeNode ()
 Make a AttrTxtUnderline node, see base class.
BOOL IsDifferent (AttributeValue *pAttr)
 See base class version.
virtual TxtUnderlineAttributeoperator= (TxtUnderlineAttribute &Attrib)
 Make the Attribute the same as the other.
INT32 operator== (const TxtUnderlineAttribute &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

BOOL Underlined

Detailed Description

This text attribute specifies if text is underlined or not.

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

Definition at line 333 of file txtattr.h.


Constructor & Destructor Documentation

TxtUnderlineAttribute::TxtUnderlineAttribute  ) 
 

Default Constuctor for TxtUnderlineAttribute The default Underline state is FALSE.

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

Definition at line 1101 of file txtattr.cpp.

01102 {
01103     Underlined = FALSE; 
01104 } 

TxtUnderlineAttribute::TxtUnderlineAttribute BOOL  underlined  ) 
 

TxtUnderlineAttribute constructor.

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

Errors: -

See also:
-

Definition at line 1122 of file txtattr.cpp.

01123 { 
01124     Underlined = underlined; 
01125 }


Member Function Documentation

BOOL TxtUnderlineAttribute::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 1258 of file txtattr.cpp.

01259 {
01260     TxtUnderlineAttribute *pAttr = new TxtUnderlineAttribute;
01261     if (pAttr==NULL)
01262         // error message has already been set by new
01263         return FALSE;
01264 
01265     UINT32 ID = AttributeManager::RegisterDefaultAttribute(CC_RUNTIME_CLASS(BaseTextClass), 
01266                                                          pAttr);
01267 
01268     ERROR2IF(ID == ATTR_BAD_ID, FALSE, "Bad ID when Initialising TxtUnderlineAttribute");
01269 
01270     return TRUE;
01271 }

BOOL TxtUnderlineAttribute::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 1235 of file txtattr.cpp.

01236 {
01237     // This must be at least a FillGeometryAttribute...
01238     ERROR3IF(!pAttr->IsKindOf(CC_RUNTIME_CLASS(TxtUnderlineAttribute)), 
01239                 "Different attribute types in TxtUnderlineAttribute::IsDifferent()");
01240 
01241     // Check they are NOT the same.
01242     return ( !(*((TxtUnderlineAttribute *)pAttr) == *this) ); 
01243 }

NodeAttribute * TxtUnderlineAttribute::MakeNode  )  [virtual]
 

Make a AttrTxtUnderline 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 1286 of file txtattr.cpp.

01287 {
01288     // Create new attribute node
01289     AttrTxtUnderline*  pAttr = new AttrTxtUnderline();
01290     if (pAttr==NULL)      
01291         // error message has already been set by new
01292         return NULL;
01293 
01294     // Copy attribute value into the new node.
01295     pAttr->Value.SimpleCopy(this);
01296 
01297     // Return the new node
01298     return pAttr;
01299 }

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

01179 {    
01180     Underlined = Attrib.Underlined;
01181     return *this;
01182 }

INT32 TxtUnderlineAttribute::operator== const TxtUnderlineAttribute Attrib  ) 
 

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

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

Definition at line 1198 of file txtattr.cpp.

01199 {
01200     return (Attrib.Underlined == Underlined); 
01201 }

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

Sets the TxtUnderlineAttribute 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 1141 of file txtattr.cpp.

01142 {
01143     pRegion->SetTxtUnderline(this, Temp);
01144 }

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

Restores the TxtUnderlineAttribute 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 1160 of file txtattr.cpp.

01161 {
01162     pRegion->RestoreTxtUnderline(this, Temp);
01163 }

void TxtUnderlineAttribute::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 1214 of file txtattr.cpp.

01215 {
01216     ERROR3IF(!IS_A(pValue, TxtUnderlineAttribute), 
01217         "Invalid Attribute value passed to TxtUnderlineAttribute::SimpleCopy");
01218     // We may as well just use our assignment operator.
01219     *this = *((TxtUnderlineAttribute*)pValue);
01220 }


Member Data Documentation

BOOL TxtUnderlineAttribute::Underlined
 

Definition at line 351 of file txtattr.h.


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