📄 helpexampleappui.cpp
字号:
/*
* ==============================================================================
* Name : helpexampleappui.cpp
* Part of : Help example
* Interface :
* Description :
* Version :
*
* Copyright (c) 2004 - 2006 Nokia Corporation.
* This material, including documentation and any related
* computer programs, is protected by copyright controlled by
* Nokia Corporation.
* ==============================================================================
*/
// INCLUDE FILES
#include <e32std.h>
#include <hlplch.h>
#include <Helpexample.rsg>
#include "HelpExample.pan"
#include "HelpExampleAppUi.h"
#include "HelpExampleAppView.h"
#include "HelpExampleApplication.h"
#include "HelpExample.hrh"
#include "HelpfulForm.h"
#include "HelpExample.hlp.hrh"
// ============================ MEMBER FUNCTIONS ===============================
// -----------------------------------------------------------------------------
// CHelpExampleAppUi::ConstructL()
// Symbian 2nd phase constructor can leave.
// -----------------------------------------------------------------------------
//
void CHelpExampleAppUi::ConstructL()
{
BaseConstructL( EAknEnableSkin );
iAppView = CHelpExampleAppView::NewL( ClientRect() );
AddToStackL( iAppView );
}
// -----------------------------------------------------------------------------
// CHelpExampleAppUi::CHelpExampleAppUi()
// C++ default constructor can NOT contain any code, that might leave.
// -----------------------------------------------------------------------------
//
CHelpExampleAppUi::CHelpExampleAppUi()
{
// No implementation required
}
// -----------------------------------------------------------------------------
// CHelpExampleAppUi::~CHelpExampleAppUi()
// Destructor.
// -----------------------------------------------------------------------------
//
CHelpExampleAppUi::~CHelpExampleAppUi()
{
if ( iAppView )
{
iEikonEnv->RemoveFromStack( iAppView );
delete iAppView;
iAppView = NULL;
}
}
// -----------------------------------------------------------------------------
// CHelpExampleAppUi::HandleCommandL()
// Takes care of command handling.
// -----------------------------------------------------------------------------
//
void CHelpExampleAppUi::HandleCommandL( TInt aCommand )
{
switch ( aCommand )
{
case EEikCmdExit:
case EAknSoftkeyExit:
Exit();
break;
case EShowHelpfulDialog:
{
CHelpfulForm* dlg = CHelpfulForm::NewL( R_FORM_MENUBAR );
dlg->ExecuteLD( R_HELPFUL_DIALOG );
}
break;
case ELaunchHelpForContext:
{
CArrayFix <TCoeHelpContext>* buf = CCoeAppUi::AppHelpContextL();
HlpLauncher::LaunchHelpApplicationL( iEikonEnv->WsSession(), buf );
}
break;
default:
Panic ( EHelpExampleBasicUi );
break;
}
}
// -----------------------------------------------------------------------------
// CArrayFix <TCoeHelpContext>
// Return the help context for this application.
// -----------------------------------------------------------------------------
//
CArrayFix <TCoeHelpContext>* CHelpExampleAppUi::HelpContextL() const
{
CArrayFixFlat <TCoeHelpContext>* array =
new ( ELeave )CArrayFixFlat <TCoeHelpContext> ( 1 );
CleanupStack::PushL( array );
array->AppendL( TCoeHelpContext( KUidHelpFile, KContextApplication ) );
CleanupStack::Pop( array );
return array;
}
// End of File
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -