#include <textops.h>
Inheritance diagram for OpApplyGlobalAffect:
Protected Member Functions | |
void | DoAffectChange (ObjChangeParam *pObjChange, Document *pSearchDoc=NULL) |
Scans through all object nodes of all object trees in all documents, passing the user object change parameter to every node it comes accross. The tree scans are depth first. This is a useful operation for other ops to derive themselves off. | |
virtual void | AffectNode (Document *, Node *, ObjChangeParam *) |
This function checks for text story nodes. If the entry node is one, the node will be reformated and redrawn. | |
Private Member Functions | |
CC_DECLARE_DYNCREATE (OpApplyGlobalAffect) |
class CCAPI OpAffectFontChange : public Operation
Definition at line 992 of file textops.h.
|
This function checks for text story nodes. If the entry node is one, the node will be reformated and redrawn.
Reimplemented in OpAffectFontChange. Definition at line 6102 of file textops.cpp.
|
|
|
|
Scans through all object nodes of all object trees in all documents, passing the user object change parameter to every node it comes accross. The tree scans are depth first. This is a useful operation for other ops to derive themselves off.
Definition at line 6022 of file textops.cpp. 06023 { 06024 // Get a pointer to the StartDocument 06025 ERROR3IF(pObjChange == NULL, "DoAffectChange called with a NULL pObjChange param"); 06026 if (pObjChange==NULL) 06027 return; 06028 06029 Document* pDocument = pSearchDoc; 06030 if (!pDocument) 06031 pDocument = (Document*) Camelot.Documents.GetHead(); 06032 06033 #if !defined(EXCLUDE_FROM_RALPH) 06034 // render blobs off (only in selected doc) 06035 if (Camelot.FindSelection()!=NULL) 06036 { 06037 Node* SelNode = Camelot.FindSelection()->FindFirst(); 06038 if (SelNode!=NULL) 06039 { 06040 Spread* SelSpread = (Spread*)SelNode->FindParent(CC_RUNTIME_CLASS(Spread)); 06041 if (SelSpread!=NULL) 06042 Camelot.GetBlobManager()->RenderOff(NULL, SelSpread); 06043 } 06044 } 06045 #endif 06046 06047 // scan through all documents 06048 while (pDocument != NULL) 06049 { 06050 // Get a pointer to first node 06051 Node* pNode = Node::DocFindFirstDepthFirst(pDocument); 06052 // Scan through the tree, on a depth first traversal affecting all nodes. 06053 while (pNode != NULL) 06054 { 06055 AffectNode(pDocument, pNode, pObjChange); 06056 // Move onto the next node in the tree 06057 pNode = pNode->DocFindNextDepthFirst(); 06058 } 06059 // make sure we update all of this document 06060 pDocument->FlushRedraw(); 06061 06062 if (pSearchDoc==NULL) 06063 pDocument = (Document*) Camelot.Documents.GetNext(pDocument); 06064 else 06065 pDocument = NULL; 06066 } 06067 06068 // Now for the important bit, make sure we update all the changed nodes. 06069 pObjChange->Define(OBJCHANGE_FINISHED,pObjChange->GetChangeFlags(),NULL,NULL); 06070 UpdateAllChangedNodes(pObjChange); 06071 06072 #if !defined(EXCLUDE_FROM_RALPH) 06073 // render blobs back on again! 06074 if (Camelot.FindSelection()!=NULL) 06075 { 06076 Node* SelNode = Camelot.FindSelection()->FindFirst(); 06077 if (SelNode!=NULL) 06078 { 06079 Spread* SelSpread = (Spread*)SelNode->FindParent(CC_RUNTIME_CLASS(Spread)); 06080 if (SelSpread!=NULL) 06081 Camelot.GetBlobManager()->RenderOff(NULL, SelSpread); 06082 } 06083 } 06084 #endif 06085 }
|