TxtItalicAttribute Class Reference

This text attribute specifies the ITALIC state (on/off). More...

#include <txtattr.h>

Inheritance diagram for TxtItalicAttribute:

TxtBaseClassAttribute AttributeValue CCObject SimpleCCObject List of all members.

Public Member Functions

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

Detailed Description

This text attribute specifies the ITALIC state (on/off).

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

Definition at line 295 of file txtattr.h.


Constructor & Destructor Documentation

TxtItalicAttribute::TxtItalicAttribute  ) 
 

Default Constuctor for TxtItalicAttribute The default Italic state is FALSE.

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

Definition at line 884 of file txtattr.cpp.

00885 {
00886     ItalicOn = FALSE; 
00887 } 

TxtItalicAttribute::TxtItalicAttribute BOOL  italicOn  ) 
 

TextFontTypefaceAttribute constructor.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
13/3/95
Parameters:
italicOn,: TRUE = Italic on, FALSE = Italic off [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
-

Definition at line 905 of file txtattr.cpp.

00906 { 
00907     ItalicOn = italicOn; 
00908 }


Member Function Documentation

BOOL TxtItalicAttribute::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 1041 of file txtattr.cpp.

01042 {
01043     TxtItalicAttribute *pAttr = new TxtItalicAttribute;
01044     if (pAttr==NULL)
01045         // error message has already been set by new
01046         return FALSE;
01047 
01048     UINT32 ID = AttributeManager::RegisterDefaultAttribute(CC_RUNTIME_CLASS(BaseTextClass), 
01049                                                          pAttr);
01050 
01051     ERROR2IF(ID == ATTR_BAD_ID, FALSE, "Bad ID when Initialising TxtItalicAttribute");
01052 
01053     return TRUE;
01054 }

BOOL TxtItalicAttribute::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 1018 of file txtattr.cpp.

01019 {
01020     // This must be at least a FillGeometryAttribute...
01021     ERROR3IF(!pAttr->IsKindOf(CC_RUNTIME_CLASS(TxtItalicAttribute)), 
01022                 "Different attribute types in TxtItalicAttribute::IsDifferent()");
01023 
01024     // Check they are NOT the same.
01025     return ( !(*((TxtItalicAttribute *)pAttr) == *this) ); 
01026 }

NodeAttribute * TxtItalicAttribute::MakeNode  )  [virtual]
 

Make a AttrTxtItalic 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 1069 of file txtattr.cpp.

01070 {
01071     // Create new attribute node
01072     AttrTxtItalic*  pAttr = new AttrTxtItalic();
01073     if (pAttr==NULL)      
01074         // error message has already been set by new
01075         return NULL;
01076 
01077     // Copy attribute value into the new node.
01078     pAttr->Value.SimpleCopy(this);
01079 
01080     // Return the new node
01081     return pAttr;
01082 }

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

00962 {    
00963     ItalicOn = Attrib.ItalicOn;
00964     return *this;
00965 }

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

00982 {
00983     return (Attrib.ItalicOn == ItalicOn); 
00984 }

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

Sets the TxtFontTypeface 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 924 of file txtattr.cpp.

00925 {
00926     pRegion->SetTxtItalic(this, Temp);
00927 }

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

Restores the TxtItalicAttribute 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 943 of file txtattr.cpp.

00944 {
00945     pRegion->RestoreTxtItalic(this, Temp);
00946 }

void TxtItalicAttribute::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 997 of file txtattr.cpp.

00998 {
00999     ERROR3IF(!IS_A(pValue, TxtItalicAttribute), 
01000         "Invalid Attribute value passed to TxtItalicAttribute::SimpleCopy");
01001     // We may as well just use our assignment operator.
01002     *this = *((TxtItalicAttribute*)pValue);
01003 }


Member Data Documentation

BOOL TxtItalicAttribute::ItalicOn
 

Definition at line 316 of file txtattr.h.


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