#include <ops.h>
Inheritance diagram for InvalidateRegionIfBgRedrawAction:
Public Member Functions | |
InvalidateRegionIfBgRedrawAction () | |
InvalidateRegionIfBgRedrawAction constructor. | |
virtual ActionCode | Execute () |
Executes the InvalidateRegionAction which invalidates a region which is the union of the bounding rectangles of each node in the range. When the includeBlobs flag is TRUE the region which gets invalidated includes the objects blobs. | |
Static Public Member Functions | |
static ActionCode | Init (Operation *const pOp, ActionList *pActionList, Range nodeRange, Spread *pSpread, BOOL includeBlobs, Action **NewAction) |
To check that there is sufficient room for the action in the operation history, and if there is, then to add the action to the operations action list. |
Definition at line 798 of file ops.h.
|
InvalidateRegionIfBgRedrawAction constructor.
Definition at line 2902 of file ops.cpp.
|
|
Executes the InvalidateRegionAction which invalidates a region which is the union of the bounding rectangles of each node in the range. When the includeBlobs flag is TRUE the region which gets invalidated includes the objects blobs.
Reimplemented from InvalidateRegionAction. Definition at line 2926 of file ops.cpp. 02927 { 02928 InvalidateRegionIfBgRedrawAction* InvRgnAct; 02929 ActionCode ActCode; 02930 // Attempt to initialise the action 02931 if ((ActCode = InvalidateRegionIfBgRedrawAction::Init(pOperation, 02932 pOppositeActLst, 02933 NodeRange, 02934 pSpread, 02935 IncludeBlobs, 02936 (Action**)(&InvRgnAct))) != AC_FAIL) 02937 02938 02939 { 02940 // The action was successfully initialised 02941 02942 if (!GetApplication()->IsBgRendering()) 02943 return AC_OK; 02944 02945 // GetApplication()->DeleteRenderRegions(DocView::GetSelected()); 02946 // GetApplication()->BgRendering = FALSE; 02947 02948 // Invalidate each nodes bounds 02949 02950 Document* pDocument = pOperation->GetWorkingDoc(); 02951 ENSURE(pDocument != 0, "There was no current document in InvalidateRegionAction" ); 02952 02953 if (pDocument != NULL) 02954 { 02955 NodeRenderableInk* CurrentNode = (NodeRenderableInk*)NodeRange.FindFirst(); 02956 02957 DocRect InvalidRgn; 02958 02959 while (CurrentNode != NULL) 02960 { 02961 if (CurrentNode->IsAnObject() || CurrentNode->IsPaper()) 02962 { 02963 // Find the region to invalidate 02964 InvalidRgn = (IncludeBlobs ? 02965 (((NodeRenderableInk*)CurrentNode)->GetUnionBlobBoundingRect()): 02966 (((NodeRenderableInk*)CurrentNode)->GetBoundingRect()) 02967 ); 02968 02969 pDocument->ForceRedraw(pSpread, InvalidRgn, TRUE, CurrentNode); 02970 } 02971 CurrentNode = (NodeRenderableInk*)NodeRange.FindNext(CurrentNode); 02972 } 02973 } 02974 02975 } 02976 return ActCode; 02977 }
|
|
To check that there is sufficient room for the action in the operation history, and if there is, then to add the action to the operations action list.
NodeRange: The range of nodes to be invalidated pSpread: The ranges spread IncludeBlobs: When TRUE invalidate the blob bounding rectangles of the nodes in the range.
AC_OK : The action was successfully initialised and added to the operation. The function calls the Action::Init function passing the runtime class of an InvalidateRegionAction. If successful it records the NodeTag.
Reimplemented from InvalidateRegionAction. Definition at line 3027 of file ops.cpp. 03033 { 03034 ActionCode Ac = (Action::Init(pOp, 03035 pActionList, 03036 sizeof(InvalidateRegionIfBgRedrawAction), 03037 CC_RUNTIME_CLASS(InvalidateRegionIfBgRedrawAction), 03038 NewAction)); 03039 if (*NewAction != NULL) 03040 { 03041 ((InvalidateRegionIfBgRedrawAction*)(*NewAction))->NodeRange = nodeRange; 03042 ((InvalidateRegionIfBgRedrawAction*)(*NewAction))->IncludeBlobs = includeBlobs; 03043 ((InvalidateRegionIfBgRedrawAction*)(*NewAction))->pSpread = pSpread; 03044 } 03045 return (Ac); 03046 }
|