AttrThreeColColourFill Class Reference

ThreeCol Graduated Colour Fill Attribute class. More...

#include <fillattr2.h>

Inheritance diagram for AttrThreeColColourFill:

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

Public Member Functions

 AttrThreeColColourFill ()
 AttrThreeColColourFill (Node *ContextNode, AttachNodeDirection Direction, BOOL Locked=FALSE, BOOL Mangled=FALSE, BOOL Marked=FALSE, BOOL Selected=FALSE)
void Render (RenderRegion *pRender)
 'Renders' a ThreeCol 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 void RenderFillBlobs (RenderRegion *pRender)
 Renders the grad fills arrow blob when requested to by its selected parent.
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 ThreeCol fill record to the filter.
virtual BOOL WritePreChildrenNative (BaseCamelotFilter *pFilter)
 Writes the ThreeCol fill record to the filter.
virtual BOOL WriteColourDefinitions (BaseCamelotFilter *pFilter)
 Writes out colour definitions for this fill.
virtual BOOL IsSeeThrough (BOOL CheckIndirectAttrs)

Protected Attributes

ThreeColFillAttribute Value

Detailed Description

ThreeCol Graduated Colour Fill Attribute class.

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

Definition at line 1496 of file fillattr2.h.


Constructor & Destructor Documentation

AttrThreeColColourFill::AttrThreeColColourFill  )  [inline]
 

Definition at line 1501 of file fillattr2.h.

01501 : AttrThreeColFill() {}

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

Definition at line 1502 of file fillattr2.h.

01507                                      : 
01508         AttrThreeColFill(ContextNode, Direction, Locked, Mangled, Marked, Selected) {}


Member Function Documentation

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

Reimplemented from AttrFillGeometry.

Definition at line 1521 of file fillattr2.h.

01521 { return ChangeColour(pValue); }

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

Reimplemented from NodeAttribute.

Definition at line 1518 of file fillattr2.h.

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

Implements AttrThreeColFill.

Definition at line 1519 of file fillattr2.h.

01519 { return &Value; }

UINT32 AttrThreeColColourFill::GetAttrNameID void   )  [virtual]
 

Returns a string resource ID describing the attribute.

Author:
Gerry_Iles (Xara Group Ltd) <camelotdev@xara.com>
Date:
9/8/96
Returns:
Attribute description ID

Reimplemented from NodeAttribute.

Definition at line 11847 of file fillattr.cpp.

11848 {
11849     return (_R(IDS_THREECOLGRADFILL)); 
11850 }                                  

void AttrThreeColColourFill::GetDebugDetails StringBase Str  )  [virtual]
 

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

Author:
Gerry_Iles (Xara Group Ltd) <camelotdev@xara.com>
Date:
9/8/96
Parameters:
Str - the string containing details of the attribute. [OUTPUTS]

Reimplemented from NodeRenderable.

Definition at line 11865 of file fillattr.cpp.

11866 {
11867 #ifdef _DEBUG
11868     NodeAttribute::GetDebugDetails( Str );
11869 
11870     String_256 TempStr;
11871 
11872     TempStr._MakeMsg( TEXT("\r\nDiamond Graduated Fill:\r\n"));
11873     (*Str) += TempStr;
11874 
11875 //  TempStr._MakeMsg(TEXT("\r\nStart"));
11876 //  (*GetStartColour()).GetDebugDetails(&TempStr);
11877 //  (*Str) += TempStr;
11878 
11879 //  TempStr._MakeMsg(TEXT("\r\nEnd"));
11880 //  (*GetEndColour()).GetDebugDetails(&TempStr);
11881 //  (*Str) += TempStr;
11882 
11883     TempStr._MakeMsg(TEXT("\r\nStart = (#1%ld, #2%ld)"), 
11884                      (*GetStartPoint()).x, (*GetStartPoint()).y);
11885     (*Str) += TempStr;
11886 
11887     TempStr._MakeMsg(TEXT("\r\nEnd = (#1%ld, #2%ld) "), 
11888                      (*GetEndPoint()).x, (*GetEndPoint()).y);
11889     (*Str) += TempStr;
11890 
11891     TempStr._MakeMsg(TEXT("\r\n3rd = (#1%ld, #2%ld) "), 
11892                      (*GetEndPoint2()).x, (*GetEndPoint2()).y);
11893     (*Str) += TempStr;
11894 #endif
11895 }

UINT32 AttrThreeColColourFill::GetNodeSize  )  const [virtual]
 

For finding the size of the node.

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

Reimplemented from Node.

Definition at line 11911 of file fillattr.cpp.

11912 {     
11913     return sizeof(AttrThreeColColourFill);
11914 }  

virtual BOOL AttrThreeColColourFill::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 1523 of file fillattr2.h.

01523 { return TRUE; }

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

Reimplemented from NodeAttribute.

Definition at line 1533 of file fillattr2.h.

01534     {
01535         return (GetStartColour() != NULL    &&  GetStartColour()->IsTransparent()   &&
01536                 GetEndColour() != NULL      &&  GetEndColour()->IsTransparent());
01537     }

void AttrThreeColColourFill::Render RenderRegion pRender  )  [virtual]
 

'Renders' a ThreeCol Fill Colour attribute.

Author:
Gerry_Iles (Xara Group Ltd) <camelotdev@xara.com>
Date:
9/8/96

Reimplemented from NodeAttribute.

Definition at line 11758 of file fillattr.cpp.

11759 {
11760     pRender->SetFillGeometry(&Value, FALSE);
11761 }

void AttrThreeColColourFill::RenderFillBlobs RenderRegion pRender  )  [virtual]
 

Renders the grad fills arrow blob when requested to by its selected parent.

Author:
Gerry_Iles (Xara Group Ltd) <camelotdev@xara.com>
Date:
9/8/96
Parameters:
pRender - The region to render the blobs to. [INPUTS]

Reimplemented from AttrThreeColFill.

Definition at line 11804 of file fillattr.cpp.

11805 {
11806 #if !defined(EXCLUDE_FROM_RALPH)
11807     if (!IsVisible())
11808         return;     // We're in Fill Transparency Mode
11809 
11810     // Don't bother if this fill is being edited as a copy of it
11811     // we be rendered thoughout the drag op
11812     if (IsFillBeingEdited())
11813         return;
11814 
11815     // Ignore this if the mesh is the same as the last one rendered.
11816     if (CheckPreviousFillMesh())
11817         return;
11818 
11819     DocCoord ControlPoints[3];
11820     ControlPoints[FILLCONTROL_STARTPOINT] = (*GetStartPoint());
11821     ControlPoints[FILLCONTROL_ENDPOINT] = (*GetEndPoint());
11822     ControlPoints[FILLCONTROL_ENDPOINT2] = (*GetEndPoint2());
11823 
11824     // Render a nice pretty Fill Mesh thingy
11825     RenderFillMesh(pRender, ControlPoints, SelectionState, 3);
11826 
11827     // This call was removed by Gerry (2/9/96) as it causes blob problems
11828     // If we are removing blobs then force all blobs to be deselected
11829 //  if ((Camelot.GetBlobManager())->IsRemovingBlobs())
11830 //      DeselectAllNoRedraw();
11831 #endif
11832 }

Node * AttrThreeColColourFill::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:
Gerry_Iles (Xara Group Ltd) <camelotdev@xara.com>
Date:
9/8/96
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 11780 of file fillattr.cpp.

11781 {
11782     AttrThreeColColourFill* NodeCopy = new AttrThreeColColourFill();
11783     if (NodeCopy == NULL)
11784         return NULL;
11785 
11786     CopyNodeContents(NodeCopy);
11787     
11788     return NodeCopy;
11789 }  

BOOL AttrThreeColColourFill::WriteColourDefinitions BaseCamelotFilter pFilter  )  [virtual]
 

Writes out colour definitions for this fill.

> virtual BOOL AttrThreeColColourFill::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 12006 of file fillattr.cpp.

12007 {
12008     // Must write out the colours first
12009     INT32 StartColRef = pFilter->WriteRecord(&Value.Colour);
12010     INT32 EndColRef  = pFilter->WriteRecord(&Value.EndColour);
12011     INT32 EndCol2Ref     = pFilter->WriteRecord(&Value.EndColour2);
12012 
12013     // Are the colour references ok?
12014     BOOL ok = ((StartColRef != 0) && (EndColRef != 0) && (EndCol2Ref != 0));
12015     
12016     return (ok);
12017 }

BOOL AttrThreeColColourFill::WritePreChildrenNative BaseCamelotFilter pFilter  )  [virtual]
 

Writes the ThreeCol fill record to the filter.

> virtual BOOL AttrThreeColColourFill::WritePreChildrenNative(BaseCamelotFilter* pFilter)

Author:
Gerry_Iles (Xara Group Ltd) <camelotdev@xara.com>
Date:
9/8/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 11982 of file fillattr.cpp.

11983 {
11984 #ifdef DO_EXPORT
11985     return WritePreChildrenWeb(pFilter);
11986 #else
11987     return FALSE;
11988 #endif
11989 }

BOOL AttrThreeColColourFill::WritePreChildrenWeb BaseCamelotFilter pFilter  )  [virtual]
 

Writes the ThreeCol fill record to the filter.

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

Author:
Gerry_Iles (Xara Group Ltd) <camelotdev@xara.com>
Date:
9/8/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 11931 of file fillattr.cpp.

11932 {
11933 #ifdef DO_EXPORT
11934     ERROR2IF(pFilter == NULL,FALSE,"NULL filter param");
11935 
11936     // Must write out the colours first
11937     INT32 StartColRef = pFilter->WriteRecord(&Value.Colour);
11938     INT32 EndColRef  = pFilter->WriteRecord(&Value.EndColour);
11939     INT32 EndCol2Ref     = pFilter->WriteRecord(&Value.EndColour2);
11940 
11941     // Are the colour references ok?
11942     BOOL ok = ((StartColRef != 0) && (EndColRef != 0) && (EndCol2Ref != 0));
11943         
11944     if (ok)
11945     {
11946         CamelotFileRecord Rec(pFilter,TAG_THREECOLFILL,TAG_THREECOLFILL_SIZE);
11947 
11948         if (ok) ok = Rec.Init();
11949         if (ok) ok = Rec.WriteCoord(Value.StartPoint);
11950         if (ok) ok = Rec.WriteCoord(Value.EndPoint);
11951         if (ok) ok = Rec.WriteCoord(Value.EndPoint2);
11952         if (ok) ok = Rec.WriteReference(StartColRef);
11953         if (ok) ok = Rec.WriteReference(EndColRef);
11954         if (ok) ok = Rec.WriteReference(EndCol2Ref);
11955         if (ok) ok = pFilter->Write(&Rec);
11956     }
11957 
11958     if (!ok)
11959         pFilter->GotError(_R(IDE_FILE_WRITE_ERROR));
11960 
11961     return ok;
11962 #else
11963     return FALSE;
11964 #endif
11965 }


Member Data Documentation

ThreeColFillAttribute AttrThreeColColourFill::Value [protected]
 

Definition at line 1540 of file fillattr2.h.


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