ViewList Class Reference

When optimising redraw for a particular View, we try to join all the render regions of a DocView into one if they cover more than 70% of the resulting union. This class is used to remember which Views we have already tried to optimise as we step through the render region list. More...

Inheritance diagram for ViewList:

List CCObject SimpleCCObject List of all members.

Public Member Functions

 ~ViewList ()
BOOL AddView (View *)
 Add a View to a list to indicate that it has been optimised.
BOOL IsViewOptimised (View *)
 Determine whether the given View is recorded in this list as having been optimised or not.

Detailed Description

When optimising redraw for a particular View, we try to join all the render regions of a DocView into one if they cover more than 70% of the resulting union. This class is used to remember which Views we have already tried to optimise as we step through the render region list.

Author:
Tim_Browse (Xara Group Ltd) <camelotdev@xara.com>
Date:
07/12/94
See also:
ViewItem; RenderRegionList

Definition at line 161 of file rgnlist.cpp.


Constructor & Destructor Documentation

ViewList::~ViewList  )  [inline]
 

Definition at line 166 of file rgnlist.cpp.

00166 { DeleteAll(); }


Member Function Documentation

BOOL ViewList::AddView View pView  ) 
 

Add a View to a list to indicate that it has been optimised.

Author:
Tim_Browse (Xara Group Ltd) <camelotdev@xara.com>
Date:
07/12/94
Parameters:
pView - pointer to the View to add to the list (only this pointer [INPUTS] is stored in the list).
Returns:
TRUE if View was added ok; FALSE if not => ERROR1

Errors: Out of memory => ERROR1

See also:
ViewList; ViewList::IsViewOptimised

Definition at line 198 of file rgnlist.cpp.

00199 {
00200     // Try to create the new item
00201     ViewItem *pItem = new ViewItem(pView);
00202     if (pItem == NULL)
00203         // Failed - flag error to caller
00204         return FALSE;
00205 
00206     // Ok - add to list and return success
00207     AddTail(pItem);
00208     return TRUE;
00209 }

BOOL ViewList::IsViewOptimised View pView  ) 
 

Determine whether the given View is recorded in this list as having been optimised or not.

Author:
Tim_Browse (Xara Group Ltd) <camelotdev@xara.com>
Date:
07/12/94
Parameters:
pView - the View to test for. [INPUTS]
Returns:
TRUE if the View has been optimised; FALSE if not
See also:
ViewList; ViewList::AddView

Definition at line 227 of file rgnlist.cpp.

00228 {
00229     ViewItem *pItem = (ViewItem *) GetHead();
00230     while (pItem != NULL)
00231     {
00232         if (pItem->pView == pView)
00233             // It's in the list
00234             return TRUE;
00235 
00236         // Try next item
00237         pItem = (ViewItem *) GetNext(pItem);
00238     }
00239 
00240     // Not found - inform caller
00241     return FALSE;
00242 }


The documentation for this class was generated from the following file:
Generated on Sat Nov 10 04:02:59 2007 for Camelot by  doxygen 1.4.4