📄 allslistsview2.cpp
字号:
/*
* ============================================================================
* Name : CAllSListsView2 from AllSListsView2.h
* Part of : AllSLists
* 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 <AllSLists.rsg>
#include "AllSLists.hrh"
#include "AllSListsView2.h"
#include "AllSListsContainer2.h"
// ================= MEMBER FUNCTIONS =======================
// ---------------------------------------------------------
// CAllSListsView2::ConstructL(const TRect& aRect)
// EPOC two-phased constructor
// ---------------------------------------------------------
//
void CAllSListsView2::ConstructL()
{
BaseConstructL( R_ALLSLISTS_VIEW2 );
}
// ---------------------------------------------------------
// CAllSListsView2::~CAllSListsView2()
// destructor
// ---------------------------------------------------------
//
CAllSListsView2::~CAllSListsView2()
{
if ( iContainer )
{
AppUi()->RemoveFromViewStack( *this, iContainer );
}
delete iContainer;
}
// ---------------------------------------------------------
// TUid CAllSListsView2::Id()
//
// ---------------------------------------------------------
//
TUid CAllSListsView2::Id() const
{
return KView2Id;
}
// ---------------------------------------------------------
// CAllSListsView2::HandleCommandL(TInt aCommand)
// takes care of view command handling
// ---------------------------------------------------------
//
void CAllSListsView2::HandleCommandL(TInt aCommand)
{
switch ( aCommand )
{
case EAllSListsCmdDouble:
case EAllSListsCmdFormDouble:
case EAllSListsCmdDouble2:
case EAllSListsCmdDoubleNumber:
case EAllSListsCmdDoubleTime:
case EAllSListsCmdDoubleLarge:
case EAllSListsCmdDoubleGraphic:
case EAllSListsCmdFormDoubleGraphic:
{
TInt id = aCommand - EAllSListsCmdDouble + R_ALLSLISTS_DOUBLE_LISTBOX;
iContainer->ShowListBoxL(id);
break;
}
case EAknCmdMark:
case EAknCmdUnmark:
case EAknMarkAll:
case EAknUnmarkAll:
{
iContainer->HandleMarkCommandL(aCommand);
break;
}
case EAknSoftkeyBack:
{
AppUi()->HandleCommandL(EEikCmdExit);
break;
}
default:
{
AppUi()->HandleCommandL( aCommand );
break;
}
}
}
// ---------------------------------------------------------
// CAllSListsView2::HandleClientRectChange()
// ---------------------------------------------------------
//
void CAllSListsView2::HandleClientRectChange()
{
if ( iContainer )
{
iContainer->SetRect( ClientRect() );
}
}
// ---------------------------------------------------------
// CAllSListsView2::DoActivateL(...)
//
// ---------------------------------------------------------
//
void CAllSListsView2::DoActivateL(
const TVwsViewId& /*aPrevViewId*/,TUid /*aCustomMessageId*/,
const TDesC8& /*aCustomMessage*/)
{
if (!iContainer)
{
iContainer = new (ELeave) CAllSListsContainer2;
iContainer->SetMopParent(this);
iContainer->ConstructL( ClientRect() );
AppUi()->AddToStackL( *this, iContainer );
}
}
// ---------------------------------------------------------
// CAllSListsView2::DoDeactivate()
//
// ---------------------------------------------------------
//
void CAllSListsView2::DoDeactivate()
{
if ( iContainer )
{
AppUi()->RemoveFromViewStack( *this, iContainer );
}
delete iContainer;
iContainer = NULL;
}
// End of File
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -