S60 3rd Edition API Reference: eikclb.h Source File

eikclb.h

Go to the documentation of this file.
00001 // EIKCLB.H
00002 //
00003 // Copyright (c) 1997-1999 Symbian Ltd.  All rights reserved.
00004 //
00005 
00006 #if !defined(__EIKCLB_H__)
00007 #define __EIKCLB_H__
00008 
00009 
00010 #include <eiklbi.h>
00011 #include <eiktxlbx.h>
00012 #include <eiklbed.h>
00013 
00014 class CColumnListBoxData;
00015 
00016 
00022 class CColumnListBoxItemDrawer : public CTextListItemDrawer
00023     {
00024 
00025 public:
00026             
00041     IMPORT_C CColumnListBoxItemDrawer(MTextListBoxModel* aTextListBoxModel, 
00042                                       const CFont* aFont, 
00043                                       CColumnListBoxData* aColumnData);
00044  
00048     IMPORT_C ~CColumnListBoxItemDrawer();
00049 
00056     IMPORT_C CColumnListBoxData* ColumnData() const;
00057 
00058 public:
00059 
00060 
00066         struct SListProperties 
00067             {
00069             TInt iItem; // must be first
00070 
00072             TListItemProperties iProperties;
00073             };
00074 
00078     IMPORT_C void ClearAllPropertiesL();
00079         
00080    
00094     IMPORT_C void SetPropertiesL(TInt aItemIndex, 
00095                                  TListItemProperties aProperty);
00096 
00103     IMPORT_C virtual TListItemProperties Properties(TInt aItemIndex) const;
00104 
00105 public: // from CTextListItemDrawer
00106 
00118     IMPORT_C void DrawItemText(TInt aItemIndex,
00119                                const TRect& aItemTextRect,
00120                                TBool aItemIsCurrent,
00121                                TBool aViewIsEmphasized, 
00122                                TBool aItemIsSelected) const;
00123     // the next one is for avkon
00124 
00128     IMPORT_C void DrawItemMark(TBool aItemIsSelected, 
00129                                TBool aViewIsDimmed, 
00130                                const TPoint& aMarkPos) const;
00131 
00132 public: // from CListItemDrawer
00133 
00142     IMPORT_C TSize MinimumCellSize() const;
00143         
00152     IMPORT_C TInt ItemWidthInPixels(TInt aItemIndex) const;     
00153     
00164     IMPORT_C void SetItemCellSize(const TSize& aSizeInPixels);
00165         
00171     TSize LafItemSize() { return iItemCellSize; }
00172 
00173 private: // from CListItemDrawer
00174 
00175     IMPORT_C TAny* Reserved_1();
00176 
00177 private: // defining reserved method.
00178 
00179     IMPORT_C void CColumnListBoxItemDrawer_Reserved();
00180 
00181 protected:
00182 
00190     void DrawCurrentItemRect(const TRect& aRect) const;
00191         
00195     CArrayFix<SListProperties>* iPropertyArray;
00196         
00200     TInt iSpare;
00201     };
00202 
00203 
00232 class CEikColumnListBox : public CEikTextListBox
00233     {
00234 public:
00238     IMPORT_C CEikColumnListBox();
00239     
00248     IMPORT_C void ConstructFromResourceL( TResourceReader& aReader );
00249     
00258     IMPORT_C void ConstructL( const CCoeControl* aParent,TInt aFlags=0);
00262     IMPORT_C void EditItemL(TInt aColumn, TInt aMaxLength);
00263 protected:
00264 
00268     IMPORT_C virtual void CreateItemDrawerL();
00269 
00273     IMPORT_C virtual void CreateModelL();
00274 
00275 public:
00276 
00282     IMPORT_C CTextListBoxModel* Model() const;
00283  
00289     IMPORT_C CColumnListBoxItemDrawer* ItemDrawer() const;
00290 
00307     IMPORT_C void EnableExtendedDrawingL();
00308 
00312     void SetIconSizes();
00313 
00314 #start_since SINCE_3_1_SDK
00315 
00327     IMPORT_C void EnableStretching( const TBool aEnabled );
00328 #end_since SINCE_3_1_SDK
00329 public: // from CEikListBox
00330 
00344     IMPORT_C CListBoxView* MakeViewClassInstanceL();
00345     
00356     IMPORT_C void FocusChanged(TDrawNow aDrawNow);
00357 
00358 public: // from CCoeControl
00359 
00360 #start_since SINCE_3_1_SDK
00361 
00368     IMPORT_C void GetColorUseListL(
00369                         CArrayFix<TCoeColorUse>& aColorUseList) const;
00370 #end_since SINCE_3_1_SDK
00371 
00386     IMPORT_C void HandleResourceChange(TInt aType);
00387         
00404     IMPORT_C TTypeUid::Ptr MopSupplyObject(TTypeUid aUid);
00405     
00425     IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
00426 private:
00430     IMPORT_C void* ExtensionInterface( TUid aInterface );
00431 private:
00432     IMPORT_C virtual void CEikListBox_Reserved(); // listbox use only
00433 private: // data
00434     TInt iSpare;
00435     };
00436 
00443 class CEikColumnListBoxEditor : public CEikListBoxTextEditor
00444     {
00445 public:
00446     IMPORT_C CEikColumnListBoxEditor(MListBoxModel* aModel);
00447     IMPORT_C ~CEikColumnListBoxEditor();
00448     IMPORT_C void ConstructL(TInt aColumn);   // just set column index
00449 public: // from MEikListBoxEditor
00450     IMPORT_C TPtrC ItemText();
00451     IMPORT_C TBool UpdateModelL();
00452 public: // From CCoeControl
00453     IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);    
00454 protected:
00455     IMPORT_C TInt Column() const;
00456 private:
00460     IMPORT_C void* ExtensionInterface( TUid aInterface );
00461 private:
00462     TInt iColumnIndex; // refers to list box column
00463     };
00464 
00465 class CColumnListBoxView : public CListBoxView
00466     {
00467 public: // from CListBoxView
00468 
00478     IMPORT_C void Draw(const TRect* aClipRect = NULL) const;
00479     
00488         IMPORT_C virtual void CalcBottomItemIndex();
00489 
00490 private: // overridden from CListBoxView        
00491 
00492     IMPORT_C virtual TAny* Reserved_1();
00493 
00494 private: // data
00495     TInt iSpare;
00496     };
00497 
00498 // __EIKCLB_H__
00499 #endif
00500 
00501 // End of File

Copyright © Nokia Corporation 2001-2007
Back to top