#include <bmpseq.h>
Inheritance diagram for BitmapSequence:
Public Member Functions | |
BitmapSequence (BitmapSequenceInfo *pSequenceInfo) | |
void | DeleteAll () |
Deletes all the KernelBitmaps in the sequence. | |
KernelBitmap * | FindInDocumentList (Document *pDocument) |
Searches for this BitmapSequence in pImportDocument's bitmap list. | |
BOOL | CopyFromDocumentList (Document *pDocument, const KernelBitmap *pStartBitmap, const UINT32 uNumberToCopy) |
Copies a sequence of bitmaps from the given document's bitmap list into this BitmapSequence. | |
BitmapSequenceInfo * | GetSequenceInfo () const |
Er... | |
BOOL | SetSequenceInfo (BitmapSequenceInfo *pNewInfo) |
To allow for future extensions. | |
UINT32 | GetCount () const |
You would probably want to know this. | |
Protected Attributes | |
BitmapSequenceInfo * | m_pSequenceInfo |
Definition at line 143 of file bmpseq.h.
|
Definition at line 148 of file bmpseq.h. 00148 : 00149 m_pSequenceInfo(pSequenceInfo) {}
|
|
Copies a sequence of bitmaps from the given document's bitmap list into this BitmapSequence.
Definition at line 161 of file bmpseq.cpp. 00162 { 00163 if (pDocument == NULL) 00164 { 00165 pDocument = Document::GetSelected(); 00166 } 00167 ERROR2IF(pDocument == NULL, FALSE, "pDocument == NULL") 00168 // The bitmap system relies on the Current Doc being correct, 00169 // so we'll set it to be on the safe side 00170 pDocument->SetCurrent(); 00171 00172 // Find this document's BitmapListComponent 00173 DocComponent* pDocBitmapList = pDocument->GetDocComponent(CC_RUNTIME_CLASS(BitmapListComponent)); 00174 ERROR2IF(pDocBitmapList == NULL, FALSE, "Couldn't find document bitmap list"); 00175 00176 // Now get the actual bitmap list 00177 BitmapList* pBmpList = ((BitmapListComponent*)pDocBitmapList)->GetBitmapList(); 00178 00179 ListItem* pItem = (ListItem*)pStartBitmap; 00180 UINT32 uCurrentIndex = 1; 00181 00182 while (uCurrentIndex <= uNumberToCopy) 00183 { 00184 KernelBitmap* pBmp = (KernelBitmap*)pItem; 00185 ERROR3IF_NULL_CLASS(pBmp, KernelBitmap); 00186 00187 if (!AddBitmap(pBmp, INT32(uCurrentIndex))) 00188 { 00189 return FALSE; 00190 } 00191 00192 pItem = pBmpList->GetNext(pItem); 00193 ++uCurrentIndex; 00194 } 00195 return TRUE; 00196 }
|
|
Deletes all the KernelBitmaps in the sequence.
Definition at line 141 of file bmpseq.cpp.
|
|
Searches for this BitmapSequence in pImportDocument's bitmap list.
Definition at line 625 of file bmpseq.cpp. 00626 { 00627 ERROR2IF(pImportDocument == NULL, FALSE, "pImportDocument NULL"); 00628 ERROR3IF(!pImportDocument->IS_KIND_OF(Document), "BitmapSequence::FindInDocumentList - pImportDocument isn't"); 00629 00630 // First we need to look at the Bitmap List in the document we are Importing 00631 // into, and if we find a KernelBitmap that points at a bitmap the same as the 00632 // one we have imported, then we'll just use that. 00633 00634 // The bitmap system relies on the Current Doc being correct, 00635 // so we'll set it to be on the safe side 00636 pImportDocument->SetCurrent(); 00637 00638 // Find this document's BitmapListComponent 00639 DocComponent* pDocBitmapList = 00640 pImportDocument->GetDocComponent(CC_RUNTIME_CLASS(BitmapListComponent)); 00641 ERROR2IF(pDocBitmapList == NULL, FALSE, "Couldn't find document bitmap list"); 00642 List* pMainList = (List*)((BitmapListComponent*)pDocBitmapList)->GetBitmapList(); 00643 00644 KernelBitmap* pFound; // the first item in the document list for the match 00645 // if there's only one bitmap do a simple search for it... 00646 /* if (GetCount() == 1) 00647 { 00648 KernelBitmap* pStart = (KernelBitmap*)pMainList->GetHead(); 00649 KernelBitmap* pBitmap = ((ImportBitmap*)((List*)&Bitmaps)->GetHead())->pBmp; 00650 pFound = FindBitmap(pMainList, pStart, pBitmap); 00651 } 00652 else // do a hideous search 00653 {*/ 00654 ListItem* pFirstMain = (ListItem*)pMainList->GetHead(); 00655 List* pNewBitmaps = (List*)&Bitmaps; 00656 pFound = FindSimple(pMainList, pNewBitmaps, pFirstMain); 00657 // } 00658 00659 return pFound; 00660 }
|
|
You would probably want to know this.
Definition at line 604 of file bmpseq.cpp.
|
|
Er...
Definition at line 565 of file bmpseq.cpp. 00566 { 00567 return m_pSequenceInfo; 00568 }
|
|
To allow for future extensions.
Definition at line 584 of file bmpseq.cpp. 00585 { 00586 ERROR3IF(pNewInfo != NULL && !pNewInfo->IS_KIND_OF(BitmapSequenceInfo), 00587 "BitmapSequence::SetSequenceInfo - pNewInfo isn't"); 00588 00589 m_pSequenceInfo = pNewInfo; 00590 return TRUE; 00591 }
|
|
|