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

📄 simpleex_view.cpp

📁 EMCC源代码 Symbian S60第二版
💻 CPP
字号:
// simpleEx_view.cpp
//
// Copyright (c) Symbian Software Ltd 1999 - 2007.  All rights reserved.
//

/*=================================================================

      File: simpleEx_view.cpp

      This file contains the application view class for SimpleEx.

==================================================================*/

#include "eikenv.h"
#include <coemain.h>

#include "SimpleEx.h"
#include "SimpleEx.rsg"
#include <QikCommand.h>


CSimpleExAppView* CSimpleExAppView::NewL(CQikAppUi& aAppUi)
    {
    CSimpleExAppView* self = CSimpleExAppView::NewLC(aAppUi);
    CleanupStack::Pop(self);
    return self;
    }

CSimpleExAppView* CSimpleExAppView::NewLC(CQikAppUi& aAppUi)
    {
    CSimpleExAppView* self = new (ELeave) CSimpleExAppView(aAppUi);
    CleanupStack::PushL(self);
    self->ConstructL();
    return self;
    }

CSimpleExAppView::CSimpleExAppView(CQikAppUi& aAppUi) 
	: CQikViewBase(aAppUi, KNullViewId)
	{
	}

void CSimpleExAppView::ConstructL()
    {

    BaseConstructL();
    }

void CSimpleExAppView::ViewConstructL()
	{
	// Loads information about the UI configurations this view supports
	// together with definition of each view.	
	ViewConstructFromResourceL(R_SIMPLEEX_CONFIGURATIONS);
	}


TVwsViewId CSimpleExAppView::ViewId()const
	{
	return TVwsViewId(KUidSimpleExApp, KUidSimpleExView);
	}

void CSimpleExAppView::Draw(const TRect& ) const
    {

    CWindowGc& gc = SystemGc();   
    const CFont*     font;
	TRect drawRect = Rect();
		
	gc.Clear();

	font = iEikonEnv->TitleFont();
	gc.UseFont(font);
	TInt   baselineOffset=(drawRect.Height() - font->HeightInPixels())/2; 
	gc.DrawText(_L("Simple Example"),drawRect,baselineOffset,CGraphicsContext::ECenter, 0);
	
	gc.DiscardFont();
    }
void CSimpleExAppView::HandleCommandL(CQikCommand& aCommand)
    {

    switch(aCommand.Id())
	    {
  
        case ESimpleExCommand:
            {
            _LIT(message,"Start Selected!");
            iEikonEnv->AlertWin(message);
            break;
            }
        default:
			CQikViewBase::HandleCommandL(aCommand);
        }
    }

⌨️ 快捷键说明

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