examples/ForumNokia/ContactsModel/inc/ContactsModelContainer.h

00001 /*
00002  * Copyright © 2008 Nokia Corporation.
00003  */
00004 
00005 #ifndef CONTACTSMODELCONTAINER_H
00006 #define CONTACTSMODELCONTAINER_H
00007 
00008 // INCLUDES
00009 #include <aknlists.h>
00010 #include <coecntrl.h>
00011 
00012 // FORWARD DECLARATIONS
00013 class CContactsModelDocument;
00014 
00015 // CLASS DECLARATION
00016 
00021 class CContactsModelContainer : public CCoeControl, MCoeControlObserver
00022     {
00023     public: // Constructors and destructor
00024 
00029         void ConstructL(const TRect& aRect, CContactsModelDocument* aDocument);
00030 
00034         ~CContactsModelContainer();
00035 
00036     public: // New functions
00037 
00041                 void UpdateL();
00042 
00046                 TInt GetSelectedItem();
00047 
00056                 TInt ItemCount();
00057 
00058     public: // Functions from base classes
00059 
00060     private: // Functions from base classes
00061 
00065         void SizeChanged();
00066 
00070         TInt CountComponentControls() const;
00071 
00075         CCoeControl* ComponentControl(TInt aIndex) const;
00076 
00080         void Draw(const TRect& aRect) const;
00081 
00082 
00090         void HandleControlEventL(CCoeControl* aControl,TCoeEvent aEventType);
00091 
00100                 TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType);
00101 
00102     private: //data
00103 
00104                 //reference to the document
00105                 CContactsModelDocument* iDocument;
00106 
00107                 //list box component
00108             CAknSingleStyleListBox* iListBox;
00109 
00110                 //list box data
00111                 CDesCArrayFlat* iListBoxRows;
00112     };
00113 
00114 #endif
00115 
00116 // End of File

Generated by  doxygen 1.6.2