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     /* C++ default constructor.
00027     *
00028     *  
00029     */
00030             
00031     IMPORT_C CColumnListBoxItemDrawer();
00032             
00047     IMPORT_C CColumnListBoxItemDrawer(MTextListBoxModel* aTextListBoxModel, 
00048                                       const CFont* aFont, 
00049                                       CColumnListBoxData* aColumnData);
00050  
00054     IMPORT_C ~CColumnListBoxItemDrawer();
00055 
00062     IMPORT_C CColumnListBoxData* ColumnData() const;
00063 
00064 public:
00065 
00066 
00072         struct SListProperties 
00073             {
00075             TInt iItem; // must be first
00076 
00078             TListItemProperties iProperties;
00079             };
00080 
00084     IMPORT_C void ClearAllPropertiesL();
00085         
00086    
00100     IMPORT_C void SetPropertiesL(TInt aItemIndex, 
00101                                  TListItemProperties aProperty);
00102 
00109     IMPORT_C virtual TListItemProperties Properties(TInt aItemIndex) const;
00110 
00111 public: // from CTextListItemDrawer
00112 
00124     IMPORT_C void DrawItemText(TInt aItemIndex,
00125                                const TRect& aItemTextRect,
00126                                TBool aItemIsCurrent,
00127                                TBool aViewIsEmphasized, 
00128                                TBool aItemIsSelected) const;
00129     // the next one is for avkon
00130 
00134     IMPORT_C void DrawItemMark(TBool aItemIsSelected, 
00135                                TBool aViewIsDimmed, 
00136                                const TPoint& aMarkPos) const;
00137 
00138 public: // from CListItemDrawer
00139 
00148     IMPORT_C TSize MinimumCellSize() const;
00149         
00158     IMPORT_C TInt ItemWidthInPixels(TInt aItemIndex) const;     
00159     
00170     IMPORT_C void SetItemCellSize(const TSize& aSizeInPixels);
00171         
00177     TSize LafItemSize() { return iItemCellSize; }
00178 
00179 private: // from CListItemDrawer
00180 
00181     IMPORT_C TAny* Reserved_1();
00182 
00183 private: // defining reserved method.
00184 
00185     IMPORT_C void CColumnListBoxItemDrawer_Reserved();
00186 
00187 protected:
00188 
00196     void DrawCurrentItemRect(const TRect& aRect) const;
00197         
00201     CArrayFix<SListProperties>* iPropertyArray;
00202         
00206     TInt iSpare;
00207     };
00208 
00209 
00238 class CEikColumnListBox : public CEikTextListBox
00239     {
00240 public:
00244     IMPORT_C CEikColumnListBox();
00245     
00254     IMPORT_C void ConstructFromResourceL( TResourceReader& aReader );
00255     
00264     IMPORT_C void ConstructL( const CCoeControl* aParent,TInt aFlags=0);
00268     IMPORT_C void EditItemL(TInt aColumn, TInt aMaxLength);
00269 protected:
00270 
00274     IMPORT_C virtual void CreateItemDrawerL();
00275 
00279     IMPORT_C virtual void CreateModelL();
00280 
00281 public:
00282 
00288     IMPORT_C CTextListBoxModel* Model() const;
00289  
00295     IMPORT_C CColumnListBoxItemDrawer* ItemDrawer() const;
00296 
00313     IMPORT_C void EnableExtendedDrawingL();
00314 
00318     void SetIconSizes();
00319 
00331     IMPORT_C void EnableStretching( const TBool aEnabled );
00332 public: // from CEikListBox
00333 
00347     IMPORT_C CListBoxView* MakeViewClassInstanceL();
00348     
00359     IMPORT_C void FocusChanged(TDrawNow aDrawNow);
00360 
00361 public: // from CCoeControl
00362 
00369     IMPORT_C void GetColorUseListL(
00370                         CArrayFix<TCoeColorUse>& aColorUseList) const;
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-2008
Back to top