eikfrlb.h

Go to the documentation of this file.
00001 /*
00002 * ============================================================================
00003 *  Name     : Eikfrlb.h
00004 *  Part of  : Avkon
00005 *
00006 *  Description:
00007 *  Version:
00008 *
00009 *  Copyright © 2002 Nokia Corporation.
00010 *  This material, including documentation and any related 
00011 *  computer programs, is protected by copyright controlled by 
00012 *  Nokia Corporation. All rights are reserved. Copying, 
00013 *  including reproducing, storing,  adapting or translating, any 
00014 *  or all of this material requires the prior written consent of 
00015 *  Nokia Corporation. This material also contains confidential 
00016 *  information which may not be disclosed to others without the 
00017 *  prior written consent of Nokia Corporation.
00018 * ============================================================================
00019 */
00020 // EIKFRLB.H
00021 //
00022 // Copyright (c) 1997-2001 Symbian Ltd.  All rights reserved.
00023 //
00024 #if !defined(__EIKFRLB_H__)
00025 #define __EIKFRLB_H__
00026 
00027 #include <eiklbi.h>
00028 #include <eiklbv.h>
00029 #include <eiktxlbm.h>
00030 #include <eiktxlbx.h>
00031 
00032 class CFormattedCellListBoxData;
00033 
00040 class CFormattedCellListBoxItemDrawer : public CTextListItemDrawer
00041         {
00042 public:
00043 
00051         IMPORT_C CFormattedCellListBoxItemDrawer(
00052             MTextListBoxModel* aTextListBoxModel, 
00053             const CFont* aFont, 
00054             CFormattedCellListBoxData* aFormattedCellData);
00055         
00059     IMPORT_C ~CFormattedCellListBoxItemDrawer();
00060 
00066         IMPORT_C CFormattedCellListBoxData* FormattedCellData() const;
00067 
00073         IMPORT_C CFormattedCellListBoxData* ColumnData() const; 
00074     // for compability with columnlistbox itemdrawer
00075 
00083     IMPORT_C virtual void DrawEmptyItem(TInt aItemIndex, TPoint aItemRectPos, 
00084                                         TBool aViewIsDimmed) const;
00085 
00091         IMPORT_C void SetTopItemIndex(TInt aTop);
00092 
00096         struct SListProperties 
00097             {
00099         TInt iItem; // must be first
00100 
00102         TListItemProperties iProperties;
00103             };
00104 
00108         IMPORT_C void ClearAllPropertiesL();
00109 
00127     IMPORT_C void SetPropertiesL(TInt aItemIndex, TListItemProperties properties);
00128 
00136         IMPORT_C virtual TListItemProperties Properties(TInt aItemIndex) const;
00137 
00143         TSize LafItemSize() { return iItemCellSize; }
00144 
00145 public: // from CTextListItemDrawer
00146 
00162         IMPORT_C void DrawItemText(TInt aItemIndex,const  TRect& aItemTextRect,
00163                                TBool aItemIsCurrent, TBool aViewIsEmphasized, 
00164                                TBool aItemIsSelected) const;
00165 
00186         IMPORT_C void DrawItemMark(TBool aItemIsSelected, TBool aViewIsDimmed, 
00187                                const TPoint& aMarkPos) const;
00188 
00189 public: // from CListItemDrawer
00190 
00199         IMPORT_C TSize MinimumCellSize() const;
00200 
00209         IMPORT_C TInt ItemWidthInPixels(TInt aItemIndex) const; 
00210 
00221     IMPORT_C void SetItemCellSize(const TSize& aSizeInPixels);
00222 
00223 protected:
00224     
00230         void DrawCurrentItemRect(const TRect& aRect) const;
00231 
00245     void WordWrapListItem( TPtr& aTarget, 
00246                            const TDesC &aItemString, 
00247                            TInt aFirstIndex, 
00248                            TInt aSecondIndex,
00249                            TInt aItemIndex ) const;
00253     void DrawBackgroundAndSeparatorLines( const TRect& aItemTextRect ) const;
00254                         
00255 
00256 private:
00257 
00258         IMPORT_C void CFormattedCellListBoxItemDrawer_Reserved();
00259 
00260 protected:
00261 
00265         TInt iTopItemIndex;
00266 
00271         CArrayFix<SListProperties>* iPropertyArray;
00272 
00273 private:
00274 
00275         TInt iSpare;
00276         };
00277 
00278 
00334 class CEikFormattedCellListBox : public CEikTextListBox 
00335         {
00336 
00337 public:
00338 
00342         IMPORT_C CEikFormattedCellListBox();
00343 
00357         IMPORT_C void ConstructFromResourceL(TResourceReader& aReader);
00358         
00371         IMPORT_C void ConstructL(const CCoeControl* aParent, TInt aFlags);
00372 
00373 public:
00374 
00380         IMPORT_C CTextListBoxModel* Model() const;
00381 
00387         IMPORT_C CFormattedCellListBoxItemDrawer* ItemDrawer() const;
00388 
00392     void SetIconSizes();
00393 
00394 public:
00395 
00409         IMPORT_C void UseLogicalToVisualConversion( TBool aUseConversion );
00410 
00411 public:
00412 
00431     IMPORT_C void EnableExtendedDrawingL();
00432     
00443     IMPORT_C void EnableStretching( const TBool aEnabled );
00444 
00452     IMPORT_C void HideSecondRow( const TBool aHide );
00453 protected:
00454 
00458         IMPORT_C virtual void CreateItemDrawerL();
00459 
00469         IMPORT_C virtual TInt AdjustRectHeightToWholeNumberOfItems(
00470                                     TRect &aRect) const;
00471 
00472 public: // from CEikListBox
00473 
00481         IMPORT_C CListBoxView* MakeViewClassInstanceL();
00482 
00493     IMPORT_C void FocusChanged(TDrawNow aDrawNow);
00494 
00495 public: // from CCoeControl
00496 
00504         IMPORT_C void GetColorUseListL(
00505         CArrayFix<TCoeColorUse>& aColorUseList) const;
00506         
00514     IMPORT_C void HandleResourceChange(TInt aType);
00515     
00523     IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
00524 
00525 protected: // from MObjectProvider
00526 
00538         IMPORT_C virtual TTypeUid::Ptr MopSupplyObject(TTypeUid aId);
00539 
00540 private: 
00541 
00545         IMPORT_C void* ExtensionInterface( TUid aInterface );
00546 
00547 private: // listbox use only
00548 
00549         IMPORT_C virtual void CEikListBox_Reserved(); 
00550 
00551 private: // data
00552 
00553     TInt iSpare;
00554 };
00555 
00556 
00564 class CFormattedCellListBoxView : public CListBoxView
00565         {
00566 
00567 public: // from CListBoxView
00568 
00576         IMPORT_C void Draw(const TRect* aClipRect = NULL) const;
00577 
00585         IMPORT_C virtual void DrawEmptyList(const TRect &aClientRect) const;
00586         
00595     IMPORT_C virtual void CalcBottomItemIndex();
00596 
00597 private: // overridden from CListBoxView
00598 
00599         IMPORT_C virtual TAny* Reserved_1();
00600         };
00601 
00602 
00603 // __EIKFRLB_H__
00604 #endif
00605 
00606 // End of File

Copyright © Nokia Corporation 2001-2008
Back to top