TxtFirstIndentAttribute Class Reference

This text attribute specifies the first line indent. More...

#include <txtattr.h>

Inheritance diagram for TxtFirstIndentAttribute:

TxtBaseClassAttribute AttributeValue CCObject SimpleCCObject List of all members.

Public Member Functions

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

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

Definition at line 765 of file txtattr.h.


Constructor & Destructor Documentation

TxtFirstIndentAttribute::TxtFirstIndentAttribute  ) 
 

Default Constuctor for TxtLeftMarginAttribute.

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

Definition at line 2829 of file txtattr.cpp.

02830 {
02831     Value = 0; 
02832 } 

TxtFirstIndentAttribute::TxtFirstIndentAttribute MILLIPOINT  value  ) 
 

TxtFirstIndentAttribute constructor.

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

Definition at line 2846 of file txtattr.cpp.

02847 { 
02848     Value = value;
02849 }


Member Function Documentation

BOOL TxtFirstIndentAttribute::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 2980 of file txtattr.cpp.

02981 {
02982     TxtFirstIndentAttribute *pAttr = new TxtFirstIndentAttribute;
02983     if (pAttr==NULL)
02984         // error message has already been set by new
02985         return FALSE;
02986 
02987     UINT32 ID = AttributeManager::RegisterDefaultAttribute(CC_RUNTIME_CLASS(BaseTextClass), 
02988                                                          pAttr);
02989 
02990     ERROR2IF(ID == ATTR_BAD_ID, FALSE, "Bad ID when Initialising TxtFirstIndentAttribute");
02991 
02992     return TRUE;
02993 }

BOOL TxtFirstIndentAttribute::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 2957 of file txtattr.cpp.

02958 {
02959     // This must be at least a FillGeometryAttribute...
02960     ERROR3IF(!pAttr->IsKindOf(CC_RUNTIME_CLASS(TxtFirstIndentAttribute)), 
02961                 "Different attribute types in TxtFirstIndentAttribute::IsDifferent()");
02962 
02963     // Check they are NOT the same.
02964     return ( !(*((TxtFirstIndentAttribute *)pAttr) == *this) ); 
02965 }

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

03009 {
03010     // Create new attribute node
03011     AttrTxtFirstIndent*  pAttr = new AttrTxtFirstIndent();
03012     if (pAttr==NULL)      
03013         // error message has already been set by new
03014         return NULL;
03015 
03016     // Copy attribute value into the new node.
03017     pAttr->Value.SimpleCopy(this);
03018 
03019     // Return the new node
03020     return pAttr;
03021 }

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

02901 {    
02902     Value = Attrib.Value;
02903     return *this;
02904 }

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

02921 {
02922     return (Attrib.Value == Value); 
02923 }

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

Sets the TxtFirstIndentAttribute 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 2863 of file txtattr.cpp.

02864 {
02865     pRegion->SetTxtFirstIndent(this, Temp);
02866 }

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

Restores the TxtFirstIndentAttribute 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 2882 of file txtattr.cpp.

02883 {
02884     pRegion->RestoreTxtFirstIndent(this, Temp);
02885 }

void TxtFirstIndentAttribute::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 2936 of file txtattr.cpp.

02937 {
02938     ERROR3IF(!IS_A(pValue, TxtFirstIndentAttribute), 
02939         "Invalid Attribute value passed to TxtFirstIndentAttribute::SimpleCopy");
02940     // We may as well just use our assignment operator.
02941     *this = *((TxtFirstIndentAttribute*)pValue);
02942 }


Member Data Documentation

MILLIPOINT TxtFirstIndentAttribute::Value
 

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