AttrFlatColourFill Class Reference

Flat Colour Fill Attribute class. More...

#include <fillattr2.h>

Inheritance diagram for AttrFlatColourFill:

AttrFlatFill AttrFillGeometry NodeAttribute NodeRenderable Node CCObject SimpleCCObject List of all members.

Public Member Functions

 AttrFlatColourFill ()
 AttrFlatColourFill (Node *ContextNode, AttachNodeDirection Direction, BOOL Locked=FALSE, BOOL Mangled=FALSE, BOOL Marked=FALSE, BOOL Selected=FALSE)
void Render (RenderRegion *pRender)
 'Renders' a Flat Fill Colour attribute.
NodeSimpleCopy ()
 This method returns a shallow copy of the node with all Node pointers NULL. The function is virtual, and must be defined for all derived classes.
virtual UINT32 GetAttrNameID (void)
 Returns a string resource ID describing the attribute.
void GetDebugDetails (StringBase *Str)
 Output details of this attribute to the Camelot debug tree dialog.
virtual UINT32 GetNodeSize () const
 For finding the size of the node.
virtual CCRuntimeClassGetAttributeType ()
virtual AttributeValueGetAttributeValue ()
AttrFillGeometryChangeAttrValue (AttrValueChange *pValue)
virtual BOOL IsAColourFill () const
 Virtual function for determining if the node is a Colour Fill attribute.
virtual BOOL WritePreChildrenWeb (BaseCamelotFilter *pFilter)
 Writes the flat fill record to the filter.
virtual BOOL WritePreChildrenNative (BaseCamelotFilter *pFilter)
virtual BOOL WriteColourDefinitions (BaseCamelotFilter *pFilter)
 Writes out colour definitions for this fill.
virtual BOOL IsSeeThrough (BOOL CheckIndirectAttrs)

Protected Attributes

FlatFillAttribute Value

Detailed Description

Flat Colour Fill Attribute class.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
22/8/94
See also:
FlatFillAttribute

Definition at line 578 of file fillattr2.h.


Constructor & Destructor Documentation

AttrFlatColourFill::AttrFlatColourFill  )  [inline]
 

Definition at line 583 of file fillattr2.h.

00583 : AttrFlatFill() {}

AttrFlatColourFill::AttrFlatColourFill Node ContextNode,
AttachNodeDirection  Direction,
BOOL  Locked = FALSE,
BOOL  Mangled = FALSE,
BOOL  Marked = FALSE,
BOOL  Selected = FALSE
[inline]
 

Definition at line 584 of file fillattr2.h.

00589                                      : 
00590         AttrFlatFill(ContextNode, Direction, Locked, Mangled, Marked, Selected) {}


Member Function Documentation

AttrFillGeometry* AttrFlatColourFill::ChangeAttrValue AttrValueChange pValue  )  [inline, virtual]
 

Reimplemented from AttrFillGeometry.

Definition at line 602 of file fillattr2.h.

00602 { return ChangeColour(pValue); }

virtual CCRuntimeClass* AttrFlatColourFill::GetAttributeType  )  [inline, virtual]
 

Reimplemented from NodeAttribute.

Definition at line 599 of file fillattr2.h.

virtual AttributeValue* AttrFlatColourFill::GetAttributeValue  )  [inline, virtual]
 

Implements AttrFillGeometry.

Definition at line 600 of file fillattr2.h.

00600 { return &Value; }

UINT32 AttrFlatColourFill::GetAttrNameID void   )  [virtual]
 

Returns a string resource ID describing the attribute.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
23/8/94
Returns:
Attribute description ID

Reimplemented from NodeAttribute.

Definition at line 5861 of file fillattr.cpp.

05862 {
05863     return (_R(IDS_FILL_COLOUR));
05864 }                                  

void AttrFlatColourFill::GetDebugDetails StringBase Str  )  [virtual]
 

Output details of this attribute to the Camelot debug tree dialog.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
20/07/94
Parameters:
Str - the string containing details of the attribute. [OUTPUTS]

Reimplemented from NodeRenderable.

Definition at line 5877 of file fillattr.cpp.

05878 {
05879 #ifdef _DEBUG
05880     NodeAttribute::GetDebugDetails( Str );
05881 
05882     String_256 TempStr;
05883 
05884 //  TempStr._MakeMsg( TEXT("\r\nFill") );
05885 //  (*GetStartColour()).GetDebugDetails(&TempStr);
05886 //  (*Str) += TempStr;
05887 
05888 //  TempStr._MakeMsg(TEXT("\r\nStart"));
05889 //  (*GetStartColour()).GetDebugDetails(&TempStr);
05890 //  (*Str) += TempStr;
05891 #endif
05892 }

UINT32 AttrFlatColourFill::GetNodeSize  )  const [virtual]
 

For finding the size of the node.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
23/8/94
Returns:
The size of the node in bytes
See also:
Node::GetSubtreeSize

Reimplemented from Node.

Definition at line 5907 of file fillattr.cpp.

05908 {     
05909     return sizeof(AttrFlatColourFill);
05910 }  

virtual BOOL AttrFlatColourFill::IsAColourFill  )  const [inline, virtual]
 

Virtual function for determining if the node is a Colour Fill attribute.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
13/2/95
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
TRUE if the node is a AttrColourFill, will return TRUE

Errors:

Reimplemented from NodeAttribute.

Definition at line 604 of file fillattr2.h.

00604 { return TRUE; }

virtual BOOL AttrFlatColourFill::IsSeeThrough BOOL  CheckIndirectAttrs  )  [inline, virtual]
 

Reimplemented from NodeAttribute.

Definition at line 614 of file fillattr2.h.

00615     {
00616         return (GetStartColour() != NULL && GetStartColour()->IsTransparent());
00617     }

void AttrFlatColourFill::Render RenderRegion pRender  )  [virtual]
 

'Renders' a Flat Fill Colour attribute.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
23/8/94

Reimplemented from NodeAttribute.

Definition at line 5819 of file fillattr.cpp.

05820 {
05821     pRender->SetFillGeometry(&Value, FALSE);
05822 }

Node * AttrFlatColourFill::SimpleCopy void   )  [virtual]
 

This method returns a shallow copy of the node with all Node pointers NULL. The function is virtual, and must be defined for all derived classes.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
23/8/94
Returns:
A copy of the node, or NULL if memory runs out

Errors: If memory runs out when trying to copy, then ERROR is called with an out of memory error and the function returns NULL. Scope: protected

Reimplemented from NodeAttribute.

Definition at line 5839 of file fillattr.cpp.

05840 {
05841     AttrFlatColourFill* NodeCopy = new AttrFlatColourFill();
05842     if (NodeCopy == NULL)
05843         return NULL;
05844 
05845     CopyNodeContents(NodeCopy);
05846     
05847     return NodeCopy;
05848 }  

BOOL AttrFlatColourFill::WriteColourDefinitions BaseCamelotFilter pFilter  )  [virtual]
 

Writes out colour definitions for this fill.

> virtual BOOL AttrFlatColourFill::WriteColourDefinitions (BaseCamelotFilter* pFilter)

Author:
Chris_Snook (Xara Group Ltd) <camelotdev@xara.com>
Date:
14/9/2000
Parameters:
pFilter = ptr to the filter [INPUTS]
Returns:
TRUE if record is written, FALSE if not
See also:
BaseCamelotFilter::WriteRemainingAtomicTagDefinitions () Layer::WriteAtomicNodesColourRefs ()

Reimplemented from AttrFillGeometry.

Definition at line 6005 of file fillattr.cpp.

06006 {
06007     INT32 ColRef = pFilter->WriteRecord(&Value.Colour);
06008 
06009     // Is the colour reference ok?
06010     
06011     return (ColRef != 0);
06012 }

BOOL AttrFlatColourFill::WritePreChildrenNative BaseCamelotFilter pFilter  )  [virtual]
 

Reimplemented from Node.

Definition at line 5981 of file fillattr.cpp.

05982 {
05983 #ifdef DO_EXPORT
05984     return WritePreChildrenWeb(pFilter);
05985 #else
05986     return FALSE;
05987 #endif
05988 }

BOOL AttrFlatColourFill::WritePreChildrenWeb BaseCamelotFilter pFilter  )  [virtual]
 

Writes the flat fill record to the filter.

> virtual BOOL AttrFlatColourFill::WritePreChildrenWeb(BaseCamelotFilter* pFilter)

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
30/5/96
Parameters:
pFilter = ptr to the filter [INPUTS]
Returns:
TRUE if record is written, FALSE if not
See also:
-

Reimplemented from Node.

Definition at line 5927 of file fillattr.cpp.

05928 {
05929 #ifdef DO_EXPORT
05930     ERROR2IF(pFilter == NULL,FALSE,"NULL filter param");
05931 
05932     // Must write out the colour first
05933     INT32 ColRef = pFilter->WriteRecord(&Value.Colour);
05934 
05935     // Is the colour reference ok?
05936     BOOL ok = (ColRef != 0);
05937         
05938     if (ok)
05939     {
05940         BOOL ColourRequired = TRUE;
05941         INT32 Tag = TAG_FLATFILL;
05942         INT32 Size = TAG_FLATFILL_SIZE;
05943         switch (ColRef)
05944         {
05945             case REF_DEFAULTCOLOUR_TRANSPARENT:
05946                 Tag = TAG_FLATFILL_NONE;
05947                 Size = TAG_FLATFILL_NONE_SIZE;
05948                 ColourRequired = FALSE;
05949                 break;
05950             case REF_DEFAULTCOLOUR_BLACK:
05951                 Tag = TAG_FLATFILL_BLACK;
05952                 Size = TAG_FLATFILL_BLACK_SIZE;
05953                 ColourRequired = FALSE;
05954                 break;
05955             case REF_DEFAULTCOLOUR_WHITE:
05956                 Tag = TAG_FLATFILL_WHITE;
05957                 Size = TAG_FLATFILL_WHITE_SIZE;
05958                 ColourRequired = FALSE;
05959                 break;
05960         }
05961 
05962         CamelotFileRecord Rec(pFilter,Tag,Size);
05963 
05964         if (ok) ok = Rec.Init();
05965         if (ok && ColourRequired) ok = Rec.WriteReference(ColRef);
05966         if (ok) ok = pFilter->Write(&Rec);
05967     }
05968 
05969     if (!ok)
05970         pFilter->GotError(_R(IDE_FILE_WRITE_ERROR));
05971 
05972     return ok;
05973 #else
05974     return FALSE;
05975 #endif
05976 }


Member Data Documentation

FlatFillAttribute AttrFlatColourFill::Value [protected]
 

Definition at line 620 of file fillattr2.h.


The documentation for this class was generated from the following files:
Generated on Sat Nov 10 03:50:19 2007 for Camelot by  doxygen 1.4.4