一个s60界面设计的例子

源代码在线查看: myviews.h

软件大小: 12 K
上传用户: iamguest88
关键词: s60 界面设计
下载地址: 免注册下载 普通下载 VIP

相关代码

				
				#ifndef MYVIEWS_H
				#define MYVIEWS_H
				
				
				#include "coecntrl.h"
				#include "coeview.h"
				#include "aknview.h"
				
				const TUid KUidMyApp = { 0x101F60FE };
				const TUid KUidMyAppViewOne = {0x01};
				const TUid KUidMyAppViewTwo = {0x02};
				
				
				class CEikLabel;
				
				
				class CContainerOne : public CCoeControl
				{
				public:
				       static CContainerOne* NewL(const TRect& aRect);
					   static CContainerOne* NewLC(const TRect& aRect);
					   virtual ~CContainerOne();
					   void SizeChanged();
				
				private:
				       void ConstructL(const TRect& aRect);
				      /**
				        * From CoeControl,CountComponentControls.
				        */
				        TInt CountComponentControls() const;
				
				       /**
				        * From CCoeControl,ComponentControl.
				        */
				        CCoeControl* ComponentControl(TInt aIndex) const;
				        void Draw(const TRect& aRect) const;
				protected:
				      CEikLabel* iLabel;          // example label
				
				};
				
				
				class CContainerTwo : public CContainerOne
				{
				public:
				     static CContainerTwo* NewL(const TRect& aRect);
					 static CContainerTwo* NewLC(const TRect& aRect);
				
				private:
				     void ConstructL(const TRect& aRect);
				
				
				};
				
				
				
				class CMyViewOne : public CAknView
				{
				
				public:
					~CMyViewOne();
					static CMyViewOne* NewL();
					static CMyViewOne* NewLC();
				
				private:
				    void ConstructL();
				 
				
				
				// from CAknView
				public:
						virtual TUid Id () const;
						virtual void HandleCommandL(TInt aCommand);
				protected:
					virtual void DoActivateL (const TVwsViewId &aPrevViewId, TUid aCustomMessageId, const TDesC8 &aCustomMessage);
					virtual void DoDeactivate();
					
				
				    private: //data
					CContainerOne*	iContainer;
				
				};
				
				
				
				
				class CMyViewTwo : public CAknView
				{
				
				public:
					static CMyViewTwo* NewL();
					static CMyViewTwo* NewLC();
					~CMyViewTwo();
				private:
				       void ConstructL();
				
				// from CAknView
				public:
						virtual TUid Id () const;
						virtual void HandleCommandL(TInt aCommand);
				protected:
					virtual void DoActivateL (const TVwsViewId &aPrevViewId, TUid aCustomMessageId, const TDesC8 &aCustomMessage);
					virtual void DoDeactivate();
				
				
				
				    private: //data
				        CContainerTwo* iContainer;          // example label
				};
				
				
				
				
				
				
				
				
				
				
				
				
				
				#endif			

相关资源