00001 
00002 
00003 
00004 
00005 
00006 #if !defined(__EIKCAPCA_H__)
00007 #define __EIKCAPCA_H__
00008 
00009 #include <e32base.h>
00010 
00011 class CEikCaptionedControl;
00012 class CCoeControl;
00013 class CEikCapCArrayExtension;
00014 
00015 class CEikCapCArray : public CArrayPtrFlat<CEikCaptionedControl>
00016         {
00017 public:
00024         IMPORT_C CEikCapCArray(TInt aGranularity);
00025     
00030         IMPORT_C ~CEikCapCArray();
00031 
00039         IMPORT_C TSize MinimumSize();
00040  
00049         IMPORT_C void SetRect(const TRect& aRect);
00050         
00057         IMPORT_C void ResetMinimumSizes();
00058 
00068         IMPORT_C TInt LineIndexFromId(TInt aControlId) const;
00069 
00079         IMPORT_C TInt FindLineIndex(const CCoeControl* aControl) const;
00080 
00088         IMPORT_C void DeleteLine(TInt aIndex);
00089 
00094         IMPORT_C void AdjustAllIds(TInt aControlIdDelta);
00095 
00100         IMPORT_C void SetDensePacking(TBool aDensePacking);
00101         TBool CalcItemIndexes(TInt &aTopItemIndex, TInt &aMiddleItems, TInt &aBottomItemIndex, TSize aAreaSize);
00102         TInt NumberOfTextLines() const; 
00103         TInt NumberOfTextLinesBeforeLine(TInt aLine) const;
00104         TInt FindItemFromTextLine(TInt aTextLine) const;
00105         TRect Rect() const;
00106         void SetRect(const TRect& aRect, TInt aTop, TInt aMiddle, TInt aBottom);
00107         TInt YPosToLine(const TRect &aRect, TInt aTop, TInt aMiddle, TInt aBottom, TInt aYCoord);
00108         void CreateExtensionL();
00109         CEikCapCArrayExtension *ExtensionOrNull() const;
00110 private:
00111         
00112         CEikCapCArrayExtension *iExtension;
00113         TBool iDensePacking;
00114         
00115         };
00116 
00117 #endif