24 #ifndef __IContentDropperAppData__ 25 #define __IContentDropperAppData__ 28 #include "IContentDropperDocData.h" 29 #include "IDataBase.h" 32 #include "CCollection.h" 36 #include "ContentDropperID.h" 48 enum { kDefaultIID = IID_ICONTENTDROPPERAPPDATA };
57 bool16 operator==(
const iterator& rhs)
const 59 return (fIndex == rhs.fIndex && fIsExpanded == rhs.fIsExpanded);
61 bool16 operator!=(
const iterator& rhs)
const 63 return (fIndex != rhs.fIndex || fIsExpanded != rhs.fIsExpanded);
66 iterator& operator++() { ++fIndex;
return *
this;}
73 int32 parentIndex = fAppData->GetIndexOfRootAtHead();
74 const CCollection* coll = fAppData->GetNthCollection(parentIndex);
75 int32 size = coll->GetNumberOfElements();
76 return coll->GetNthElement(fIndex % size);
80 int32 size = fAppData->Size();
81 return fAppData->GetNthCollection(fIndex % size);
95 iterator begin(){
return iterator(
this,this->GetHeadIndex(), this->IsHeadExpanded()); }
99 int32 endIndex = this->GetHeadIndex();
102 int32 parentIndex = this->GetIndexOfRootAtHead();
103 const CCollection* coll = this->GetNthCollection(parentIndex);
104 endIndex+=coll->GetNumberOfElements();
108 endIndex+=this->Size();
110 return iterator(
this,endIndex,IsHeadExpanded());
113 iterator LastGrabbed()
119 int32 parentIndex = this->GetIndexOfRootAtHead();
120 const CCollection* coll = this->GetNthCollection(parentIndex);
121 lastIndex = coll->GetNumberOfElements() - 1;
125 lastIndex = this->Size() - 1;
127 return iterator(
this,lastIndex, IsHeadExpanded());
130 virtual void Create() = 0;
135 virtual void Clear() = 0;
142 virtual bool16
Find(
const UIDRef& uidRef)
const = 0;
144 virtual void RemoveAt(int32 at) = 0;
146 virtual int32 GetNextCaptureID() = 0;
149 virtual int32 Size()
const = 0;
150 virtual CCollection* GetFirstCollection()
const = 0;
151 virtual CCollection* GetNthCollection(int32 nth)
const = 0;
155 virtual const CCollection* GetHeadCollection() = 0;
156 virtual IDataBase* GetHeadCollectionDB()
const = 0;
157 virtual int32 MoveHead(int32 moveAhead) = 0;
158 virtual int32 MoveHeadToFirstCollection() = 0;
159 virtual int32 MoveHeadToLastCollection() = 0;
160 virtual void ExpandHead() = 0;
161 virtual void CollapseHead() = 0;
162 virtual bool16 IsHeadExpanded()
const = 0;
163 virtual void RemoveAtHead() = 0;
164 virtual bool16 CanExpandHead() = 0;
165 virtual bool16 CanCollapseHead() = 0;
166 virtual PMString GetDescriptionString()
const = 0;
167 virtual int32 GetNumOfItemsInLevel()
const = 0;
169 virtual int32 GetHeadIndex() = 0;
170 virtual int32 GetIndexOfRootAtHead()
const = 0;