⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 biaofengmainwindow.h

📁 一个可以加载图片作为下拉菜单的symbian手机示例
💻 H
字号:
/*
 * BiaofengMainWindow.h
 *
 *  Created on: 2009-4-24
 *      Author: IBM
 */

#ifndef BIAOFENGMAINWINDOW_H_
#define BIAOFENGMAINWINDOW_H_

// 1.
#include <eikon.hrh>
#include "Biaofeng.hrh"
// 2.
#include <eikon.rsg>
#include "Tag.h"
#include "MySelectionControl.h"

	//#include "Biaofeng.rsg"
// 3.
#include <eikenv.h>
#include <eikappui.h>
#include <eikproc.h>
#include <eikdialg.h>
#include <eikmenub.h>
#include <eikapp.h>
#include <eikdoc.h>
#include <coeutils.h>
#include <barsread.h>
#include <eikfctry.h>
#include <eiklabel.h> 
#include <eikedwin.h> 

#include <e32base.h> 

#include "BiaoCommContainer.h"
#include "BiaofengAppUi.h"

#include "BiaofengXPic.h"
#include "BiaofengXSurface.h"

#include "MyPopMenuControl.h"
#include "Biaofeng.hrh"

class CBiaofengAppView;
// CLASS DECLARATION

#define MAX_PIC_NUM 40


enum {SUR_MAIN=0,SUR_WEATHER,SUR_NEWS,SUR_TRAIN,SUR_PALNE,SUR_SIGN,SUR_HOTEL,SUR_FOOD,SUR_PLAY,SUR_ABOUT,SUR_TEXT};

//////////////////////////////////////////////////////////////////////////////
//
// -----> CMainWinControl (definition)
//
//////////////////////////////////////////////////////////////////////////////

class CMainWinControl : public CCoeControl
{
public:
    CMainWinControl ();
    ~CMainWinControl();
    void ConstructL(const TRect& rect, CBiaofengAppUi *aAppUi );
    
    TInt CountComponentControls() const;
    CCoeControl* ComponentControl(TInt aIndex) const;
    TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType);
    void HandleCommandL(TInt aCommand);
    virtual void SizeChanged();
    
    void LoadMap();
    void LoadTextListL(TInt aTextResource);
    void LoadTextListL(const TDesC& aText);
    void InitControlL(const CCoeControl* aParent);
    void OutputText(CWindowGc & aGc,const TRgb &aColor ) const;
    void VertMoveControl(TInt aSpan);
    
private:   
    static TInt TimerFun(TAny* aPtr);
    void ReFresh();
    TBool LoadImage();
    
private:
    void Draw(const TRect& aRect) const;
    
// private:
public:
	CBiaofengAppUi* iBiaofengAppUi;
    CBiaofengAppView*   iAppView;    
    CSmileyContainer*   iContainer;
    
    CCoeControl * iCurrentView;
    CCoeControl * iCurrentPage;
private:
    TInt iStartLogo; 
    TInt iTimeCount;  
    TInt iLoadPicCount;  
    
    CEikLabel * iLabel1;
    CEikEdwin *pEdwin;
    CPeriodic *iPeriodicTimer;
    
    TBuf<100> m_StartCity;
    TBuf<256> m_PrivatePathName;
    TBuf<100> m_PrivatePath;
    
    CXPic*  iImage_logo;
    CXPic*  iImage_bk01;
    CXPic*  iImageArray[MAX_PIC_NUM];
    
    /*
	 * 2009-4-30
	 * Desciptor:
	 * */
    CXPic* iImage_bg02;
    
    CXSurface*  m_BackSurface;
    
	CFbsBitmap* iMap;
	CFbsBitmap* iMapMask;
	TBool iIsLoadFinished;
	CMySelectionControl* iAreaControl;		//����ѡ
    TInt                                  iFocusedIndex;
	
public: // own methods
    // NOTE: Transfer ownership to CMyContainerControl
    void AddControlL(CCoeControl* aControl,TInt aControlId);
    void UpdateControls();
};



#endif /* BIAOFENGMAINWINDOW_H_ */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -