#include <DisplayList.h>
Public Member Functions | |
CDisplayList (void) | |
~CDisplayList (void) | |
void | clear () |
void | add (TodoItem *item) |
GBool | remove (const int pn) |
GBool | isEmpty () |
void | issueItems (CPDFView *) |
void | renderItems (CPDFView *) |
Private Attributes | |
GooList | displayList |
Definition at line 30 of file DisplayList.h.
CDisplayList::CDisplayList | ( | void | ) |
CDisplayList::~CDisplayList | ( | void | ) |
Definition at line 27 of file DisplayList.cpp.
00028 { 00029 clear(); 00030 }
void CDisplayList::clear | ( | ) |
Definition at line 32 of file DisplayList.cpp.
00033 { 00034 while (displayList.getLength() > 0) 00035 { 00036 delete (TodoItem *)displayList.del(0); 00037 } 00038 }
void CDisplayList::add | ( | TodoItem * | item | ) |
GBool CDisplayList::remove | ( | const int | pn | ) |
Definition at line 45 of file DisplayList.cpp.
00046 { 00047 TodoItem * pItem = NULL; 00048 for(int i = 0; i < displayList.getLength(); ++i) 00049 { 00050 pItem = (TodoItem *)displayList.get(i); 00051 if (pItem && pn == pItem->pageNumber) 00052 { 00053 delete pItem; 00054 displayList.del(i); 00055 return gTrue; 00056 } 00057 } 00058 return gFalse; 00059 }
GBool CDisplayList::isEmpty | ( | ) |
Definition at line 61 of file DisplayList.cpp.
00062 { 00063 return ( 0 == displayList.getLength()); 00064 }
void CDisplayList::issueItems | ( | CPDFView * | view | ) |
Definition at line 66 of file DisplayList.cpp.
00067 { 00068 TodoItem * pItem = NULL; 00069 for(int i = 0; i < displayList.getLength(); ++i) 00070 { 00071 pItem = (TodoItem *)displayList.get(i); 00072 if (pItem && 0 != pItem->timeStamp) 00073 { 00074 // only add items that are not in rendering 00075 view->issueItem(pItem->pageNumber); 00076 } 00077 } 00078 view->ctrl->thread.signal(); 00079 }
void CDisplayList::renderItems | ( | CPDFView * | view | ) |
Definition at line 81 of file DisplayList.cpp.
00082 { 00083 TodoItem * pItem = NULL; 00084 for(int i = 1; i < displayList.getLength(); ++i) 00085 { 00086 pItem = (TodoItem *)displayList.get(i); 00087 if (pItem) 00088 { 00089 view->issueItem(pItem->pageNumber); 00090 } 00091 } 00092 pItem = (TodoItem *)displayList.get(0); 00093 TodoItem * item = new TodoItem(*pItem); 00094 view->ctrl->thread.renderPageNow(item); 00095 }
GooList CDisplayList::displayList [private] |
Definition at line 33 of file DisplayList.h.