Nokia N97 SDK
Example Applications Guide

MyViewContainer.h

00001 
00002 /*
00003 * ==============================================================================
00004 *  Name        : MyViewContainer.h
00005 *  Part of     : MyView
00006 *  Interface   :
00007 *  Description : Declares container for first view
00008 *  Version     :
00009 *
00010 *  Copyright (c) 2002 - 2007 Nokia Corporation.
00011 *  This material, including documentation and any related
00012 *  computer programs, is protected by copyright controlled by
00013 *  Nokia Corporation.
00014 * ==============================================================================
00015 */
00016 
00017 
00018 #ifndef MYVIEWCONTAINER_H
00019 #define MYVIEWCONTAINER_H
00020 
00021 // INCLUDES
00022 #include <coecntrl.h>
00023    
00024 // FORWARD DECLARATIONS
00025 class CEikLabel;        // for example labels
00026 
00027 // CLASS DECLARATION
00028 
00029 /**
00030 *  CMyViewContainer  container control class.
00031 *  
00032 */
00033 class CMyViewContainer : public CCoeControl, MCoeControlObserver
00034     {
00035     public: // Constructors and destructor
00036         
00037         /**
00038         * EPOC default constructor.
00039         * @param aRect Frame rectangle for container.
00040         */
00041         void ConstructL(const TRect& aRect);
00042 
00043         /**
00044         * Destructor.
00045         */
00046         ~CMyViewContainer();
00047 
00048    private: // Functions from base classes
00049 
00050        /**
00051         * From CoeControl,SizeChanged.
00052         */
00053         void SizeChanged();
00054 
00055        /**
00056         * From CoeControl,CountComponentControls.
00057         */
00058         TInt CountComponentControls() const;
00059 
00060        /**
00061         * From CCoeControl,ComponentControl.
00062         */
00063         CCoeControl* ComponentControl(TInt aIndex) const;
00064 
00065        /**
00066         * From CCoeControl,Draw.
00067         */
00068         void Draw(const TRect& aRect) const;
00069 
00070        /**
00071         * From CCoeControl, HandleControlEventL.
00072         */
00073         // event handling section
00074         // e.g Listbox events
00075         void HandleControlEventL(CCoeControl* aControl,TCoeEvent aEventType);
00076         
00077     private: //data
00078         
00079         CEikLabel* iLabel;          // example label
00080     };
00081 
00082 #endif
00083 
00084 // End of File

© Nokia 2009

Back to top