s60uiexampleinitialcontainer.h
来自「symbianOS第三版开发与实用教程部分源码和部分试验」· C头文件 代码 · 共 106 行
H
106 行
// 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
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?