Inheritance diagram for SpreadRedraws:
Public Member Functions | |
SpreadRedraws (Spread *) | |
Construct a spread redraw regions object for a given spread. The invalid region is initially NULL. | |
Spread * | GetSpread () |
void | AddInvalidRegion (DocRect, Node *pInvalidNode) |
Add another invalid region to the collection of regions for a spread. | |
void | FlushRedraw (DocView *) |
Force the specified DocView to immediately update all the regions encapsulated by this object. | |
void | ClearBackmostChangedNode (Node *pNode) |
Add another invalid region to the collection of regions for a spread. | |
Private Member Functions | |
CC_DECLARE_MEMDUMP (SpreadRedraws) | |
Private Attributes | |
Spread * | pInvalidSpread |
UINT32 | RectCount |
BOOL | TooManyRegions |
DocRect | InvalidRegions [(20)] |
Node * | m_pBackmostChangedNode |
Definition at line 198 of file docview.cpp.
|
Construct a spread redraw regions object for a given spread. The invalid region is initially NULL.
Definition at line 427 of file docview.cpp. 00428 { 00429 pInvalidSpread = pSpread; 00430 RectCount = 0; 00431 TooManyRegions = FALSE; 00432 m_pBackmostChangedNode = NULL; 00433 }
|
|
Add another invalid region to the collection of regions for a spread.
Definition at line 447 of file docview.cpp. 00448 { 00449 if (pInvalidNode!=NULL) 00450 if (m_pBackmostChangedNode==NULL || pInvalidNode->IsUnder(m_pBackmostChangedNode)) m_pBackmostChangedNode = pInvalidNode; 00451 00452 if (TooManyRegions) 00453 { 00454 // We have exceeded the maximum number of inidividual regions, so we just 00455 // union them all together. 00456 InvalidRegions[0] = InvalidRegions[0].Union(Rect); 00457 } 00458 else 00459 { 00460 // Have we just exceeded the maximum number of regions? 00461 if (RectCount == MAX_REDRAW_REGIONS) 00462 { 00463 // Yes - gather all the existing regions together into one. 00464 for (INT32 i = 1; i < MAX_REDRAW_REGIONS; i++) 00465 { 00466 InvalidRegions[0] = InvalidRegions[0].Union(InvalidRegions[i]); 00467 } 00468 00469 // Now merge the new region in 00470 InvalidRegions[0] = InvalidRegions[0].Union(Rect); 00471 00472 // Indicate that we have too many regions 00473 RectCount = 1; 00474 TooManyRegions = TRUE; 00475 } 00476 else 00477 { 00478 // Otherwise, just add region to the array 00479 InvalidRegions[RectCount] = Rect; 00480 RectCount++; 00481 } 00482 } 00483 }
|
|
|
|
Add another invalid region to the collection of regions for a spread.
Definition at line 497 of file docview.cpp. 00498 { 00499 if (pNode && (m_pBackmostChangedNode==pNode || pNode->IsNodeInSubtree(m_pBackmostChangedNode))) 00500 m_pBackmostChangedNode = pNode->FindParentSpread(); 00501 }
|
|
Force the specified DocView to immediately update all the regions encapsulated by this object.
Definition at line 516 of file docview.cpp. 00517 { 00518 // Cause an immediate update of the DocView 00519 for (UINT32 i = 0; i < RectCount; i++) 00520 { 00521 // For the moment, assume that pending redraws must have been due to editing... 00522 pDocView->ForceRedraw(pInvalidSpread, InvalidRegions[i], FALSE, m_pBackmostChangedNode); 00523 } 00524 }
|
|
Definition at line 205 of file docview.cpp. 00205 { return pInvalidSpread; }
|
|
Definition at line 214 of file docview.cpp. |
|
Definition at line 215 of file docview.cpp. |
|
Definition at line 211 of file docview.cpp. |
|
Definition at line 212 of file docview.cpp. |
|
Definition at line 213 of file docview.cpp. |