?? normaltexteditorappui.cpp
字號:
/*
* ============================================================================
* Name : CNormalTextEditorAppUi from NormalTextEditorAppUi.cpp
* Part of : NormalTextEditor
* Created : 2006-4-7 by hewei
* Implementation notes:
* Initial content was generated by Series 60 AppWizard.
* Version :
* Copyright: myself
* ============================================================================
*/
// INCLUDE FILES
#include "NormalTextEditorAppUi.h"
#include "NormalTextEditorContainer.h"
#include "RichTextEditorContainer.h"
#include <NormalTextEditor.rsg>
#include "normaltexteditor.hrh"
#include <avkon.hrh>
// ================= MEMBER FUNCTIONS =======================
//
// ----------------------------------------------------------
// CNormalTextEditorAppUi::ConstructL()
//
// ----------------------------------------------------------
//
void CNormalTextEditorAppUi::ConstructL()
{
BaseConstructL();
iAppContainer1 = new (ELeave) CNormalTextEditorContainer;
iAppContainer1->SetMopParent( this );
iAppContainer1->ConstructL( ClientRect() );
AddToStackL(iAppContainer1);
}
// ----------------------------------------------------
// CNormalTextEditorAppUi::~CNormalTextEditorAppUi()
// Destructor
// Frees reserved resources
// ----------------------------------------------------
//
CNormalTextEditorAppUi::~CNormalTextEditorAppUi()
{
if (iAppContainer1)
{
RemoveFromStack( iAppContainer1 );
delete iAppContainer1;
}
if (iAppContainer2)
{
RemoveFromStack( iAppContainer2 );
delete iAppContainer2;
}
}
// ------------------------------------------------------------------------------
// CNormalTextEditorAppUi::DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane)
// This function is called by the EIKON framework just before it displays
// a menu pane. Its default implementation is empty, and by overriding it,
// the application can set the state of menu items dynamically according
// to the state of application data.
// ------------------------------------------------------------------------------
//
void CNormalTextEditorAppUi::DynInitMenuPaneL(
TInt /*aResourceId*/,CEikMenuPane* /*aMenuPane*/)
{
}
// ----------------------------------------------------
// CNormalTextEditorAppUi::HandleKeyEventL(
// const TKeyEvent& aKeyEvent,TEventCode /*aType*/)
// takes care of key event handling
// ----------------------------------------------------
//
TKeyResponse CNormalTextEditorAppUi::HandleKeyEventL(
const TKeyEvent& /*aKeyEvent*/,TEventCode /*aType*/)
{
return EKeyWasNotConsumed;
}
// ----------------------------------------------------
// CNormalTextEditorAppUi::HandleCommandL(TInt aCommand)
// takes care of command handling
// ----------------------------------------------------
//
void CNormalTextEditorAppUi::HandleCommandL(TInt aCommand)
{
switch ( aCommand )
{
case EAknSoftkeyBack:
case EEikCmdExit:
{
Exit();
break;
}
case ENormalTextEditorCmdAppPlainTextEditor:
{
if(!iAppContainer1)
{
if(iAppContainer2)
{
RemoveFromStack( iAppContainer2 );
delete iAppContainer2;
}
iAppContainer1 = new (ELeave) CNormalTextEditorContainer;
iAppContainer1->SetMopParent( this );
iAppContainer1->ConstructL( ClientRect() );
AddToStackL( iAppContainer1 );
}
break;
}
case ENormalTextEditorCmdAppRichTextEditor :
{
if(iAppContainer1)
{
RemoveFromStack( iAppContainer1);
delete iAppContainer1;
iAppContainer2=CRichTextEditorContainer::NewL(ClientRect());
iAppContainer2->SetMopParent( this );
AddToStackL( iAppContainer2 );
}
}
default:
break;
}
}
// End of File
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -