?? basicdrawview2.cpp
字號:
/*
* ============================================================================
* Name : CBasicDrawView2 from BasicDrawView2.h
* Part of : BasicDraw
* Created : 2006-4-15 by Hewei
* Implementation notes:
* Initial content was generated by Series 60 AppWizard.
* Version :
* Copyright: Myself
* ============================================================================
*/
// INCLUDE FILES
#include <aknviewappui.h>
#include <avkon.hrh>
#include <BasicDraw.rsg>
#include "BasicDrawView2.h"
#include "BasicDrawContainer2.h"
// ================= MEMBER FUNCTIONS =======================
// ---------------------------------------------------------
// CBasicDrawView2::ConstructL(const TRect& aRect)
// EPOC two-phased constructor
// ---------------------------------------------------------
//
void CBasicDrawView2::ConstructL()
{
BaseConstructL( R_BASICDRAW_VIEW2 );
}
// ---------------------------------------------------------
// CBasicDrawView2::~CBasicDrawView2()
// destructor
// ---------------------------------------------------------
//
CBasicDrawView2::~CBasicDrawView2()
{
if ( iContainer )
{
AppUi()->RemoveFromViewStack( *this, iContainer );
}
delete iContainer;
}
// ---------------------------------------------------------
// TUid CBasicDrawView2::Id()
//
// ---------------------------------------------------------
//
TUid CBasicDrawView2::Id() const
{
return KView2Id;
}
// ---------------------------------------------------------
// CBasicDrawView2::HandleCommandL(TInt aCommand)
// takes care of view command handling
// ---------------------------------------------------------
//
void CBasicDrawView2::HandleCommandL(TInt aCommand)
{
switch ( aCommand )
{
case EAknSoftkeyOk:
{
iEikonEnv->InfoMsg( _L("view2 ok") );
break;
}
case EAknSoftkeyBack:
{
AppUi()->HandleCommandL(EEikCmdExit);
break;
}
default:
{
AppUi()->HandleCommandL( aCommand );
break;
}
}
}
// ---------------------------------------------------------
// CBasicDrawView2::HandleClientRectChange()
// ---------------------------------------------------------
//
void CBasicDrawView2::HandleClientRectChange()
{
if ( iContainer )
{
iContainer->SetRect( ClientRect() );
}
}
// ---------------------------------------------------------
// CBasicDrawView2::DoActivateL(...)
//
// ---------------------------------------------------------
//
void CBasicDrawView2::DoActivateL(
const TVwsViewId& /*aPrevViewId*/,TUid /*aCustomMessageId*/,
const TDesC8& /*aCustomMessage*/)
{
if (!iContainer)
{
iContainer = new (ELeave) CBasicDrawContainer2;
iContainer->SetMopParent(this);
iContainer->ConstructL( ClientRect() );
AppUi()->AddToStackL( *this, iContainer );
}
}
// ---------------------------------------------------------
// CBasicDrawView2::DoDeactivate()
//
// ---------------------------------------------------------
//
void CBasicDrawView2::DoDeactivate()
{
if ( iContainer )
{
AppUi()->RemoveFromViewStack( *this, iContainer );
}
delete iContainer;
iContainer = NULL;
}
// End of File
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -