#include <nodeclip.h>
Inheritance diagram for NodeClipView:
Public Member Functions | |
NodeClipView () | |
Default constructor. | |
NodeClipView (Node *pContextNode, AttachNodeDirection Direction, BOOL Locked=FALSE, BOOL Mangled=FALSE, BOOL Marked=FALSE, BOOL Selected=FALSE) | |
This method initialises the node and links it to pContextNode in the direction specified by Direction. All necessary tree links are updated. Most of the work is carried out by base constructors. | |
~NodeClipView () | |
Destructor. | |
virtual BOOL | IsANodeClipView () const |
virtual DocRect | GetBoundingRect (BOOL DontUseAttrs=FALSE, BOOL HitTest=FALSE) |
Find this node's bounding rectangle. If the rectangle is known to be valid then it is simply returned. If IsBoundingRectValid is FALSE then the rect is recalculated before it is returned and the validity flag reset. See also:. | |
virtual DocRect | GetBlobBoundingRect () |
Get this node's bounding rectangle when its blobs are drawn. | |
virtual SubtreeRenderState | RenderSubtree (RenderRegion *pRender, Node **ppNextNode=NULL, BOOL bClip=TRUE) |
Whether or not we need to render. Most NodeRenderableBounded's do a check on intersection with the render-region's clip-rect here, however we may sometimes need to render when we *don't* intersect the clip-rect, but one of our right-siblings does. So we'll just return TRUE from this whatever. | |
virtual void | Render (RenderRegion *pRender) |
Render method. See NodeClipViewController::Render() for complete details on what should happen when. | |
void | RenderClipAttr (RenderRegion *pRender) |
virtual void | RenderEorDrag (RenderRegion *pRender) |
Render this node as eor-blobs into the given render region. | |
virtual BOOL | RequiresAttrib (CCRuntimeClass *, BOOL) |
To determine if the node requires attribute AttribType to render itself. | |
virtual BOOL | RequiresAttrib (NodeAttribute *, BOOL) |
To determine if the node requires the pAttr to render itself. | |
virtual BOOL | CanAttrBeAppliedToMe (CCRuntimeClass *AttrType) |
This fn is not to be confused with RequiresAttrib, it determines if an attribute of type AttrType can be directly applied to this object. The object is assumed to Require the attribute. | |
virtual String | Describe (BOOL Plural, BOOL Verbose) |
Get a string description, for use in menus and infobar etc. | |
virtual UINT32 | GetNodeSize () const |
Obtain the size of a NodeClipView object. | |
void | Transform (TransformBase &Trans) |
Perform a transformation on this node. | |
virtual BOOL | WritePreChildrenWeb (BaseCamelotFilter *pFilter) |
Writes this node out to a camelot document. | |
virtual BOOL | WritePreChildrenNative (BaseCamelotFilter *pFilter) |
Writes this node out to a camelot document. | |
virtual BOOL | PostImport () |
Performs any necessary post-processing once the object has been read in from a file. | |
virtual void | PolyCopyNodeContents (NodeRenderable *pNodeCopy) |
Polymorphically copies the contents of this node to another. | |
Protected Member Functions | |
void | SetGDrawClippingRegion (RenderRegion *pRender) |
Work out the path of my keyhole node, save GDraw's rendering context and tell GDraw to clip to that path. | |
BOOL | RestoreGDrawClippingRegion (BOOL fFirstInRenderLoop=FALSE) |
If GDraw's clipping region has been set but not yet restored, then attempt to restore it from the copy we made when it was set. | |
void | SetClipPath (Path *pClipPath) |
virtual Node * | SimpleCopy () |
Copy this node. | |
void | CopyNodeContents (NodeClipView *pNodeCopy) |
Copy this node's contents into pNodeCopy. | |
Private Member Functions | |
CC_DECLARE_DYNCREATE (NodeClipView) | |
Private Attributes | |
BOOL | m_bRenderingForward |
BYTE * | m_pRegion |
GCONTEXT * | m_pContext |
CONST REGION * | m_pSavedRegion |
BOOL | m_bGDrawClipRegionSet |
RECT | m_SavedClipRect |
ClipRegionAttribute | m_ClipRegionAttribute |
Friends | |
class | NodeClipViewController |
Definition at line 123 of file nodeclip.h.
|
Default constructor.
Definition at line 131 of file nodeclip.cpp. 00131 : NodeRenderableInk() 00132 { 00133 // member variable initialisation. 00134 m_pRegion = NULL; 00135 m_pContext = NULL; 00136 m_bRenderingForward = FALSE; 00137 m_pSavedRegion = NULL; 00138 m_bGDrawClipRegionSet = FALSE; 00139 00140 m_ClipRegionAttribute.SetResponsibleForGrouping (FALSE); 00141 }
|
|
This method initialises the node and links it to pContextNode in the direction specified by Direction. All necessary tree links are updated. Most of the work is carried out by base constructors. PREV Attach node as a previous sibling of the context node. NEXT Attach node as a next sibling of the context node. FIRSTCHILD Attach node as the first child of the context node. LASTCHILD Attach node as a last child of the context node. Locked is node locked? Mangled is node mangled? Marked is node marked? Selected is node selected?
Definition at line 177 of file nodeclip.cpp. 00183 : NodeRenderableInk(pContextNode, Direction, Locked, Mangled, Marked, Selected) 00184 { 00185 // member variable initialisation. 00186 m_pRegion = NULL; 00187 m_pContext = NULL; 00188 m_bRenderingForward = FALSE; 00189 m_pSavedRegion = NULL; 00190 m_bGDrawClipRegionSet = FALSE; 00191 00192 m_ClipRegionAttribute.SetResponsibleForGrouping (FALSE); 00193 }
|
|
Destructor.
Definition at line 208 of file nodeclip.cpp. 00209 { 00210 // delete and clear member variables. 00211 if (m_pRegion != NULL) 00212 delete [] m_pRegion; m_pRegion = NULL; 00213 if (m_pContext != NULL) 00214 delete [] ((BYTE *)m_pContext); m_pContext = NULL; 00215 }
|
|
This fn is not to be confused with RequiresAttrib, it determines if an attribute of type AttrType can be directly applied to this object. The object is assumed to Require the attribute.
Certain attributes cannot be directly applied to specific nodes (even though they require the attribute to render). eg. LineSpacing attributes cannot be applied to text character objects. This function is called by the GetObjectToApplyTo virtual function.
Reimplemented from NodeRenderableInk. Definition at line 159 of file nodeclip.h. 00159 { return FALSE; }
|
|
|
|
Copy this node's contents into pNodeCopy.
Definition at line 593 of file nodeclip.cpp. 00594 { 00595 // call base-class implementation; this will also perform necessary validation for us. 00596 NodeRenderableInk::CopyNodeContents(pNodeCopy); 00597 00598 // TODO: 00599 // Any other relevant copying. 00600 }
|
|
Get a string description, for use in menus and infobar etc.
Reimplemented from Node. Definition at line 433 of file nodeclip.cpp. 00434 { 00435 if (Plural) 00436 return(String(_R(IDS_CLIPVIEW_DESCRP))); 00437 else 00438 return(String(_R(IDS_CLIPVIEW_DESCRS))); 00439 }
|
|
Get this node's bounding rectangle when its blobs are drawn.
Reimplemented from NodeRenderable. Definition at line 260 of file nodeclip.cpp. 00261 { 00262 // TODO: 00263 // need to investigate exactly when this method is used, as I don't think I should 00264 // implement it for an invisible node, but I'm not sure... 00265 00266 return DocRect(0, 0, 0, 0); 00267 }
|
|
Find this node's bounding rectangle. If the rectangle is known to be valid then it is simply returned. If IsBoundingRectValid is FALSE then the rect is recalculated before it is returned and the validity flag reset. See also:.
Reimplemented from NodeRenderableBounded. Definition at line 235 of file nodeclip.cpp. 00236 { 00237 // we want our Render() fuction to be called whenever that of our parent NCVC is called, 00238 // therefore we need the same size bounding rect. 00239 Node* pNCVC = FindParent(); 00240 if (pNCVC != NULL && pNCVC->IsANodeClipViewController()) 00241 return ((NodeRenderableInk*)pNCVC)->GetBoundingRect(DontUseAttrs, HitTest); 00242 else 00243 return DocRect(0, 0, 0, 0); 00244 }
|
|
Obtain the size of a NodeClipView object.
Reimplemented from Node. Definition at line 455 of file nodeclip.cpp. 00456 { 00457 return sizeof(NodeClipView); 00458 }
|
|
Reimplemented from Node. Definition at line 144 of file nodeclip.h. 00144 { return TRUE; }
|
|
Polymorphically copies the contents of this node to another.
Reimplemented from NodeRenderableBounded. Definition at line 616 of file nodeclip.cpp. 00617 { 00618 ENSURE(pNodeCopy, "Trying to copy a node's contents into a NULL node"); 00619 ENSURE(IS_A(pNodeCopy, NodeClipView), "PolyCopyNodeContents given wrong dest node type"); 00620 00621 if (IS_A(pNodeCopy, NodeClipView)) 00622 CopyNodeContents((NodeClipView*)pNodeCopy); 00623 }
|
|
Performs any necessary post-processing once the object has been read in from a file.
Reimplemented from Node. Definition at line 549 of file nodeclip.cpp. 00550 { 00551 // re-initialise our pointer to our keyhole node. 00552 return TRUE; 00553 }
|
|
Render method. See NodeClipViewController::Render() for complete details on what should happen when.
If we think we're in a backward rendering loop, then do nothing.
Reimplemented from Node. Definition at line 318 of file nodeclip.cpp. 00319 { 00320 // DEBUG 00321 // TRACEUSER( "Karim", _T("NCV::Render; Tag %d\n"), Tag); 00322 00323 // In the hit-test render-loop we do *not* 00324 // want to directly cause any clipping. at all other times, we render away. 00325 if (!pRender->IsHitDetect()) 00326 SetGDrawClippingRegion(pRender); 00327 }
|
|
Definition at line 345 of file nodeclip.cpp. 00346 { 00347 m_ClipRegionAttribute.Render(pRender); 00348 }
|
|
Render this node as eor-blobs into the given render region.
Reimplemented from NodeRenderableInk. Definition at line 413 of file nodeclip.cpp.
|
|
Whether or not we need to render. Most NodeRenderableBounded's do a check on intersection with the render-region's clip-rect here, however we may sometimes need to render when we *don't* intersect the clip-rect, but one of our right-siblings does. So we'll just return TRUE from this whatever.
Reimplemented from NodeRenderableBounded. Definition at line 292 of file nodeclip.cpp. 00293 { 00294 return SUBTREE_ROOTANDCHILDREN; 00295 }
|
|
To determine if the node requires the pAttr to render itself.
Reimplemented from NodeRenderableInk. Definition at line 158 of file nodeclip.h. 00158 { return FALSE; }
|
|
To determine if the node requires attribute AttribType to render itself.
Reimplemented from NodeRenderableInk. Definition at line 157 of file nodeclip.h. 00157 { return FALSE; }
|
|
If GDraw's clipping region has been set but not yet restored, then attempt to restore it from the copy we made when it was set.
Definition at line 393 of file nodeclip.cpp. 00394 { 00395 return TRUE; 00396 }
|
|
Definition at line 190 of file nodeclip.h. 00190 { m_ClipRegionAttribute.SetClipPath(pClipPath); }
|
|
Work out the path of my keyhole node, save GDraw's rendering context and tell GDraw to clip to that path.
Definition at line 369 of file nodeclip.cpp. 00370 { 00371 m_ClipRegionAttribute.Render(pRender); 00372 }
|
|
Copy this node.
Reimplemented from NodeRenderableInk. Definition at line 570 of file nodeclip.cpp. 00571 { 00572 NodeClipView* pNodeCopy = new NodeClipView; 00573 ERROR1IF(pNodeCopy == NULL, NULL, _R(IDE_NOMORE_MEMORY)); 00574 CopyNodeContents(pNodeCopy); 00575 00576 return pNodeCopy; 00577 }
|
|
Perform a transformation on this node.
Reimplemented from NodeRenderableBounded. Definition at line 475 of file nodeclip.cpp. 00476 { 00477 // leave it up to the base class... 00478 NodeRenderableInk::Transform(Trans); 00479 }
|
|
Writes this node out to a camelot document.
Reimplemented from Node. Definition at line 528 of file nodeclip.cpp. 00529 { 00530 return WritePreChildrenWeb(pFilter); 00531 }
|
|
Writes this node out to a camelot document.
Reimplemented from Node. Definition at line 498 of file nodeclip.cpp. 00499 { 00500 // validate input. 00501 ERROR2IF(pFilter == NULL, FALSE, "NULL parameter"); 00502 00503 CXaraFileRecord Rec(TAG_CLIPVIEW, TAG_CLIPVIEW_SIZE); 00504 00505 BOOL ok = Rec.Init(); 00506 if (ok) ok = (pFilter->Write(&Rec) != 0); 00507 00508 return ok; 00509 }
|
|
Definition at line 129 of file nodeclip.h. |
|
Definition at line 208 of file nodeclip.h. |
|
Definition at line 204 of file nodeclip.h. |
|
Definition at line 212 of file nodeclip.h. |
|
Definition at line 206 of file nodeclip.h. |
|
Definition at line 205 of file nodeclip.h. |
|
Definition at line 207 of file nodeclip.h. |
|
Definition at line 209 of file nodeclip.h. |