S60UIExampleInitialContainer.h
上传用户:laixiong
上传日期:2007-03-11
资源大小:2994k
文件大小:3k
源码类别:
Symbian
开发平台:
C/C++
- // Copyright (c) 2006 Nokia Corporation.
- #ifndef __S60UIEXAMPLE_INITIALCONTAINER_H__
- #define __S60UIEXAMPLE_INITIALCONTAINER_H__
- #include <coecntrl.h>
- class CS60UIExampleModel;
- /**
- * CS60UIExampleInitialContainer container control class.
- * An instance of CS60UIExampleInitialContainer contains the view drawn to the screen
- * for CS60UIExampleInitialView
- */
- class CS60UIExampleInitialContainer : public CCoeControl
- {
- public: // Constructors and destructor
- /**
- * NewL.
- * Two-phased constructor.
- * Create a CS60UIExampleInitialContainer object, which will draw itself to aRect
- * @param aRect The rectangle this view will be drawn to.
- * @return a pointer to the created instance of CS60UIExampleInitialContainer.
- */
- static CS60UIExampleInitialContainer* NewL(const TRect& aRect,
- CS60UIExampleModel& aModel);
- /**
- * NewLC.
- * Two-phased constructor.
- * Create a CS60UIExampleInitialContainer object, which will draw itself to aRect
- * @param aRect The rectangle this view will be drawn to.
- * @param aModel The model containing game data and state.
- * @return a pointer to the created instance of CS60UIExampleContainer1.
- */
- static CS60UIExampleInitialContainer* NewLC(const TRect& aRect,
- CS60UIExampleModel& aModel);
- /**
- * ConstructL
- * 2nd phase constructor.
- * @param aRect Frame rectangle for container.
- */
- void ConstructL(const TRect& aRect);
- /**
- * Destructor
- */
- virtual ~CS60UIExampleInitialContainer();
- public: // from CoeControl
- /**
- * SizeChanged
- * Prepare layout based on screen size
- */
- void SizeChanged();
- /**
- * HandleResourceChange
- * Handle Resource change. In this case a change in screen size is
- * handled by calling SetRect, and hence SizeChanged
- */
- void HandleResourceChange(TInt aType);
- /**
- * Draw
- * Draw this CS60UIExampleInitialContainer to the screen.
- * @param aRect the rectangle of this view that needs updating
- */
- void Draw( const TRect& aRect ) const;
- private:
- /**
- * CS60UIExampleInitialContainer.
- * C++ default constructor.
- */
- CS60UIExampleInitialContainer(CS60UIExampleModel& aModel);
- private: //data
- /**
- * iModel holds the game data. iModel is not owned by this class
- */
- CS60UIExampleModel& iModel;
- /**
- * iBkgBitmap holds the current background ready for drawing
- */
- CFbsBitmap* iBkgBitmap;
- /**
- * iTitle - the title string
- */
- HBufC* iTitle;
- };
- #endif // __S60UIEXAMPLE_INITIALCONTAINER_H__
- // End of File