📄 alllistsview2.cpp
字号:
/*
* ============================================================================
* Name : CAllListsView2 from AllListsView2.h
* Part of : AllLists
* Created : 16.03.2006 by ToBeReplacedByAuthor
* Implementation notes:
* Initial content was generated by Series 60 Application Wizard.
* Version :
* Copyright: ToBeReplacedByCopyright
* ============================================================================
*/
// INCLUDE FILES
#include <aknviewappui.h>
#include <avkon.hrh>
#include <AllLists.rsg>
#include "AllLists.hrh"
#include "AllListsView2.h"
#include "AllListsContainer2.h"
// ================= MEMBER FUNCTIONS =======================
// ---------------------------------------------------------
// CAllListsView2::ConstructL(const TRect& aRect)
// EPOC two-phased constructor
// ---------------------------------------------------------
//
void CAllListsView2::ConstructL()
{
BaseConstructL( R_ALLLISTS_VIEW2 );
}
// ---------------------------------------------------------
// CAllListsView2::~CAllListsView2()
// destructor
// ---------------------------------------------------------
//
CAllListsView2::~CAllListsView2()
{
if ( iContainer )
{
AppUi()->RemoveFromViewStack( *this, iContainer );
}
delete iContainer;
}
// ---------------------------------------------------------
// TUid CAllListsView2::Id()
//
// ---------------------------------------------------------
//
TUid CAllListsView2::Id() const
{
return KView2Id;
}
// ---------------------------------------------------------
// CAllListsView2::HandleCommandL(TInt aCommand)
// takes care of view command handling
// ---------------------------------------------------------
//
void CAllListsView2::HandleCommandL(TInt aCommand)
{
switch ( aCommand )
{
case EAllListsCmdDouble:
case EAllListsCmdFormDouble:
case EAllListsCmdDouble2:
case EAllListsCmdDoubleNumber:
case EAllListsCmdDoubleTime:
case EAllListsCmdDoubleLarge:
case EAllListsCmdDoubleGraphic:
case EAllListsCmdFormDoubleGraphic:
{
TInt id = aCommand - EAllListsCmdDouble + R_ALLLISTS_DOUBLE_LISTBOX;
iContainer->ShowListBoxL(id);
break;
}
case EAknSoftkeyBack:
{
AppUi()->HandleCommandL(EEikCmdExit);
break;
}
default:
{
AppUi()->HandleCommandL( aCommand );
break;
}
}
}
// ---------------------------------------------------------
// CAllListsView2::HandleClientRectChange()
// ---------------------------------------------------------
//
void CAllListsView2::HandleClientRectChange()
{
if ( iContainer )
{
iContainer->SetRect( ClientRect() );
}
}
// ---------------------------------------------------------
// CAllListsView2::DoActivateL(...)
//
// ---------------------------------------------------------
//
void CAllListsView2::DoActivateL(
const TVwsViewId& /*aPrevViewId*/,TUid /*aCustomMessageId*/,
const TDesC8& /*aCustomMessage*/)
{
if (!iContainer)
{
iContainer = new (ELeave) CAllListsContainer2;
iContainer->SetMopParent(this);
iContainer->ConstructL( ClientRect() );
AppUi()->AddToStackL( *this, iContainer );
}
}
// ---------------------------------------------------------
// CAllListsView2::DoDeactivate()
//
// ---------------------------------------------------------
//
void CAllListsView2::DoDeactivate()
{
if ( iContainer )
{
AppUi()->RemoveFromViewStack( *this, iContainer );
}
delete iContainer;
iContainer = NULL;
}
// End of File
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -