examples/ForumNokia/ThreadAndActiveObjectsEx/inc/devicelistcontainer.h

00001 /*
00002  * Copyright © 2008 Nokia Corporation.
00003  */
00004 
00005 
00006 #ifndef __DEVICE_LIST_CONTAINER_H__
00007 #define __DEVICE_LIST_CONTAINER_H__
00008 
00009 // INCLUDES
00010 #include <badesca.h>    // CDesCArray
00011 #include <coecntrl.h>   // CCoeControl
00012 #include <eiklbo.h>         // MEikListBoxObserver
00013 
00014 // FORWARD DECLARATIONS
00015 class CAknSingleStyleListBox;
00016 class CSharedIntermediator;
00017 class CThreadAOAppUi;
00018 
00019 // CLASS DECLARATION
00020 
00026 class CDeviceListContainer : public CCoeControl, MEikListBoxObserver
00027         {
00028 public: // Constructors and destructor
00029 
00030         static CDeviceListContainer* NewL(const TRect& aRect);
00031         static CDeviceListContainer* NewLC(const TRect& aRect);
00032         ~CDeviceListContainer();
00033 
00034 public: // members
00035 
00042         void ShowSelectedAddressL();
00043 
00050         void AddItemL(const TDesC& aNewItem);
00051 
00058         void SetSMediator(CSharedIntermediator* aSMediator);
00059 
00065         void ClearListBox();
00066 
00072         void HandleChangedL();
00073 
00074 private: // members
00075         
00081         void CreateScrollBarsL();
00082 
00083 private: // constructor
00084 
00085         CDeviceListContainer();
00086         void ConstructL(const TRect& aRect);
00087 
00088 private: // from MEikListBoxObserver
00089 
00097         void HandleListBoxEventL( CEikListBox* aListBox,
00098                                      TListBoxEvent aListBoxEvent );
00099 
00100 private: // from CoeControl
00101 
00108         void SizeChanged();
00109         void HandleResourceChange(TInt aType);  
00110 
00117         TInt CountComponentControls() const;
00118 
00126         CCoeControl* ComponentControl(TInt aIndex) const;
00127         
00134         void Draw(const TRect& aRect) const;
00135 
00144         TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType);
00145 
00146 private: //member data
00147 
00148     // Listbox
00149         CAknSingleStyleListBox* iDeviceListBox; 
00150         // Shared class which main program and thread use
00151         CSharedIntermediator* iSMediator;
00152         };
00153 
00154 #endif  // #ifndef __DEVICE_LIST_CONTAINER_H__

Generated by  doxygen 1.6.2