📄 textimagesoundview.cpp
字号:
/*
* ============================================================================
* Name : CTextImageSoundView from TextImageSoundView.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 "TextImageSoundView.h"
#include "TextImageSoundContainer.h"
// ================= MEMBER FUNCTIONS =======================
// ---------------------------------------------------------
// CTextImageSoundView::ConstructL(const TRect& aRect)
// EPOC two-phased constructor
// ---------------------------------------------------------
//
void CTextImageSoundView::ConstructL()
{
BaseConstructL( R_TEXTIMAGESOUND_TEXT);
}
// ---------------------------------------------------------
// CTextImageSoundView::~CTextImageSoundView()
// destructor
// ---------------------------------------------------------
//
CTextImageSoundView::~CTextImageSoundView()
{
if ( iContainer )
{
AppUi()->RemoveFromViewStack( *this, iContainer );
}
delete iContainer;
}
// ---------------------------------------------------------
// TUid CTextImageSoundView::Id()
//
// ---------------------------------------------------------
//
TUid CTextImageSoundView::Id() const
{
return KViewId;
}
// ---------------------------------------------------------
// CTextImageSoundView::HandleCommandL(TInt aCommand)
// takes care of view command handling
// ---------------------------------------------------------
//
void CTextImageSoundView::HandleCommandL(TInt aCommand)
{
switch ( aCommand )
{
case EAknSoftkeyOk:
{
iEikonEnv->InfoMsg( _L("Text ok") );
break;
}
case EAknSoftkeyBack:
{
AppUi()->HandleCommandL(EEikCmdExit);
break;
}
case EAknCmdExit:
{
break;
}
default:
{
AppUi()->HandleCommandL( aCommand );
break;
}
}
}
// ---------------------------------------------------------
// CTextImageSoundView::HandleClientRectChange()
// ---------------------------------------------------------
//
void CTextImageSoundView::HandleClientRectChange()
{
if ( iContainer )
{
iContainer->SetRect( ClientRect() );
}
}
// ---------------------------------------------------------
// CTextImageSoundView::DoActivateL(...)
//
// ---------------------------------------------------------
//
void CTextImageSoundView::DoActivateL(
const TVwsViewId& /*aPrevViewId*/,TUid /*aCustomMessageId*/,
const TDesC8& /*aCustomMessage*/)
{
if (!iContainer)
{
iContainer = new (ELeave) CTextImageSoundContainer;
iContainer->SetMopParent(this);
iContainer->ConstructL( ClientRect() );
AppUi()->AddToStackL( *this, iContainer );
}
}
// ---------------------------------------------------------
// CTextImageSoundView::DoDeactivate()
//
// ---------------------------------------------------------
//
void CTextImageSoundView::DoDeactivate()
{
if ( iContainer )
{
AppUi()->RemoveFromViewStack( *this, iContainer );
}
delete iContainer;
iContainer = NULL;
}
// End of File
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -