vrexappui.cpp

来自「symbian s60 有关音频的代码实例,供参考」· C++ 代码 · 共 96 行

CPP
96
字号
/*
* ============================================================================
*  Name     : CVRexAppUi from VRexAppUi.cpp
*  Part of  : Video Example
*  Created  : 30/08/2006 by Forum  Nokia
*  Implementation notes:
*  Version  : 2.0
*  Copyright: Nokia Corporation, 2006
* ============================================================================
*/

// INCLUDE FILES
#include <avkon.hrh>

#include "VRexAppui.h"
#include "VRexDocument.h"
#include "VRexListView.h"
#include "VRexVideoView.h"
#include "VRex.hrh"
#include <VRex.rsg>

// ================= MEMBER FUNCTIONS =======================
//
// ----------------------------------------------------------
// CVRexAppUi::ConstructL()
//
// ----------------------------------------------------------
//
void CVRexAppUi::ConstructL()
    {
    BaseConstructL(EAknEnableSkin);

    CVRexListView* view1 = new (ELeave) CVRexListView;

    CleanupStack::PushL( view1 );
    view1->ConstructL();
    AddViewL( view1 );      // transfer ownership to CAknViewAppUi
    CleanupStack::Pop(view1);    // view1

    CVRexVideoView* view2 = new (ELeave) CVRexVideoView;

    CleanupStack::PushL( view2 );
    view2->ConstructL();
    AddViewL( view2 );      // transfer ownership to CAknViewAppUi
    CleanupStack::Pop(view2);    // view2

    SetDefaultViewL(*view1);
    }

// ----------------------------------------------------
// CVRexAppUi::~CVRexAppUi()
// Destructor
// Frees reserved resources
// ----------------------------------------------------
//
CVRexAppUi::~CVRexAppUi()
    {
    }

// ------------------------------------------------------------------------------
// CVRexAppUi::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 CVRexAppUi::DynInitMenuPaneL(
    TInt /*aResourceId*/,CEikMenuPane* /*aMenuPane*/)
    {
    }

// ----------------------------------------------------
// CVRexAppUi::HandleCommandL(TInt aCommand)
// takes care of command handling
// ----------------------------------------------------
//
void CVRexAppUi::HandleCommandL(TInt aCommand)
    {
    switch ( aCommand )
        {
        case EAknCmdExit:
        case EEikCmdExit:
        case EAknSoftkeyExit:
            {
            Exit();
            break;
            }

        default:
            break;
        }
    }

// End of File

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?