#include <clipattr.h>
Inheritance diagram for AttrClipView:
Public Member Functions | |
AttrClipView () | |
~AttrClipView () | |
AttrClipView (Node *ContextNode, AttachNodeDirection Direction, BOOL Locked=FALSE, BOOL Mangled=FALSE, BOOL Marked=FALSE, BOOL Selected=FALSE) | |
virtual void | Render (RenderRegion *pRender) |
For rendering a node. | |
virtual AttributeValue * | GetAttributeValue () |
Node * | SimpleCopy () |
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 () |
Returns back a string resource ID describing the attribute, this base class function returns the resource _R(IDS_ATTRIBUTE). | |
virtual AttrIndex | GetAttributeIndex () |
virtual UINT32 | GetNodeSize () |
virtual INT32 | operator== (const NodeAttribute &NodeAttrib) |
This function is slightly weird. Unlike most definitions of operator== it's virtual. | |
virtual BOOL | NeedsTransparency () const |
Can be overriden in derived classes to return TRUE, indicating that the user may be prompted concerning transparency mode when such a node is inserted in the tree. | |
virtual SubtreeRenderState | RenderSubtree (RenderRegion *pRender, Node **ppNextNode=NULL, BOOL bClip=TRUE) |
Virtual function - this version always returns TRUE, which indicates to the caller that we always want to render nodes of this type if we have encountered them. | |
virtual BOOL | IsAClipViewAttr () const |
virtual BOOL | CanBeMultiplyApplied () |
virtual BOOL | ShouldBeOptimized () |
virtual void | Transform (TransformBase &Trans) |
This is the base class verison of the transform function. This is called to move, scale, rotate etc renderable objects. Each class derived from NodeRenderableInk should write a version of this function that manipulates all the control points in the object and updates its bounding box. See NodePath for an example. | |
virtual BOOL | Blend (BlendAttrParam *pBlendParam) |
This will blend this attribute using the data held in pBlendParam. This base version does this: If the blend ratio <= 50%, this attr is copied If the blend ratio > 50%, the other attr is copied. | |
virtual BOOL | ContainsAttributeValue (AttributeValue *pVal) |
virtual BOOL | WritePreChildrenWeb (BaseCamelotFilter *pFilter) |
Writes out a record that represents the node. | |
virtual BOOL | WritePreChildrenNative (BaseCamelotFilter *pFilter) |
void | EnableRendering (BOOL DoEnableRendering=TRUE) |
BOOL | GetRenderStatus () |
virtual void | PolyCopyNodeContents (NodeRenderable *pNodeCopy) |
Polymorphically copies the contents of this node to another. | |
Public Attributes | |
ClipRegionAttribute | Value |
Private Member Functions | |
void | CopyNodeContents (NodeAttribute *pCopy) |
This method copies the node's contents to the node pointed to by NodeCopy. | |
Private Attributes | |
BOOL | m_DoRender |
Definition at line 158 of file clipattr.h.
|
Definition at line 339 of file clipattr.cpp. 00340 { 00341 m_DoRender = TRUE; 00342 Value.SetResponsibleForGrouping (TRUE); 00343 }
|
|
Definition at line 353 of file clipattr.cpp.
|
|
Definition at line 345 of file clipattr.cpp. 00346 : 00347 NodeAttribute(ContextNode, Direction, Locked, Mangled, Marked, Selected) 00348 { 00349 m_DoRender = TRUE; 00350 Value.SetResponsibleForGrouping (TRUE); 00351 }
|
|
This will blend this attribute using the data held in pBlendParam. This base version does this: If the blend ratio <= 50%, this attr is copied If the blend ratio > 50%, the other attr is copied.
Reimplemented from NodeAttribute. Definition at line 449 of file clipattr.cpp. 00450 { 00451 // Don`t want to blend this attribute at the mo! 00452 return FALSE; 00453 }
|
|
Reimplemented from NodeAttribute. Definition at line 195 of file clipattr.h. 00195 { return TRUE; }
|
|
Reimplemented from NodeAttribute. Definition at line 455 of file clipattr.cpp. 00456 { 00457 if(!pVal->IS_KIND_OF(ClipRegionAttribute)) 00458 { 00459 ENSURE(FALSE,"Strange attr value comparison test requested"); 00460 return FALSE; 00461 } 00462 00463 return (pVal == &Value); 00464 }
|
|
This method copies the node's contents to the node pointed to by NodeCopy.
Reimplemented from NodeAttribute. Definition at line 423 of file clipattr.cpp. 00424 { 00425 NodeAttribute::CopyNodeContents(pCopy); 00426 ((AttrClipView*)pCopy)->Value.SimpleCopy( &Value ); 00427 }
|
|
Definition at line 209 of file clipattr.h. 00209 { m_DoRender = DoEnableRendering; }
|
|
Reimplemented from NodeAttribute. Definition at line 183 of file clipattr.h. 00183 { return ATTR_CLIPVIEW; }
|
|
Reimplemented from NodeAttribute. Definition at line 180 of file clipattr.h. 00180 { return &Value; }
|
|
Returns back a string resource ID describing the attribute, this base class function returns the resource _R(IDS_ATTRIBUTE).
Reimplemented from NodeAttribute. Definition at line 182 of file clipattr.h. 00182 { return _R(IDS_CLIPVIEW_ATTR_ID); }
|
|
Definition at line 184 of file clipattr.h. 00184 { return sizeof(AttrClipView); }
|
|
Definition at line 212 of file clipattr.h. 00212 { return m_DoRender; }
|
|
Reimplemented from Node. Definition at line 192 of file clipattr.h. 00192 { return TRUE; }
|
|
Can be overriden in derived classes to return TRUE, indicating that the user may be prompted concerning transparency mode when such a node is inserted in the tree.
Reimplemented from Node. Definition at line 188 of file clipattr.h. 00188 { return FALSE; }
|
|
This function is slightly weird. Unlike most definitions of operator== it's virtual.
NodeAttribute* A,B; A = X; B = Y; where X and Y are pointers to instances of derived classes of NodeAttribute. if X->GetRuntimeClass() == Y->GetRuntimeClass() then we should be able to compare X and Y. But if we had defined a normal operator== fn then we find we cannot do this, because there is no way of casting to a type which is unknown at compile time. The implementation of operator== in all derived classes of NodeAttribute should look something like this. INT32 DerivedClass::operator==(const NodeAttribute& Attrib) { DerivedClass* Attr = (DerivedClass*) Compare member vars with Attr } Before calling this function you must be sure that the attributes have the same runtime class. The function needs to be defined in all derived classes of NodeAttribute
Reimplemented from NodeAttribute. Definition at line 429 of file clipattr.cpp. 00430 { 00431 Path* pComparePath = ((ClipRegionAttribute*)&NodeAttrib)->GetClipPath(); 00432 Path* pThisPath = Value.GetClipPath(); 00433 00434 if(pComparePath && pThisPath) 00435 { 00436 return pThisPath->ComparePathToPath(pComparePath); 00437 } 00438 00439 return -1; 00440 }
|
|
Polymorphically copies the contents of this node to another.
Reimplemented from NodeRenderable. Definition at line 412 of file clipattr.cpp. 00413 { 00414 ENSURE(pNodeCopy, "Trying to copy a node's contents into a NULL node"); 00415 ENSURE(IS_A(pNodeCopy, AttrClipView), "PolyCopyNodeContents given wrong dest node type"); 00416 00417 if (IS_A(pNodeCopy, AttrClipView)) 00418 CopyNodeContents((AttrClipView*)pNodeCopy); 00419 }
|
|
For rendering a node.
Reimplemented from NodeAttribute. Definition at line 357 of file clipattr.cpp. 00358 { 00359 // check the pointer and also make sure that we`re allowed to render 00360 if (!pRender || !m_DoRender) 00361 return; 00362 00363 // Don`t need to render when hit testing 00364 if(!pRender->IsHitDetect()) 00365 Value.Render(pRender); 00366 }
|
|
Virtual function - this version always returns TRUE, which indicates to the caller that we always want to render nodes of this type if we have encountered them.
Reimplemented from NodeAttribute. Definition at line 191 of file clipattr.h. 00191 {return SUBTREE_ROOTONLY; }
|
|
Reimplemented from NodeAttribute. Definition at line 196 of file clipattr.h. 00196 { return FALSE; }
|
|
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.
Reimplemented from NodeAttribute. Definition at line 389 of file clipattr.cpp. 00390 { 00391 AttrClipView* pAttr = new AttrClipView(); 00392 ERRORIF(pAttr==NULL, _R(IDE_NOMORE_MEMORY),NULL); 00393 00394 CopyNodeContents(pAttr); 00395 return pAttr; 00396 }
|
|
This is the base class verison of the transform function. This is called to move, scale, rotate etc renderable objects. Each class derived from NodeRenderableInk should write a version of this function that manipulates all the control points in the object and updates its bounding box. See NodePath for an example.
Reimplemented from NodeRenderable. Definition at line 442 of file clipattr.cpp. 00443 { 00444 // static const FIXED16 One(1.0); 00445 00446 // FIXED16 ScaleFactor = Trans.GetScaleFactor(); 00447 }
|
|
Reimplemented from Node. Definition at line 471 of file clipattr.cpp. 00472 { 00473 return TRUE; 00474 }
|
|
Writes out a record that represents the node. > virtual BOOL Node::WritePreChildrenWeb(BaseCamelotFilter* pFilter)
If the node writes out a record successfully to the file, it should return TRUE. If the node chooses not to write itself to the filter (e.g. because it is not appropriate for this filter), then this function should return FALSE. If an error occurs, the function should call pFilter->GotError(), and return FALSE. If the node does not want its child nodes to be written automatically, you should make sure you override CanWriteChildrenWeb() so it returns FALSE. (e.g. this node may choose to save its sub tree itself, so it can choose which of its child nodes should be saved out)
Reimplemented from Node. Definition at line 466 of file clipattr.cpp. 00467 { 00468 return TRUE; 00469 }
|
|
Definition at line 218 of file clipattr.h. |
|
Definition at line 221 of file clipattr.h. |