?? funhelpview.cpp
字號:
/*
* ============================================================================
* Name : CFunHelpView from CAknView
* Part of : Hello
* Copyright (c) 2003 Nokia. All rights reserved.
* ============================================================================
*/
// INCLUDE FILES
#include <aknviewappui.h>
#include <avkon.hrh>
#include <EveryDay.rsg>
#include "EveryDay.hrh"
#include "FunHelpView.h"
#include "FunHelpContainer.h"
#include "EveryDayAppUi.h"
#include <akncontext.h>
#include <akntitle.h>
#include <EveryDay.mbg>
#include "RegisterView.h"
#include "TxtListboxView.h"
// ================= MEMBER FUNCTIONS =======================
// C++ default constructor can NOT contain any code, that
// might leave.
//
CFunHelpView* CFunHelpView::NewL()
{
CFunHelpView* self = NewLC();
CleanupStack::Pop(self);
return self;
}
CFunHelpView* CFunHelpView::NewLC()
{
CFunHelpView* self = new (ELeave) CFunHelpView;
CleanupStack::PushL(self);
self->ConstructL();
return self;
}
CFunHelpView::CFunHelpView()
{
}
// EPOC default constructor can leave.
void CFunHelpView::ConstructL()
{
//BaseConstructL(R_HELLO_VIEW);
BaseConstructL(R_SCAN_VIEW);
}
// Destructor
CFunHelpView::~CFunHelpView()
{
}
// ---------------------------------------------------------
// TUid CFunHelpView::Id()
// Returns Id of the view.
// ---------------------------------------------------------
TUid CFunHelpView::Id() const
{
return KViewId9;
}
// ---------------------------------------------------------
// CFunHelpView::HandleCommandL(TInt aCommand)
// Handles commands
// ---------------------------------------------------------
void CFunHelpView::HandleCommandL(TInt aCommand)
{
switch(aCommand)
{
case EAknSoftkeyBack:
{
AppUi()->ActivateLocalViewL(KViewId4);
break;
}
default:
{
AppUi()->HandleCommandL(aCommand);
break;
}
}
}
// ---------------------------------------------------------
// CFunHelpView::HandleClientRectChange()
// Handles client rect change.
// ---------------------------------------------------------
void CFunHelpView::HandleClientRectChange()
{
if (iContainer)
{
iContainer->SetRect(ClientRect());
}
}
// ---------------------------------------------------------
// CFunHelpView::DoActivateL(...)
// Creates the Container class object.
// ---------------------------------------------------------
void CFunHelpView::DoActivateL(const TVwsViewId& /*aPrevViewId*/,
TUid /*aCustomMessageId*/,
const TDesC8& /*aCustomMessage*/)
{
iContainer = new (ELeave) CFunHelpContainer;
iContainer->SetMopParent(this);
TRect rc;
rc.SetRect(ClientRect().iTl, TSize(176, 144));
iContainer->ConstructL(rc);
AppUi()->AddToStackL(*this, iContainer);
TBuf<KMaxPath> pathMbm;
#ifdef __WINS__
pathMbm.Copy(_L("z:\\system\\apps\\EveryDay\\EveryDay.mbm"));
#else
CEveryDayAppUi* pApp = (CEveryDayAppUi*)CEikonEnv::Static()->AppUi();
pApp->GetAppPath(pathMbm);
pathMbm.Append(_L("EveryDay.mbm"));
#endif
CEikStatusPane* statusPane = StatusPane();
//set icon
CAknContextPane* contextPane = (CAknContextPane*) statusPane->ControlL(TUid::Uid(EEikStatusPaneUidContext));
CFbsBitmap* bitmap = iEikonEnv->CreateBitmapL(pathMbm, EMbmEverydayNotepan_1_icon);
CFbsBitmap* bitmapMask = iEikonEnv->CreateBitmapL(pathMbm, EMbmEverydayNotepan_1_mask);
//contextPane->SetPicture(bitmap);
contextPane->SetPicture(bitmap, bitmapMask);
//load chinese words
TBuf<32> sTmpTitle;
CEikonEnv::Static()->ReadResource(sTmpTitle, R_QTN_HELP_TITLE);
CAknTitlePane* titlePane = (CAknTitlePane*) statusPane->ControlL(TUid::Uid(EEikStatusPaneUidTitle));
titlePane->SetTextL(sTmpTitle);
}
// ---------------------------------------------------------
// CFunHelpView::DoDeactivate()
// Deletes the Container class object.
// ---------------------------------------------------------
void CFunHelpView::DoDeactivate()
{
if (iContainer)
{
AppUi()->RemoveFromStack(iContainer);
delete iContainer;
iContainer = NULL;
}
}
// End of File
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -