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