S60UIExampleHighScoreContainer.h
上传用户:laixiong
上传日期:2007-03-11
资源大小:2994k
文件大小:3k
源码类别:
Symbian
开发平台:
C/C++
- // Copyright (c) 2006 Nokia Corporation.
- #ifndef __S60UIEXAMPLE_HIGHSCORECONTAINER_H__
- #define __S60UIEXAMPLE_HIGHSCORECONTAINER_H__
- #include <aknview.h>
- class CS60UIExampleModel;
- class CAknNavigationDecorator;
- class CAknNavigationControlContainer;
- /**
- * CS60UIExampleHighScoreContainer container control class.
- * An instance of CS60UIExampleHighScoreContainer contains the view drawn to the screen
- * for CS60UIExampleHighScoreView
- */
- class CS60UIExampleHighScoreContainer : public CCoeControl
- {
- public: // Constructors and destructor
- /**
- * NewL.
- * Two-phased constructor.
- * Create a CS60UIExampleHighScoreContainer 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 CS60UIExampleHighScoreContainer.
- */
- static CS60UIExampleHighScoreContainer* NewL(const TRect& aRect,
- CS60UIExampleModel& aModel);
- /**
- * NewLC.
- * Two-phased constructor.
- * Create a CS60UIExampleHighScoreContainer 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 CS60UIExampleHighScoreContainer.
- */
- static CS60UIExampleHighScoreContainer* NewLC(const TRect& aRect,
- CS60UIExampleModel& aModel);
- /**
- * ConstructL
- * 2nd phase constructor.
- * @param aRect Frame rectangle for container.
- */
- void ConstructL(const TRect& aRect);
- virtual ~CS60UIExampleHighScoreContainer();
- 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 CS60UIExamplePlayContainer to the screen.
- * @param aRect the rectangle of this view that needs updating
- */
- void Draw(const TRect& aRect) const;
- private:
- /**
- * CS60UIExampleHighScoreContainer.
- * C++ default constructor.
- */
- CS60UIExampleHighScoreContainer(CS60UIExampleModel& aModel);
- public: //new function
- /**
- * UpdateNaviPane
- * Update the navipane with the level and score
- */
- void UpdateNaviPaneL();
- private: //data
- /**
- * iModel
- * Reference to model containing data
- */
- CS60UIExampleModel& iModel;
- /**
- * iNaviPane
- * pointer to navipane (not owned)
- */
- CAknNavigationControlContainer* iNaviPane;
- /**
- * iNaviDecorator
- * navi pane decorator (label with level and score)
- */
- CAknNavigationDecorator* iNaviDecorator;
- /**
- * iTitle - the title string
- */
- HBufC* iTitle;
- /**
- * iBkgBitmap - for the background graphic
- */
- CFbsBitmap* iBkgBitmap;
- };
- #endif // __S60UIEXAMPLE_HIGHSCORECONTAINER_H__
- // End of File