aknexeditorview7.cpp
来自「国内著名嵌入式培训机构内部资料,内含一些实例代码,包括技术专题书籍」· C++ 代码 · 共 110 行
CPP
110 行
/* Copyright (c) 2004, Nokia. All rights reserved */
// INCLUDE FILES
#include <aknviewappui.h>
#include <avkon.hrh>
#include <AknExEditor.rsg>
#include "AknExEditor.hrh"
#include "AknExEditorView7.h"
#include "AknExEditorcontainer7.h"
// ================= MEMBER FUNCTIONS =======================
// ----------------------------------------------------------------------------
// CAknExEditorView7::CAknExEditorView7()
// C++ default constructor can NOT contain any code, that
// might leave.
//-----------------------------------------------------------------------------
//
CAknExEditorView7::CAknExEditorView7()
{
}
// ----------------------------------------------------------------------------
// CAknExEditorView7::ConstructL()
// Symbian default constructor can leave.
//-----------------------------------------------------------------------------
//
void CAknExEditorView7::ConstructL()
{
BaseConstructL( R_AKNEXEDITOR_VIEW7 );
}
// ----------------------------------------------------------------------------
// CAknExEditorView7::~CAknExEditorView7()
// Destructor
//-----------------------------------------------------------------------------
//
CAknExEditorView7::~CAknExEditorView7()
{
if ( iContainer )
{
AppUi()->RemoveFromStack( iContainer );
}
delete iContainer;
}
// ---------------------------------------------------------
// TUid CAknExEditorView7::Id()
// Returns Id of the view.
// ---------------------------------------------------------
TUid CAknExEditorView7::Id() const
{
return KViewId7;
}
// ---------------------------------------------------------
// CAknExEditorView7::HandleCommandL()
// Handles commands
// ---------------------------------------------------------
void CAknExEditorView7::HandleCommandL( TInt aCommand )
{
AppUi()->HandleCommandL( aCommand );
}
// ---------------------------------------------------------
// CAknExEditorView7::HandleClientRectChange()
// Handles client rect change.
// ---------------------------------------------------------
void CAknExEditorView7::HandleClientRectChange()
{
if ( iContainer )
{
iContainer->SetRect( ClientRect() );
}
}
// ---------------------------------------------------------
// CAknExEditorView7::DoActivateL()
// Creates the Container class object.
// ---------------------------------------------------------
void CAknExEditorView7::DoActivateL( const TVwsViewId& /*aPrevViewId*/,
TUid /*aCustomMessageId*/,
const TDesC8& /*aCustomMessage*/ )
{
iContainer = new ( ELeave ) CAknExEditorContainer7;
iContainer->SetMopParent( this );
iContainer->ConstructL( ClientRect() );
AppUi()->AddToStackL( *this, iContainer );
}
// ---------------------------------------------------------
// CAknExEditorView7::DoDeactivate()
// Deletes the Container class object.
// ---------------------------------------------------------
void CAknExEditorView7::DoDeactivate()
{
if ( iContainer )
{
AppUi()->RemoveFromStack( iContainer );
}
delete iContainer;
iContainer = NULL;
}
// End of File
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?